Skip to content

uvicorn's "Response content longer than Content-Length" RuntimeError for DELETE endpoints #1635

Answered by Kludex
slafs asked this question in Potential Issue
Discussion options

You must be logged in to vote

This is not a uvicorn issue. Uvicorn does what is right here.

Starlette could document better the JSONResponse interaction with status codes that should not have any content. In this case what is happening is that Starlette's JSONResponse is sending 4 bytes (null), but there's no Content-Length header, and the status code is 204.

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@Kludex
Comment options

@Kludex
Comment options

@snosratiershad
Comment options

@Kludex
Comment options

@snosratiershad
Comment options

Answer selected by Kludex
Comment options

You must be logged in to vote
3 replies
@Kludex
Comment options

@snosratiershad
Comment options

@Kludex
Comment options

Comment options

tiangolo
Jul 14, 2022
Collaborator Sponsor

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants