mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
allow unknown HTTP methods
This commit is contained in:
parent
2799b4eac9
commit
b98635f212
5 changed files with 1 additions and 43 deletions
|
@ -462,17 +462,7 @@ fn normalize_method(m: &str) -> HttpMethod {
|
|||
|
||||
// https://fetch.spec.whatwg.org/#concept-method
|
||||
fn is_method(m: &ByteString) -> bool {
|
||||
match m.to_lower().as_str() {
|
||||
Some("get") => true,
|
||||
Some("head") => true,
|
||||
Some("post") => true,
|
||||
Some("put") => true,
|
||||
Some("delete") => true,
|
||||
Some("connect") => true,
|
||||
Some("options") => true,
|
||||
Some("trace") => true,
|
||||
_ => false,
|
||||
}
|
||||
m.as_str().is_some()
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#forbidden-method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue