Closed ehaas closed 4 years ago
HTTP/1.0 responses do not require a Content-Length header; see here: https://tools.ietf.org/html/rfc1945#section-7.2.2 (content length is implicitly defined by the closing of the connection)
Therefore if no Content-Length is present, and the response version is 1.0, read the response body.
Fixes #159
Just the one little semi-aesthetic change, and we merge :)
Updated!
Hm. Idk why it's not showing the tests here, but they are passing:
https://travis-ci.org/github/theelous3/asks/builds/703359583
HTTP/1.0 responses do not require a Content-Length header; see here: https://tools.ietf.org/html/rfc1945#section-7.2.2 (content length is implicitly defined by the closing of the connection)
Therefore if no Content-Length is present, and the response version is 1.0, read the response body.
Fixes #159