RuntimeError: Response content longer than Content-Length #2670
Unanswered
saddy001
asked this question in
Potential Issue
Replies: 1 comment 5 replies
-
|
hi @saddy001 |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is uvicorn==0.34.0 with FastAPI. In some rare cases I get the above exception. I have read #1442 and I'm not sure if the clients request incomplete content. All I can tell is the clients should be usual web browsers.
Since I collect the local variables beneth the traceback I had a look at what's being sent and there are some special characters being sent as bytes (see traceback with variables below):
body = b'1\n00:00:00,000 --> 00:00:01,900\n\xe9\x80\x99\xe5\x80\x8b\xe7\xbe\x8e\xe9\xba\x97\xe7\x9a\x84\xe5\xa5\xb3\xe5\xad\xa9\xe5\x8f\xab\xe5 ...Maybe the content length is calculated incorrectly with those characters?
The traceback:
The traceback with variables:
Beta Was this translation helpful? Give feedback.
All reactions