diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2014-06-08 19:36:05 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2014-06-08 21:18:44 +0530 |
commit | 86594a752c1f857df62b058b5d0e4a39fa05e6f3 (patch) | |
tree | 2e80217b931ac3e5462b6c7920c1815bd48bc1b7 /src/components/script/dom/xmlhttprequest.rs | |
parent | 30827bab4d4dc96749540d5917522902b42ac340 (diff) | |
download | servo-86594a752c1f857df62b058b5d0e4a39fa05e6f3.tar.gz servo-86594a752c1f857df62b058b5d0e4a39fa05e6f3.zip |
Empty methods are not allowed
Diffstat (limited to 'src/components/script/dom/xmlhttprequest.rs')
-rw-r--r-- | src/components/script/dom/xmlhttprequest.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/script/dom/xmlhttprequest.rs b/src/components/script/dom/xmlhttprequest.rs index 60af7c394b1..cc99bb4ea88 100644 --- a/src/components/script/dom/xmlhttprequest.rs +++ b/src/components/script/dom/xmlhttprequest.rs @@ -301,7 +301,7 @@ impl<'a> XMLHttpRequestMethods<'a> for JSRef<'a, XMLHttpRequest> { }; // XXXManishearth Do some handling of username/passwords if self.sync { - // FIXME: This should only happen if the global environmet is a document environment + // FIXME: This should only happen if the global environment is a document environment if self.timeout != 0 || self.with_credentials || self.response_type != _empty { return Err(InvalidAccess) } @@ -320,6 +320,8 @@ impl<'a> XMLHttpRequestMethods<'a> for JSRef<'a, XMLHttpRequest> { } Ok(()) }, + // This includes cases where as_str() returns None, and when is_token() returns false, + // both of which indicate invalid extension method names _ => Err(Syntax), // Step 3 } } |