eclipse-ee4j / grizzly

Grizzly
https://eclipse-ee4j.github.io/grizzly
Other
147 stars 69 forks source link

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

Closed scholzi100 closed 1 year ago

scholzi100 commented 3 years ago

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.

mnriem commented 1 year ago

@scholzi100 Is this PR still relevant?