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
http 204 causes gunicorn shutdown on appengine [BUG] #1458
Comments
Can confirm this happens on standalone uvicorn 0.11.8 as well.
If you I'm not sure if this is a bug in FastAPI, Starlette or h11, or which of them interprets the empty string as a literal |
looks like a no-content fastapi bug... @app.delete("/", status_code=204, response_class=Response)
... |
Thanks, I can confirm that workaround works for me. Happy for this to be closed, but will leave that up to maintainers. |
Hi. Finally ! After a week of hard work 🤯 , I finally find this issue. It solves my problem. Thank you |
Thanks for the report here @therefromhere! It seems this was handled in #5145, available since FastAPI If that solves it, you could close the issue. Thanks! 🍰 |
Thanks @tiangolo , yes confirming this is fixed now |
Describe the bug
I've found that a simple endpoint with status_code=204 is causing gunicorn to shutdown when running on Google appengine.
I suspect the bug is probably outside of FastAPI (eg maybe in uvicorn?), but I haven't yet managed to reproduce it with a simpler stack, and maybe this will help others with the same issue.
To Reproduce
main.py:
requirements.txt:
app.yaml:
And logs as follows:
Note - changing status code to something else, eg 200 resolves the issue.
Expected behavior
I expected an empty 204 response to be returned.
Environment
OS: Linux (appengine)
FastAPI Version
0.54.2
3.7 (whatever as used by appengine)
See also
Cross-post on the appengine issue tracker https://issuetracker.google.com/issues/157312477
The text was updated successfully, but these errors were encountered: