Minor fix of streambuf size check in chunked transfer
This commit is contained in:
parent
84455ac966
commit
1bc0b9a779
2 changed files with 2 additions and 2 deletions
|
|
@ -613,7 +613,7 @@ namespace SimpleWeb {
|
|||
return;
|
||||
}
|
||||
|
||||
if(chunk_size + session->request->streambuf.size() > session->request->streambuf.max_size()) {
|
||||
if(2 + chunk_size + session->request->streambuf.size() > session->request->streambuf.max_size()) {
|
||||
auto response = std::shared_ptr<Response>(new Response(session, this->config.timeout_content));
|
||||
response->write(StatusCode::client_error_payload_too_large);
|
||||
if(this->on_error)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue