Dealing with large requests: possibility to set max_incomplete_event_size for h11
See original GitHub issueChecklist
- There are no similar issues or pull requests for this yet.
- I discussed this idea on the community chat and feedback is positive. (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:
WARNING: Invalid HTTP request received.
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 136, in handle_events
event = self.conn.next_event()
File "/usr/local/lib/python3.9/site-packages/h11/_connection.py", line 432, in next_event
raise RemoteProtocolError(
h11._util.RemoteProtocolError: Receive buffer too long
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
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Deployment - Uvicorn
To see the complete set of available options, use uvicorn --help : ... --h11-max-incomplete-event-size INTEGER For h11, the maximum number of bytes to ......
Read more >API documentation — h11 0.14.0+dev documentation
max_incomplete_event_size (int) – The maximum number of bytes we're willing to buffer of an incomplete event. In practice this mostly sets a limit...
Read more >Read/write capacity mode - Amazon DynamoDB
If your application reads or writes larger items (up to the DynamoDB maximum item size of 400 KB), it will consume more capacity...
Read more >Invalid cloud configuration command received and ignored
The configuration for an antivirus setup is done by defining rules. ... --h11-max-incomplete-event-size INTEGER For h11, the maximum number of bytes to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
I can review it if you continue the previous implementation. I’ve written some comments over there.