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

When using Netty, an invalid content-type header value causes request to get stuck when compression is enabled #18018

Closed
wilkinsona opened this issue Aug 30, 2019 · 3 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

See spring-cloud/spring-cloud-gateway#1111. We should make our predicate more robust by returning false for a malformed mime type in the Content-Type header rather than throwing an exception.

@dreis2211
Copy link
Contributor

This got me thinking if this should be done for Jetty, Undertow etc. as well, @wilkinsona ? I'm asking because out of interest I was working on a fix as well, but Jetty seems to hang indefinitely - for reasons that I can't explain yet. Can be reproduced by moving the new test from NettyReactiveWebServerFactoryTests to AbstractReactiveWebServerFactoryTests. Tomcat seems to work out of the box, Undertow seems to work despite having the same MimeType parsing as Netty in UndertowCompressionConfigurer. Might be worth a look?

@dreis2211
Copy link
Contributor

While I was working on the fix I also tried this for the servlet based tests and got them to run with similar changes as in 3d23277. Is it worth sharing a PR for the servlet based stuff at least?

@dreis2211
Copy link
Contributor

Just saw spring-projects/spring-framework#23553 - seems like we had the same problem then ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants