Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake HTTP redirect fetch return an error if redirecting to non-HTTP(S) #14069
Comments
|
I would like to try this as part of the hackathon :) |
|
Great! Please ask questions if anything is unclear! The testing situation might be complicated until #14070 merges. |
|
I think I solved it but I'm getting timeouts and "not run" in the test suite. Might this be because of the other issue? |
|
Probably! Try applying the changes in that PR and see if the test results make more sense? |
|
@rschlaefli Want to make a pull request with your changes? |
|
Please make a comment here if you intend to work on this issue. Thank you! |
|
Hi, I just found Servo. It looks like this is up-for-grabs so I've made the patch above. |
bors-servo
added a commit
that referenced
this issue
Nov 30, 2016
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 -->
bors-servo
added a commit
that referenced
this issue
Nov 30, 2016
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 -->
bors-servo
added a commit
that referenced
this issue
Dec 1, 2016
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 -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Step 4 of the http redirect fetch specification says that we should return an error if we try to redirect to a non-HTTP(S) URL. Our corresponding implementation has a TODO in
http_redirect_fetch. We should check the scheme oflocation_urland returnResponse::network_errorif it doesn't match.Code:
components/net/fetch/methods.rsTest:
./mach test-wpt tests/wpt/web-platform-tests/fetch/api/redirect/redirect-schemes.htmlshould pass after this change. We should remove the test expectation file in that case.