From b98635f2122b5c1c47252b351994a0b2c6bc2140 Mon Sep 17 00:00:00 2001 From: Gregory Terzian Date: Wed, 15 Nov 2017 10:16:16 +0800 Subject: allow unknown HTTP methods --- components/script/dom/request.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'components/script/dom/request.rs') diff --git a/components/script/dom/request.rs b/components/script/dom/request.rs index fcd396c1176..85998533ae9 100644 --- a/components/script/dom/request.rs +++ b/components/script/dom/request.rs @@ -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 -- cgit v1.2.3