Add TODO for enforcing max_request_size_bytes

This commit is contained in:
2025-08-19 17:33:21 -04:00
parent b7282a2f03
commit 800d8cb6b0

View File

@@ -49,6 +49,11 @@ void HttpHandler::on_data_arrived(std::string_view data,
return; return;
} }
// TODO: Enforce the configured max_request_size_bytes limit here.
// Should track cumulative bytes received for the current HTTP request
// and send 413 Request Entity Too Large if limit is exceeded.
// This prevents DoS attacks via oversized HTTP requests.
// Parse HTTP data with llhttp // Parse HTTP data with llhttp
enum llhttp_errno err = enum llhttp_errno err =
llhttp_execute(&state->parser, data.data(), data.size()); llhttp_execute(&state->parser, data.data(), data.size());