Fix statistics channel multiple request processing with non-empty HTTP bodies
Fix statistics channel multiple request processing with non-empty bodies
When the HTTP request has a body part after the HTTP headers, it is not getting processed and is being prepended to the next request's data, which results in an error when trying to parse it.
Improve the httpd.c:process_request() function with following additions:
- Require that HTTP POST requests must have Content-Length header.
- When Content-Length header is set, extract its value, and make sure that it is valid and that the whole request's body is received before processing the request.
- Discard the request's body by consuming Content-Length worth of data in the buffer.
Closes #3463 (closed)
Edited by Arаm Sаrgsyаn