Skip to content
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

ConnectHandler may close the connection instead of sending 200 OK #9183

Closed
sbordet opened this issue Jan 17, 2023 · 0 comments · Fixed by #9184
Closed

ConnectHandler may close the connection instead of sending 200 OK #9183

sbordet opened this issue Jan 17, 2023 · 0 comments · Fixed by #9184
Labels
Bug For general bugs on Jetty side Sponsored This issue affects a user with a commercial support agreement

Comments

@sbordet
Copy link
Contributor

sbordet commented Jan 17, 2023

Jetty version(s)
10+

Description
In case of HTTP CONNECT tunnelling with HTTP/1.1, the upstream server may close the connection immediately.
In such case, there is a race condition trying to write the 200 OK (for a successful tunnel establishment) and closing the connection (because the server closed it immediately).

The client may not see the 200 OK that it is supposed to see, and just see the connection closed.

@sbordet sbordet added Bug For general bugs on Jetty side Sponsored This issue affects a user with a commercial support agreement labels Jan 17, 2023
sbordet added a commit that referenced this issue Jan 17, 2023
…ing 200 OK.

Delaying the call to UpstreamConnection.fillInterested() until the 200 OK response has been sent.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
sbordet added a commit that referenced this issue Jan 19, 2023
#9184)

* Fixes #9183 - ConnectHandler may close the connection instead of sending 200 OK.

Delaying the call to UpstreamConnection.fillInterested() until the 200 OK response has been sent.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side Sponsored This issue affects a user with a commercial support agreement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant