bvanderveen/httpmachine — pull request #6 by mcunha (2012-03-28 14:28:05+00:00)
Title: Fixes for HTTP 1.0 not working when Content-Length not given

HTTP 1.0 requests where hanging when Content-Length was not provided due to ShouldKeepAlive being false and parser waiting for end of request body.

Fixes include:
- Do not wait for a request body [that may not arrive] when Content-Length (CL) is missing and Transfer-Encoding (TE) are missing.
- Fix test to follow standard more closely, a POST request without CL or TE should not be accepted (HTTP 400 or 411), so Body should be null as it was ignored.

* Failure to provide CL is a violation of HTTP/1.0 and failure to provide CL AND TE is a violation of HTTP/1.1 and should result in HTTP 400 or 411.