Skip to content

Commit

Permalink
Merge pull request #261 from jbr/parse-method-case-insensitively
Browse files Browse the repository at this point in the history
make `Method` parse case insensitively
  • Loading branch information
yoshuawuyts authored Oct 26, 2020
2 parents 9127b5f + 648c84a commit 18b86df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl FromStr for Method {
type Err = crate::Error;

fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
match &*s.to_ascii_uppercase() {
"GET" => Ok(Self::Get),
"HEAD" => Ok(Self::Head),
"POST" => Ok(Self::Post),
Expand Down

0 comments on commit 18b86df

Please sign in to comment.