Skip to content

Commit 648c84a

Browse files
committed
make Methods parse case insensitively
this is a small performance regression but other than that there's no reason _not_ to accept lowercase methods
1 parent 4165546 commit 648c84a

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)