]> git.ipfire.org Git - thirdparty/tornado.git/commit
http1connection: Improve error logging for invalid host headers 3527/head
authorBen Darnell <ben@bendarnell.com>
Tue, 22 Jul 2025 17:54:03 +0000 (17:54 +0000)
committerBen Darnell <ben@bendarnell.com>
Thu, 7 Aug 2025 20:44:03 +0000 (16:44 -0400)
commitc0d3e6df84344ec0aea2a9f9257aba76db78ca25
treee840ec28f743063f69e0ff01b8e42ac13e475afc
parent4ff5594ffd71c6dc9c82b0f003d63ed543a8e6d3
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