Skip to content

Commit 18b86df

Browse files
authored
Merge pull request #261 from jbr/parse-method-case-insensitively
make `Method` parse case insensitively
2 parents 9127b5f + 648c84a commit 18b86df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl FromStr for Method {
7070
type Err = crate::Error;
7171

7272
fn from_str(s: &str) -> Result<Self, Self::Err> {
73-
match s {
73+
match &*s.to_ascii_uppercase() {
7474
"GET" => Ok(Self::Get),
7575
"HEAD" => Ok(Self::Head),
7676
"POST" => Ok(Self::Post),

0 commit comments

Comments
 (0)