added multipart upload file,

it works, but need some adjustements,
refactoring and testing
This commit is contained in:
LuckyLaszlo
2022-08-14 06:25:06 +02:00
parent b0949615c8
commit 84babec82b
19 changed files with 398 additions and 86 deletions

View File

@@ -21,7 +21,10 @@ void Webserv::_response(Client *client)
}
else if (ret == SEND_COMPLETE)
{
if (client->get_rq_headers("Connection") == "close" || client->status == 408)
if (client->get_rq_headers("Connection") == "close"
|| client->status == 400 // TODO: Refactoring
|| client->status == 408
|| client->status == 413)
_close_client(client->get_cl_fd());
else
{
@@ -61,7 +64,10 @@ void Webserv::_append_base_headers(Client *client)
{
client->response.append("Server: Webserv/0.1" CRLF);
if (client->get_rq_headers("Connection") == "close")
if (client->get_rq_headers("Connection") == "close"
|| client->status == 400 // TODO: Refactoring
|| client->status == 408
|| client->status == 413)
client->response.append("Connection: close" CRLF);
else
client->response.append("Connection: keep-alive" CRLF);