]> git.ipfire.org Git - thirdparty/tornado.git/commit
httputil: Make parse_request_start_line stricter
authorBen Darnell <ben@bendarnell.com>
Thu, 27 Mar 2025 20:30:08 +0000 (16:30 -0400)
committerBen Darnell <ben@bendarnell.com>
Thu, 27 Mar 2025 20:59:52 +0000 (16:59 -0400)
commit88344aef46861c41202ec361bdf9640afadfb95d
treebffceae2a282d0947af321a32dca08f21d13363e
parent1cfc0d127a287cd732ff9f5419450a7ce1163454
httputil: Make parse_request_start_line stricter

The method is now restricted to being valid token characters as defined
in RFC 9110, allowing us to correctly issue status code 400 or 405
as appropriate (this can make a difference with some caching proxies).

The request-target no longer allows control characters. This is less
strict than the RFC (which does not allow non-ascii characters),
but prioritizes backwards compatibility.

Fixes #3415
Closes #3338
tornado/httputil.py