You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make authorization schemes case and whitespace insensitive (hyperium#153)
* Make authorization schemes case and whitespace insensitive
According to RFC7235[1]:
> It uses a case-
> insensitive token as a means to identify the authentication scheme,
> followed by additional information necessary for achieving
> authentication via that scheme.
[1]: https://datatracker.ietf.org/doc/html/rfc7235#section-2.1
* Use eq_ignore_ascii_case() for Authorization schemes
This is effectively the same as comparing the result of
`to_ascii_lowercase()`, with the benefit of avoiding "allocating and
copying temporaries" (according to the Rust `std` docs[1]).
[1]: https://doc.rust-lang.org/std/primitive.slice.html#method.eq_ignore_ascii_case
---------
Co-authored-by: Simon Bihel <[email protected]>
0 commit comments