You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
[b'<html><title>204: No Content</title><body>204: No Content</body></html>']
Traceback (most recent call last):
File "/home/pgb/.local/lib/python3.10/site-packages/tornado/web.py", line 1791, in _execute
self._handle_request_exception(e)
File "/home/pgb/.local/lib/python3.10/site-packages/tornado/web.py", line 1846, in _handle_request_exception
self.send_error(e.status_code, exc_info=sys.exc_info())
File "/home/pgb/.local/lib/python3.10/site-packages/tornado/web.py", line 1298, in send_error
self.finish()
File "/home/pgb/.local/lib/python3.10/site-packages/tornado/web.py", line 1219, in finish
assert not self._write_buffer, (
AssertionError: Cannot send body with 204
The text was updated successfully, but these errors were encountered:
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`.
Fixestornadoweb#3360
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`.
Fixestornadoweb#3360
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)`
Fixestornadoweb#3360
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: