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

Reset ignoreContentModifiers if incoming/outgoing Upgrade does not succeed #2119

Closed
wants to merge 1 commit into from

Conversation

scholzi100
Copy link

Fixes #2117 and #1972

If a request with a payload and Upgrade header is received but the server has no filter to handle this specific upgrade the connection times out.

ReaderWriter#readFromAsString(java.io.Reader) does block because of the underlying Buffer. Its calls to InputBuffer#read* then InputBuffer#fill()* blocks since ignoreContentModifiers was set true in
onIncomingUpgrade* and was never reset on the upgrade path.

Reset ignoreContentModifiers after upgrade. This may not be a appropriate fix.

Unit test for the Upgrade case should be added.

Signed-off-by: Paul Scholz <paul.scholz@scholzi100.de>
@scholzi100 scholzi100 changed the title Reset ignoreContentModifiers if incomming/uutgoing Upgrade does not succeed Reset ignoreContentModifiers if incomming/outgoing Upgrade does not succeed Nov 29, 2020
@scholzi100 scholzi100 changed the title Reset ignoreContentModifiers if incomming/outgoing Upgrade does not succeed Reset ignoreContentModifiers if incoming/outgoing Upgrade does not succeed Nov 29, 2020
@mnriem
Copy link
Contributor

mnriem commented Aug 26, 2023

@scholzi100 Is this PR still relevant?

@arjantijms arjantijms closed this Sep 7, 2023
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 this pull request may close these issues.

HTTP Upgrade header causes reading of payload to block, clients timeout if no upgrade filter is available
3 participants