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 // 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 // Step 5
if request.redirect_count.get() >= 20 { if request.redirect_count.get() >= 20 {

View file

@ -1,8 +0,0 @@
[redirect-schemes.html]
type: testharness
[Fetch: handling different schemes in redirects 3]
expected: FAIL
[Fetch: handling different schemes in redirects 1]
expected: FAIL

View file

@ -1,17 +0,0 @@
[redirect-to-dataurl-worker.html]
type: testharness
[Testing data URL loading after same-origin redirection (no-cors mode)]
expected: FAIL
[Testing data URL loading after cross-origin redirection (no-cors mode)]
expected: FAIL
[Testing data URL loading after same-origin redirection (cors mode)]
expected: FAIL
[Testing data URL loading after same-origin redirection (same-origin mode)]
expected: FAIL
[Testing data URL loading after cross-origin redirection (cors mode)]
expected: FAIL

View file

@ -1,17 +0,0 @@
[redirect-to-dataurl.html]
type: testharness
[Testing data URL loading after same-origin redirection (no-cors mode)]
expected: FAIL
[Testing data URL loading after cross-origin redirection (no-cors mode)]
expected: FAIL
[Testing data URL loading after same-origin redirection (cors mode)]
expected: FAIL
[Testing data URL loading after same-origin redirection (same-origin mode)]
expected: FAIL
[Testing data URL loading after cross-origin redirection (cors mode)]
expected: FAIL