Something went wrong. Try again.
An HTTP server written in C++98 projects.intra.42.fr/projects/webserv
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344/* ************************************************************************** *//* *//* ::: :::::::: *//* utils.hpp :+: :+: :+: *//* +:+ +:+ +:+ *//* By: bcausseq <bcausseq@42angouleme.fr> +#+ +:+ +#+ *//* +#+#+#+#+#+ +#+ *//* Created: 2026/09/27 22:52:30 by bcausseq #+# #+# *//* Updated: 2026/09/27 22:58:09 by bcausseq ### ########.fr *//* *//* ************************************************************************** */
#pragma once
#include "Header.hpp"#include "config/Config.hpp"
#include <vector>
std::stringstos(const short& status);
const Location*find_location(const std::string& path, Config const& s, size_t& len);
boolcheck_methods_local(const std::vector<std::string>& loc, const std::string& method);
std::stringget_abs_path(Client& c, const std::string& path, const std::string& method);
std::stringset_header_error(const std::string& version, std::string& code, std::string& errs);
std::stringget_default_message(const short& status, Config const& config);
voidsend_error_status(Header& h, Client& c, const short status);
methodsget_method(const std::string& meth_header);