http
http copied to clipboard
Block leading and trailing whitespace in field values
This blocks header values with leading and trailing whitespace. This is not needed for HTTP/1.x where the parser already strips such whitespace, but in HTTP/2 and HTTP/3 the parser does not strip such whitespace and so it is up to the http crate to reject such headers.
Different HTTP/2 and HTTP/3 libraries treat such values differently, so rejection is the safest option.
Fixes #245
I converted this to draft as it is missing tests.
This is an up-to-date version of #256, but without tests and without the more useful error messages.