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
Send 204 as HTTPError #3360
Comments
pawciobiel
added a commit
to pawciobiel/tornado
that referenced
this issue
Feb 16, 2024
Change `write_error()` to not send body if status code in (204, 304) or (100 <= status code < 200) - refactored into `RequestHandler._should_not_send_content(status_code)` Change `get_arguments()` to raise `ValueError` if `strip` is not boolean - as opposed to `AssertionError`. Fixes tornadoweb#3360
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Occasionally it is useful to send HTTP204 via exception
raise HTTPError(204)
.Also when run with
python -O
assertions are removed causing the check for no content useless.But the response buffer has value:
The text was updated successfully, but these errors were encountered: