-
Notifications
You must be signed in to change notification settings - Fork 28
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
HtWire hangs until connection is closed remotely #62
Comments
@0crat in |
Job #62 is now in scope, role is |
@llorllale Job #62 is already in scope |
Bug was reported, see §29: +15 point(s) just awarded to @llorllale/z |
@llorllale/z not enough funds available in the project, can't set budget of job #62, see §21; @llorllale/z will get no money on completion; in order to fix that, add funds to the project and assign the job again |
Manual assignment of issues is discouraged, see §19: -5 point(s) just awarded to @llorllale/z |
It is strongly discouraged to assign jobs to their creators, see §19: -15 point(s) just awarded to @llorllale/z |
Keep in mind that our goals [1] do not include implementing every feature offered by other HTTP libs. With that said: Work to be done
AlternativesAs noted in the description, a workaround would be for the sender to manually include the new HtResponse(
new HtWire("somehost"),
new JoinedText(
"\r\n",
"GET /some/resource HTTP/1.1",
"Host: somehost",
"Connection: close\r\n"
).asString()
) The problems I see with this are:
[1] Goals not written anywhere. There is only a vague statement in the |
is not closed when returning from #send(), and for implementing HtResponse decorators that will enable us to decide when to close connection on our end.
@llorllale 2 puzzles #63, #64 are still not solved. |
@llorllale left puzzles in 795e57c |
Order was finished: +30 point(s) just awarded to @llorllale/z |
The job #62 is now out of scope |
@llorllale 2 puzzles #64, #78 are still not solved; solved: #63. |
Test case:
The code above will hang until the remote service sends a TCP packet with the FIN flag.
The fundamental question here is: how do we tell that we have already received the entire HTTP response and thus avoid having to wait until the remote service ends the connection themselves?
We can start with section 3.3.3 of RFC7230.
Edit: can be avoided by sending the
Connection: close
header (remote service needs to behave well; usually not a problem though)The text was updated successfully, but these errors were encountered: