-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
configure header size limit for warp #5441
configure header size limit for warp #5441
Conversation
@tirumaraiselvan I don't think we should change the default. Make it customisable? |
f8e88f4
to
070f223
Compare
@0x777 I have made it configurable now. |
070f223
to
0f0215b
Compare
Currently, waiting on some triage in warp bug: yesodweb/wai#807 |
I've set up a PR for the yesodweb/wai#807 issue. |
yesodweb/wai#807 has been fixed with yesodweb/wai#838 The calculation of header length was wrong in such a way that it could trigger at different sizes (it might let 30kb pass, or it might throw an exception) depending on how large the header chunks are and how many of them there are. |
Really need this one... any ETA for the merge? |
@tirumaraiselvan The |
Hey folks, apologies for the tardiness on this. We are going to get this in soon. |
Closing this PR because the issue has been addressed in 3124c93. |
Description
Warp's default total header limit size for HTTP 1.x is 50KB which turns out to be little low (reported in Intercom). See: https://hackage.haskell.org/package/warp-3.3.13/docs/src/Network.Wai.Handler.Warp.Settings.html#defaultSettings
This increases the header limit size to 100KB and makes it configurable.
Changelog
CHANGELOG.md
is updated with user-facing content relevant to this PR. If no changelog is required, then add theno-changelog-required
label.Affected components
Steps to test and verify
curl -v -H @temp.log localhost:8080/v1/version
where temp.log is a header file greater than 50KB. In prior versions, this will throw a bad request.