added timeout response (status 408)

+ added EPOLLERR and EPOLLHUP handling
+ fix root substitution for default "/" location (temp or permanent ?)
+ tested siege a little, seems good
This commit is contained in:
LuckyLaszlo
2022-08-11 07:12:13 +02:00
parent 08f6929db9
commit ab0bc2c4c0
13 changed files with 139 additions and 38 deletions

View File

@@ -7,7 +7,10 @@ void Webserv::_get(Client *client)
std::string path = client->get_rq_abs_path();
std::cerr << "path before = " << path << "\n"; // DEBUG
path.replace(0, client->assigned_location->path.size(), client->assigned_location->root);
if (client->assigned_location->path == "/")
path.insert(0, client->assigned_location->root);
else
path.replace(0, client->assigned_location->path.size(), client->assigned_location->root);
std::cerr << "path after = " << path << "\n"; // DEBUG
// TMP HUGO ( We move this in process_switch() )