test: add failing fixture for authority-form with non-CONNECT method

This commit is contained in:
Benoit Chesneau 2026-04-19 11:09:29 +02:00
parent e3ba1e07fa
commit e7fd6a104f
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,3 @@
GET example.com:443 HTTP/1.1\r\n
Host: example.com:443\r\n
\r\n

View File

@ -0,0 +1,10 @@
#
# This file is part of gunicorn released under the MIT license.
# See the NOTICE for more information.
# RFC 9112 section 3.2.3: authority-form ("host:port") is only valid with
# the CONNECT method. Any other method carrying it must be rejected.
from gunicorn.http.errors import InvalidRequestLine
request = InvalidRequestLine
# The C parser (gunicorn_h1c) does not yet enforce this rule.
python_only = True