hyperium / http

Rust HTTP types
Apache License 2.0
1.12k stars 283 forks source link

`index out of bounds` when parsing a valid header value #704

Closed IgnisDa closed 2 weeks ago

IgnisDa commented 2 weeks ago

I am trying to parse a valid header (used by IGDB):

const INVALID_NAME: HeaderName = HeaderName::from_static("Client-ID");

I get this error:

image

For context, nodejs says this is a valid header: image

IgnisDa commented 2 weeks ago

Fortunately IGDB does accept client-id as the header.

IgnisDa commented 2 weeks ago

NVM, the docs clearly say:

This function requires the static string to only contain lowercase characters, numerals and symbols, as per the HTTP/2.0 specification and header names internal representation within this library.