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 upRemove same-origin-data-url flag from fetch implementation #13467
Conversation
highfive
commented
Sep 27, 2016
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon. |
highfive
commented
Sep 27, 2016
|
Heads up! This PR modifies the following files:
|
| @@ -673,8 +673,6 @@ fn http_redirect_fetch(request: Rc<Request>, | |||
| request.redirect_count.set(request.redirect_count.get() + 1); | |||
|
|
|||
| // Step 9 | |||
This comment has been minimized.
This comment has been minimized.
KiChjang
Sep 27, 2016
Member
Step annotations for this fetch function needs to be updated to match the spec, I'm afraid.
This comment has been minimized.
This comment has been minimized.
|
Almost done! If you can squash your commits after stylistic nits, I can land this :). |
| let same_origin = if let Origin::Origin(ref origin) = *request.origin.borrow() { | ||
| *origin == request.current_url().origin() | ||
| } else { | ||
| false | ||
| }; | ||
| let has_credentials = has_credentials(&location_url); | ||
|
|
||
| // Step 10 | ||
| // Step 7 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
JanZerebecki
Sep 27, 2016
Author
Contributor
The newline is missing intentionally because the previous lines are preparation for Step 7 and not used in Step 6.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| let location_url = match location_url { | ||
| Ok(url) => url, | ||
| _ => return Response::network_error() | ||
| }; | ||
|
|
||
| // Step 7 | ||
| // Step 4 | ||
| //TODO implement return network_error if not HTTP(S) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| request.url_list.borrow_mut().push(location_url); | ||
|
|
||
| // Step 15 | ||
| // Step 12 | ||
| //TODO implement referrer policy |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5fc9a72
to
44517e0
44517e0
to
beaf91d
|
@bors-servo r+ Thanks! |
|
|
Remove same-origin-data-url flag from fetch implementation <!-- Please describe your changes on the following line: --> The spec removed it. Check the scheme instead, data is always same origin now, except for workers. Closes #13362 --- <!-- 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 #13362 . <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they only remove code. <!-- 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/13467) <!-- Reviewable:end -->
|
|
|
|
That code was added in #13323 which only merged yesterday. |
beaf91d
to
95a7482
|
@bors-servo r+ |
|
|
Remove same-origin-data-url flag from fetch implementation <!-- Please describe your changes on the following line: --> The spec removed it. Check the scheme instead, data is always same origin now, except for workers. Closes #13362 --- <!-- 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 #13362 . <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they only remove code. <!-- 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/13467) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Remove same-origin-data-url flag from fetch implementation <!-- Please describe your changes on the following line: --> The spec removed it. Check the scheme instead, data is always same origin now, except for workers. Closes #13362 --- <!-- 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 #13362 . <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because they only remove code. <!-- 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/13467) <!-- Reviewable:end -->
|
|
JanZerebecki commentedSep 27, 2016
•
edited by larsbergstrom
The spec removed it. Check the scheme instead, data is always same origin now,
except for workers.
Closes #13362
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is