Auto merge of #18882 - KiChjang:fix-origin, r=jdm

Use the correct origin in fetch

Fixes #18147.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18882)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-11-15 16:08:49 -06:00 committed by GitHub
commit c9884604e9
2 changed files with 6 additions and 4 deletions

View file

@ -118,7 +118,7 @@ pub fn main_fetch(request: &mut Request,
// TODO: handle upgrade to a potentially secure URL.
// Step 5.
if should_be_blocked_due_to_bad_port(&request.url()) {
if should_be_blocked_due_to_bad_port(&request.current_url()) {
response = Some(Response::network_error(NetworkError::Internal("Request attempted on bad port".into())));
}
// TODO: handle blocking as mixed content.