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
Dealing with large requests: possibility to set max_incomplete_event_size for h11 #1234
Comments
Yeah, some time ago I was reviewing the The default value is explained on PR is welcome, but let's use the same strategy that we use with other CLI arguments: if the argument is not used, just ignore it. Also, the "describe alternatives you considered" is meant to be an alternative solution that we can use to solve the problem in hands. Have you also tried the |
I confess I haven't tried the |
Doesn't this also applies to large query string? |
So, there is a trade-off with #1240 - which is that although it's a very nicely worked on PR. It also adds more configuration controls, which really we ought to try to avoid if at all possible. More configurability means more different things for folks to read and understand when they're looking for whatever they do actually need. It might not be a bad idea for us to just talk through your actual use-case here. Can you provide an example of why you need super large headers, and give an indication of what kind of size-range you're expecting? A useful thing for us to then do would be just to have a bit of a look into what other clients or servers would (or wouldn't) support your use case. So we can make a more informed call on if we want to add configurability here or not. |
My application was sitting behind an SSO proxy which passed the user's information in headers. This information includes the groups that a user is a member of, which my application uses for some sharing features. Some users can be members of a huge number of groups, which results in a very large header that uvicorn is currently unable to deal with. Since h11 already supports configuring this, I thought it would be worthwhile to actually expose this through uvicorn to make it useful. It seems I'm in the minority on this, though, and I've since moved on and no longer need this feature. |
I can review it if you continue the previous implementation. I've written some comments over there. |
thanks.. will do.. |
Be aware that I'd need to study this issue again, so it's not a promise of merging it. But if you work on the PR, I'll try my best to follow up. |
…1514) * Solves #1234 * Update docs/settings.md Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com> * Update uvicorn/main.py Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com> * Fix lint * Fixing tests * Tweak tests a bit * Remove event_loop fixture Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This was solved by #1514, and it's available since |
…ncode#1514) * Solves encode#1234 * Update docs/settings.md Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com> * Update uvicorn/main.py Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com> * Fix lint * Fixing tests * Tweak tests a bit * Remove event_loop fixture Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
…1514) * Solves #1234 * Update docs/settings.md Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com> * Update uvicorn/main.py Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com> * Fix lint * Fixing tests * Tweak tests a bit * Remove event_loop fixture Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Checklist
(Asked in the chat, but no response received)
Is your feature related to a problem? Please describe.
I'm working on an application that needs to deal with large http headers, but I'm getting the following exception:
Describe the solution you would like.
This error could be fixed if I was able to configure the
max_incomplete_event_size
of the h11 connection:https://github.com/python-hyper/h11/blob/master/h11/_connection.py#L119
Describe alternatives you considered
For the time being, I've moved to Hypercorn which does allow me to change that parameter.
Additional context
The text was updated successfully, but these errors were encountered: