http-rs / http-types

Common types for HTTP operations
https://docs.rs/http-types
Apache License 2.0
200 stars 83 forks source link

Change hard-coded headernames to lowercase #386

Open halvko opened 2 years ago

halvko commented 2 years ago

The change at line 114 in src/security/mod.rs corrects a logic error, the rest is at best a small optimization and at worst a style choice

halvko commented 2 years ago

As I understand it, headers are not case agnostic for HTTP/2 connections “However, header field names MUST be converted to lowercase prior to their encoding in HTTP/2” (https://httpwg.org/specs/rfc7540.html#HttpHeaders).

halvko commented 2 years ago

And the documentation for ‘HeaderName::from_lowercase_str’ specifically states that the input is expected to be lowercase