mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Strip whitespace also *after* header field value. Simply refuse obsolete header folding (a default-off option to revert is temporarily provided). While we are at it, explicitly handle recently introduced http error classes with intended status code.
17 lines
321 B
Python
17 lines
321 B
Python
from gunicorn.http.errors import ObsoleteFolding
|
|
from gunicorn.config import Config
|
|
|
|
cfg = Config()
|
|
cfg.set('permit_obsolete_folding', True)
|
|
|
|
request = {
|
|
"method": "GET",
|
|
"uri": uri("/"),
|
|
"version": (1, 1),
|
|
"headers": [
|
|
("LONG", "one two"),
|
|
("HOST", "localhost"),
|
|
],
|
|
"body": b""
|
|
}
|