mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-29 05:17:59 +03:00
misc
This commit is contained in:
@@ -236,6 +236,7 @@ void Response::generateBody(void)
|
||||
|
||||
bool Response::allowedMethod(std::string &method)
|
||||
{
|
||||
DBOUT << "allowedMethod called" << ENDL;
|
||||
std::vector<std::string>::iterator it;
|
||||
|
||||
it = _location->methods.begin();
|
||||
@@ -290,8 +291,11 @@ void Response::generate2(void)
|
||||
_hostPort.ip = _config->getHost();
|
||||
_hostPort.port = _config->getPort();
|
||||
_fullURI = getFullURI();
|
||||
DBOUT << "fullURI " << _fullURI << ENDL;
|
||||
_method = _request.getMethod();
|
||||
|
||||
DBOUT << RED << "code is " << _code << ENDL;
|
||||
|
||||
if (_request.badCode(_code) || !allowedMethod(_method))
|
||||
{
|
||||
invalidClient();
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace config
|
||||
|
||||
TOMLMap *parse(void)
|
||||
{
|
||||
std::string filename = "config/simple.toml";
|
||||
std::string filename = "config/real.toml";
|
||||
config::TOMLParser parser(filename);
|
||||
TOMLMap *root = parser.parse();
|
||||
/* config::display(root); */
|
||||
|
||||
@@ -13,7 +13,7 @@ int main(int argc, char **argv)
|
||||
server.readConfig();
|
||||
server.setupConfig();
|
||||
server.start();
|
||||
// server.end();
|
||||
server.end();
|
||||
|
||||
|
||||
return (0);
|
||||
|
||||
Reference in New Issue
Block a user