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
Connection: close
breaks streaming responses
#20236
Comments
Http 1.0 doesn't support transfer-encoding chunked? |
Update: I was wrong. Here is the response
@viktorklang
|
@2Beaucoup I should've know better than to trust the title of the Issue… :) If it is as you say, then I guess the problem is that the short-circuit is too eager and needs to wait for completion before tearing down the connection. |
@viktorklang I really shouldn't use the word chunked just because the streaming response entity. Sorry for that. So, the reason why server returns a CloseDelimited response is because I send a HTTP 1.0 request, right? I can by pass this problem if I send all request with HTTP 1.1 protocol, can you confirm this? |
@zhxiaogg No worries, I was only joking :) |
@viktorklang please see my update above. The response is indeed chunked as a result of using the The problem is the connection closing and the failure also happens with HTTP 1.1 if an |
@2Beaucoup I'm surprised that there is no test which verifies this behavior. |
@viktorklang Me too! ;) I added one here. |
If the client signals only HTTP/1.0 capabilities the server is actually not allowed to respond with an HTTP/1.1 response.
Yes.
Yes. |
https://tools.ietf.org/html/rfc2145#section-2.3 suggests otherwise:
Question is: Should the server reply with |
@2Beaucoup How could it? chunked belongs to the 1.1 spec, and a client communicating using 1.0 shouldn't be expected to understand a newer protocol specification. |
Yes, true. My statement from before was misleading. |
See the test case linked above. It doesn't work for HTTP 1.1 as well, when sent with |
@2Beaucoup Yes, there may be a problem in the current implementation. I was thinking about the what the right behavior should be. |
Makes sense. |
Sorry for leading the discussion in the wrong direction. The issue here is solely that the response entity substream can't be consumed if |
@2Beaucoup No prob at all. Thanks for digging through this! |
No prob @sirthias. FTR: The problematic change seems to be e3ee285#diff-9d641a9b26bb92cd487f4e6c81832424R186. |
Connection: close
breaks streaming responses
Hi, below is the complete unit test I used, and it will success if I replace the request protocol from
HTTP 1.0
toHTTP 1.1
. See also https://groups.google.com/forum/#!topic/akka-user/wa5UIB95SWA with detail log.The text was updated successfully, but these errors were encountered: