Paul J. Dorn 2bc931e7d9 whitespace handling in header field values
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.
2024-08-07 19:42:16 +02:00

11 lines
336 B
Python

from gunicorn.config import Config
from gunicorn.http.errors import LimitRequestHeaders
request = LimitRequestHeaders
cfg = Config()
cfg.set('limit_request_field_size', 14)
# once this option is removed, this test should not be dropped;
# rather, add something involving unnessessary padding
cfg.set('permit_obsolete_folding', True)