http icon indicating copy to clipboard operation
http copied to clipboard

Block leading and trailing whitespace in field values

Open DemiMarie opened this issue 9 months ago • 2 comments

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

DemiMarie avatar Mar 26 '25 19:03 DemiMarie

I converted this to draft as it is missing tests.

DemiMarie avatar Apr 21 '25 07:04 DemiMarie

This is an up-to-date version of #256, but without tests and without the more useful error messages.

DemiMarie avatar May 22 '25 22:05 DemiMarie