mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
||||
|
|
|
@ -39,12 +39,6 @@
|
|||
[Fetch with Chicken with body]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with TacO and mode "same-origin" needs an Origin header]
|
||||
expected: FAIL
|
||||
|
||||
[Fetch with TacO and mode "cors" needs an Origin header]
|
||||
expected: FAIL
|
||||
|
||||
|
||||
[request-headers.any.worker.html]
|
||||
type: testharness
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
[cors-preflight-star.any.html]
|
||||
type: testharness
|
||||
[CORS that succeeds with credentials: false; method: SUPER (allowed: *); header: X-Test,1 (allowed: x-test)]
|
||||
expected: FAIL
|
||||
|
||||
[CORS that succeeds with credentials: false; method: OK (allowed: *); header: X-Test,1 (allowed: *)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
[cors-preflight.any.html]
|
||||
type: testharness
|
||||
[CORS [PATCH\], server allows]
|
||||
expected: FAIL
|
||||
|
||||
[CORS [NEW\], server allows]
|
||||
expected: FAIL
|
||||
|
||||
[CORS [GET\] [several headers\], server allows]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -15,12 +9,6 @@
|
|||
|
||||
[cors-preflight.any.worker.html]
|
||||
type: testharness
|
||||
[CORS [PATCH\], server allows]
|
||||
expected: FAIL
|
||||
|
||||
[CORS [NEW\], server allows]
|
||||
expected: FAIL
|
||||
|
||||
[CORS [GET\] [several headers\], server allows]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
[invalidate.html]
|
||||
type: testharness
|
||||
[HTTP cache invalidates after a successful response from an unknown method]
|
||||
expected: FAIL
|
||||
|
||||
[HTTP cache invalidates Location URL after a successful response from an unknown method]
|
||||
expected: FAIL
|
||||
|
||||
[HTTP cache invalidates Content-Location URL after a successful response from an unknown method]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue