mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10)
This commit is contained in:
parent
64751b8eef
commit
83d2a11d86
21 changed files with 260 additions and 152 deletions
|
@ -460,11 +460,7 @@ fn is_simple_method(m: &Method) -> bool {
|
|||
pub fn allow_cross_origin_request(req: &CORSRequest, headers: &Headers) -> bool {
|
||||
match headers.get::<AccessControlAllowOrigin>() {
|
||||
Some(&AccessControlAllowOrigin::Any) => true, // Not always true, depends on credentials mode
|
||||
// FIXME: https://github.com/servo/servo/issues/6020
|
||||
Some(&AccessControlAllowOrigin::Value(ref url)) =>
|
||||
url.scheme == req.origin.scheme &&
|
||||
url.host() == req.origin.host() &&
|
||||
url.port() == req.origin.port(),
|
||||
Some(&AccessControlAllowOrigin::Value(ref url)) => req.origin.serialize() == *url,
|
||||
Some(&AccessControlAllowOrigin::Null) |
|
||||
None => false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue