Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for redirects after a CORS-preflight #15889

Merged
merged 1 commit into from
Mar 10, 2017

Conversation

ferjm
Copy link
Contributor

@ferjm ferjm commented Mar 9, 2017

Continue the work done in #14811 and #15547. And applies the Fetch spec change about allowing redirects after CORS preflights.


This change is Reviewable

@highfive
Copy link

highfive commented Mar 9, 2017

Heads up! This PR modifies the following files:

  • @KiChjang: components/net/fetch/methods.rs, components/net/http_loader.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 9, 2017
@ferjm
Copy link
Contributor Author

ferjm commented Mar 9, 2017

@wafflespeanut could you look at the changes for #14787, please? I only took what was done in #14811 and #15547 (e0b2146) and made the required change (46ae9d0) after rebasing.

@avadacatavra could you review the changes for #14519, please? The fixed is in 001448d.

Thank you!

@ferjm
Copy link
Contributor Author

ferjm commented Mar 9, 2017

The changes on the cors/redirect-preflight.htm WPTs are proposed here.

@KiChjang
Copy link
Contributor

KiChjang commented Mar 9, 2017

@ferjm We actually have a clone of WPT under tests/wpt/web-platform-tests/. @Ms2ger periodically does a sync, so you can simply modify files under that directory, and it will be upstreamed to the w3c repo.

@ferjm
Copy link
Contributor Author

ferjm commented Mar 9, 2017

@KiChjang ah, good to know. Thanks!

@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #15903) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Mar 10, 2017
@ferjm ferjm force-pushed the issue-14519-cors-preflight branch from 001448d to ec314a7 Compare March 10, 2017 09:21
@ferjm ferjm changed the title Fix multiple CORS related scenarios Allow for redirects after a CORS-preflight Mar 10, 2017
@ferjm
Copy link
Contributor Author

ferjm commented Mar 10, 2017

@wafflespeanut already landed the fix for #14787 in #15903

@ferjm ferjm removed the S-needs-rebase There are merge conflict errors. label Mar 10, 2017
@avadacatavra
Copy link
Contributor

@bors-servo r+

@bors-servo
Copy link
Contributor

@avadacatavra: 🔑 Insufficient privileges: Not in reviewers

@wafflespeanut
Copy link
Contributor

@bors-servo r=avadacatavra delegate=avadacatavra

@bors-servo
Copy link
Contributor

✌️ @avadacatavra can now approve this pull request

@bors-servo
Copy link
Contributor

📌 Commit ec314a7 has been approved by avadacatavra

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 10, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit ec314a7 with merge 760465b...

bors-servo pushed a commit that referenced this pull request Mar 10, 2017
Allow for redirects after a CORS-preflight

~Continue the work done in #14811 and #15547~. And applies the Fetch [spec change](whatwg/fetch@0d9a4db) about [allowing redirects after CORS preflights](whatwg/fetch#204).

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix ~#14787 and~ #14519
- [X] There are tests for these changes. Several WPTs go from FAIL to SUCCESS. The new expected FAILs for the cors/redirect-preflight.htm tests are caused by the spec change done [here](whatwg/fetch@0d9a4db), as suggested in the associated [issue](#14519 (comment)).

<!-- 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/15889)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt1

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Mar 10, 2017
@ferjm ferjm force-pushed the issue-14519-cors-preflight branch from ec314a7 to 469eb19 Compare March 10, 2017 15:39
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Mar 10, 2017
@avadacatavra
Copy link
Contributor

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit 469eb19 has been approved by avadacatavra

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 10, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 469eb19 with merge c90d3d2...

bors-servo pushed a commit that referenced this pull request Mar 10, 2017
Allow for redirects after a CORS-preflight

~Continue the work done in #14811 and #15547~. And applies the Fetch [spec change](whatwg/fetch@0d9a4db) about [allowing redirects after CORS preflights](whatwg/fetch#204).

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix ~#14787 and~ #14519
- [X] There are tests for these changes. Several WPTs go from FAIL to SUCCESS. The new expected FAILs for the cors/redirect-preflight.htm tests are caused by the spec change done [here](whatwg/fetch@0d9a4db), as suggested in the associated [issue](#14519 (comment)).

<!-- 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/15889)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-dev-unit

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Mar 10, 2017
@KiChjang
Copy link
Contributor

@bors-servo retry

  • Infra

@bors-servo
Copy link
Contributor

⚡ Previous build results for android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev are reusable. Rebuilding only mac-dev-unit...

@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-gnu-dev, windows-msvc-dev
Approved by: avadacatavra
Pushing c90d3d2 to master...

@bors-servo bors-servo merged commit 469eb19 into servo:master Mar 10, 2017
@ferjm ferjm deleted the issue-14519-cors-preflight branch March 11, 2017 08:51
@annevk
Copy link

annevk commented Mar 13, 2017

FWIW, I don't really understand how this changed results in cors/redirect-userinfo.htm or eventsource/eventsource-cross-origin.htm.

I did find some issues with the former that I'm cleaning up in web-platform-tests/wpt#5121.

@ferjm
Copy link
Contributor Author

ferjm commented Mar 13, 2017

FWIW, I don't really understand how this changed results in cors/redirect-userinfo.htm or eventsource/eventsource-cross-origin.htm.

Apart from applying the spec change to allow redirects after preflights, this patch also fixed the same origin checks for steps 7 and 10 of HTTP-redirect fetch. I believe for both tests, we were previously failing at step 7 of HTTP-redirect fetch because of the incorrect same origin check.

bors-servo pushed a commit to servo/saltfs that referenced this pull request Mar 14, 2017
Add Diane and Canaltinova to reviewers

@avadacatavra is a Mozilla employee (she's reviewed servo/servo#15889 and servo/servo#15783, and possibly more in the future). And, @canaltinova has reviewed various PRs, have filed a number of issues for newcomers, and is a frequent contributor to servo. I think we can move both of them to reviewers list.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/616)
<!-- Reviewable:end -->
bors-servo pushed a commit to servo/saltfs that referenced this pull request Mar 14, 2017
Add Diane and Canaltinova to reviewers

@avadacatavra is a Mozilla employee (she's reviewed servo/servo#15889 and servo/servo#15783, and possibly more in the future). And, @canaltinova has reviewed various PRs, have filed a number of issues for newcomers, and is a frequent contributor to servo. I think we can move both of them to reviewers list.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/616)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-tests-failed The changes caused existing tests to fail.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants