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

Fail-fast on too-big request sizes when possible #37

Closed
nicmunroe opened this issue Mar 22, 2017 · 3 comments
Closed

Fail-fast on too-big request sizes when possible #37

nicmunroe opened this issue Mar 22, 2017 · 3 comments

Comments

@nicmunroe
Copy link
Member

Following on to issue #27, we should fail-fast when the request has a content-length greater than the configured max-allowed-request-size value. Currently the failure only happens after we've actually received enough bytes to go over the threshold. This change cannot affect chunked encoding requests since they don't include a content-length header.

@blling
Copy link

blling commented Apr 2, 2017

Netty4.1 "New and Noteworthy" documented a improvement:
Better oversized message handling with HttpObjectAggregator

In 4.0, there was no way to reject an oversized HTTP message before a client sends the content even if 100-continue header was present.

This release adds an overridable method called handleOversizedMessage so that a user can perform his or her preferred task. By default, it responds with '413 Request Entity Too Large' response and closed the connection

Should this be helpful for no content-length case?
And any plans to update to netty 4.1?

@nicmunroe
Copy link
Member Author

@vicbevis Riposte doesn't use HttpObjectAggregator for various reasons (mainly support for chunk-streaming for ProxyRouterEndpoints so we don't have to pull in the full payload, but other reasons as well), so that unfortunately doesn't help.

@rabeyta
Copy link
Contributor

rabeyta commented Jun 13, 2017

fixed in 0.10.0

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

No branches or pull requests

3 participants