mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #14420 - 46bit:master, r=KiChjang
Made http_redirect_fetch error for non-HTTPS. #14069 Hi! I'm a newbie looking to resolve #14069. The [existing tests](https://dxr.mozilla.org/servo/source/tests/wpt/web-platform-tests/fetch/api/redirect/redirect-schemes.html) now pass. Cheers! --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14069 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR <!-- - [ ] These changes do not require tests because _____ --> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14420) <!-- Reviewable:end -->
This commit is contained in:
commit
b3745d6f35
4 changed files with 4 additions and 43 deletions
|
@ -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 {
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue