Skip to content

Commit

Permalink
Fix check conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
shnmorimoto committed Nov 5, 2019
1 parent b0a12f6 commit 70c62ce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/net/http_loader.rs
Expand Up @@ -1462,11 +1462,8 @@ fn http_network_fetch(
_ => false,
});

let is_same_origin = request.url_list.iter().any(|url| match request.origin {
SpecificOrigin(ref immutable_request_origin) => {
url.clone().into_url().origin().ascii_serialization() ==
immutable_request_origin.ascii_serialization()
},
let is_same_origin = request.url_list.iter().all(|url| match request.origin {
SpecificOrigin(ref immutable_request_origin) => url.origin() == *immutable_request_origin,
_ => false,
});

Expand Down

0 comments on commit 70c62ce

Please sign in to comment.