changed client_body_limit (now in KB)

+ multiples little adjusts
This commit is contained in:
lperrey
2022-08-15 02:14:27 +02:00
parent 9ac84f706d
commit a284e400c1
12 changed files with 48 additions and 127 deletions

View File

@@ -183,8 +183,11 @@ void Client::_parse_chunked_body(size_t pos)
/* endptr_copy = endptr; */
(void)endptr_copy;
chunk_size = std::strtoul(&_request.body[pos], &endptr, 16);
/* if (chunk_size == LONG_MAX && errno == ERANGE)
status = 413; */
if (errno == ERANGE)
{
status = 413;
return ;
}
/* if (endptr == endptr_copy)
{
std::cerr << "parse_request_body(), no conversion possible\n";
@@ -407,7 +410,7 @@ void Client::_parse_port_hostname(std::string host)
void Client::_check_request_errors()
{
std::cerr << "Content-Length=" << get_rq_headers("Content-Length") << "\n";
std::cerr << "Content-Length=" << get_rq_headers("Content-Length") << "\n";
std::cerr << "strtoul=" << std::strtoul(get_rq_headers("Content-Length").c_str(), NULL, 10) << "\n";
std::cerr << "client_body_limit=" << assigned_server->client_body_limit << "\n";
///////////////////////