Error: Receive buffer too long - Response header greater than 16kB #2520
-
Hi, I have recently replace requests with httpx and have encountered an issue when the server responds with a large response header. I was wondering if the httpx client created can be configurable similar to what was done in uvicorn: encode/uvicorn#1514 I was able to get around this by creating a custom transport similar to the default HTTPTransport and setting the H11 Connection with a greater size. I have attached the custom transport as a reference. I had tried to patch h11 DEFAULT_MAX_INCOMPLETE_EVENT_SIZE prior to import httpx to no avail.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Yup, I think we could increase the Their limit is 1024 * 100. We can either fix this by changing the default in Which of those two approaches do we think is more reasonable? |
Beta Was this translation helpful? Give feedback.
Yup, I think we could increase the
max_incomplete_event_size
that we use.Having the same value that
curl
uses would be reasonable.Their limit is 1024 * 100.
Our limit is currently 1024 * 16.
We can either fix this by changing the default in
h11
, or by changing the configuration inhttpcore
, which can acceptmax_incomplete_event_size=...
as you've done in this example.Which of those two approaches do we think is more reasonable?