-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make authorization schemes case and whitespace insensitive (#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 <simon.bihel@spruceid.com>
- Loading branch information
Showing
1 changed file
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters