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

Timeout with Expect 100 continue when using ProxyServlet #7117

Closed
dejpec opened this issue Nov 15, 2021 · 1 comment · Fixed by #8873
Closed

Timeout with Expect 100 continue when using ProxyServlet #7117

dejpec opened this issue Nov 15, 2021 · 1 comment · Fixed by #8873

Comments

@dejpec
Copy link
Contributor

dejpec commented Nov 15, 2021

Jetty version
9.4.43, 9.4.44

Java version
OpenJDK 11

OS type/version
Windows 10

Description
I am using embedded jetty version 9.4.43 and use ProxyServlet to reverse proxy requests to the server.
A servlet behind this proxy which reads all lines causes a timeout when Expect: 100-continue is set.
If servlet reads all bytes binary it works. Whithout reverse proxy the servlet works also.
This Example shows the problem.

@sbordet
Copy link
Contributor

sbordet commented Nov 8, 2022

Thank you for the reproducer, it is a bug: since we recycle the reader, we don't execute the code to send the 100 continue for the second request.

sbordet added a commit that referenced this issue Nov 8, 2022
Now getReader() tests whether it has to send a 100 continue in case getInputStream() is not called.

Signed-off-by: Simone Bordet <[email protected]>
sbordet added a commit that referenced this issue Nov 9, 2022
Restored override of close() to avoid permanent closure of the Reader.

Signed-off-by: Simone Bordet <[email protected]>
sbordet added a commit that referenced this issue Nov 9, 2022
…t. (#8873)

* Fixes #7117 - Timeout with Expect 100 continue when using ProxyServlet.

Now getReader() tests whether it has to send a 100 continue in case getInputStream() 
is not called because the reader is reused.

Signed-off-by: Simone Bordet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants