Use the correct URL when checking for bad port

This commit is contained in:
Keith Yeung 2017-10-24 19:11:20 -07:00
parent d5e7137b52
commit 1c8d04973e

View file

@ -119,7 +119,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.