]> git.ipfire.org Git - thirdparty/tornado.git/commit
http1connection: Improve error logging for invalid host headers 3521/head
authorBen Darnell <ben@bendarnell.com>
Tue, 22 Jul 2025 17:54:03 +0000 (17:54 +0000)
committerBen Darnell <ben@bendarnell.com>
Tue, 22 Jul 2025 20:35:14 +0000 (20:35 +0000)
commit44aac917728caf855d6acbb42f8001ca03810509
treec99d6baa1c12bc29ad34ace7743ce8012645da00
parentd3bf1ee425a6d44f9e57c21a3763860f60babd8c
http1connection: Improve error logging for invalid host headers

This was previously being logged as an uncaught exception in application
code, which is wrong for a malformed request. HTTPInputError now passes
through the app-error logging to be caught and reported as a 400
(which logs at the warning level to the access log and info to the
general log).

Fixes #3510
tornado/http1connection.py
tornado/routing.py
tornado/test/httpclient_test.py
tornado/test/httpserver_test.py