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 upWrong referrer policy used in cors_preflight_request #13026
Closed
Labels
Comments
|
I'll take this |
|
Go for it! Ask questions if anything is unclear! |
|
@jdm: So by setting the policy as |
|
@shinglyu: Exactly. |
bors-servo
added a commit
that referenced
this issue
Aug 27, 2016
Solved wrong referrer policy in cors_preflight_fetch Solved wrong referrer policy in cors_preflight_fetch - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13026 - [X] There are tests for these changes <!-- 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/13071) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Aug 27, 2016
Solved wrong referrer policy in cors_preflight_fetch Solved wrong referrer policy in cors_preflight_fetch - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #13026 - [X] There are tests for these changes <!-- 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/13071) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The specification for step 1 says we should use
request's referrer policy. There's an obvious copy/paste typo that uses the default request policy for the newpreflightvariable instead.Code:
components/net/fetch/methods.rsTest: modify
test_cors_preflight_fetchintests/unit/net/fetch.rsby setting the original referrer policy used tooriginand setting a URL referrer a path (a.html), and checking that the referrer header that the server receives does not contain the path. Run the test with./mach test-unit -p net.