-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP 1.0 response without Content-Length header is not properly handled #159
Comments
ehaas
added a commit
to lagerdata/asks
that referenced
this issue
Jun 25, 2020
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 theelous3#159
ehaas
added a commit
to lagerdata/asks
that referenced
this issue
Jun 25, 2020
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 theelous3#159
ehaas
added a commit
to lagerdata/asks
that referenced
this issue
Jun 30, 2020
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 theelous3#159
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
First thank you a lot for your work!
Then, when I was writting unittest for my code which is using asks, I ran into (what I think is) a bug.
I used http.server which is HTTP 1.0 by default and which is not sending Content-Length header (spec says server doesn't have to on response if its closes the connection at the end of the message).
asks doesn't seems to cope with that:
Here is an example to reproduce the bug:
(if you uncomment the content-length line all will be fine)
I think this issue : #136 may be the same (at first my server was serving ssl and the error was looking the same than that)
Best regards,
Emilie.
The text was updated successfully, but these errors were encountered: