-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
akka http client Half-Closes connections, which isn't fully supported by the server #16510
Comments
Thanks a lot @Joe-Edwards for reporting. |
I think we have to eliminate it, or at least make it off-by-default. This behaviour, while it is apparently valid and seems to make sense, is not supported by most web servers. If Tomcat and other popular servers are "type B" (as per the above link), then Akka can't be a "type 1" client by default. |
Http client should not use the half-close feature, but Akka TCP must. So I guess it should be a programmatic setting for Akka TCP that HTTP just always sets to "no please" internally. |
Good point. This may even need to be handled at the HTTP layer, rather than being a TCP setting. The "type 2" client is defined in terms of the HTTP responses, not in terms of the receive TCP stream. |
/cc @sirthias |
Agreed, HTTP doesn't support half-closed connection (which SSL does neither) and we should fix this in the http-core layer. |
And btw: bonus points for you, @Joe-Edwards, for adding credence to this ticket by referring to a W3C ML post by @milessabin from 2001. 👏 |
And now I feel very old ... :-( |
This is the fix for akka#16510 on the server-side.
This is the fix for akka#16510 on the server-side.
This is the fix for akka#16510 on the server-side.
My akka http client looks like:
The TCP layer is doing a half-close (sending a [FIN, ACK]) once the request is sent, and before the response arrives. This isn't forbidden by HTTP, but some servers including the akka http server appear to interpret this as an error and drop the connection, this means the response is never sent.
There is an interesting discussion of the concept at http://lists.w3.org/Archives/Public/ietf-http-wg-old/2001JanApr/0037.html and a related thread https://groups.google.com/forum/#!topic/akka-user/KrNFinhHN6o
I suggest a config option to disable this half-close behaviour, or just eliminate it entirely. At the very least I would expect the server-side code to handle it!
The text was updated successfully, but these errors were encountered: