Made http_redirect_fetch error for non-HTTPS. #14069

This commit is contained in:
Michael Mokrysz 2016-11-30 05:44:14 +00:00
parent f159b5cb10
commit 52194c01d5
4 changed files with 4 additions and 43 deletions

View file

@ -772,7 +772,10 @@ fn http_redirect_fetch(request: Rc<Request>,
};
// Step 4
// TODO implement return network_error if not HTTP(S)
match location_url.scheme() {
"http" | "https" => { },
_ => return Response::network_error(NetworkError::Internal("Not an HTTP(S) Scheme".into()))
}
// Step 5
if request.redirect_count.get() >= 20 {