mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Empty methods are not allowed
This commit is contained in:
parent
30827bab4d
commit
86594a752c
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue