theelous3 / asks

Async requests-like httplib for python.
MIT License
508 stars 63 forks source link

Don't require Content-Length header if response is HTTP/1.0 #167

Closed ehaas closed 4 years ago

ehaas commented 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

theelous3 commented 4 years ago

Just the one little semi-aesthetic change, and we merge :)

ehaas commented 4 years ago

Updated!

theelous3 commented 4 years ago

Hm. Idk why it's not showing the tests here, but they are passing:

https://travis-ci.org/github/theelous3/asks/builds/703359583