aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/request.rs
diff options
context:
space:
mode:
authorGregory Terzian <gterzian@users.noreply.github.com>2017-11-15 10:16:16 +0800
committerGregory Terzian <gterzian@users.noreply.github.com>2017-11-16 13:36:22 +0800
commitb98635f2122b5c1c47252b351994a0b2c6bc2140 (patch)
treec138c00ba92bf01c19a1adb485561723755ed6a2 /components/script/dom/request.rs
parent2799b4eac9d903929246bda9d83cdaf9543f31d9 (diff)
downloadservo-b98635f2122b5c1c47252b351994a0b2c6bc2140.tar.gz
servo-b98635f2122b5c1c47252b351994a0b2c6bc2140.zip
allow unknown HTTP methods
Diffstat (limited to 'components/script/dom/request.rs')
-rw-r--r--components/script/dom/request.rs12
1 files changed, 1 insertions, 11 deletions
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