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:
@@ -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() )
|
||||
|
||||
Reference in New Issue
Block a user