Skip to content

M1504: Implement basic support for withCredentials API - #8812

Merged
bors-servo merged 1 commit into
servo:masterfrom
jitendra29:support-withCredentials
Dec 5, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
jitendra29:support-withCredentials

Conversation

@jigesh-mehta

Copy link
Copy Markdown
Contributor

The pull request includes the following task:

  • Implemented basic network-level support by adding a member to LoadData that is used by http_loader.rs to conditionally exclude cookies from the HTTP request if the flag is false (default true)

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Dec 4, 2015
@highfive

highfive commented Dec 4, 2015

Copy link
Copy Markdown

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @metajack (or someone else) soon.

@jigesh-mehta jigesh-mehta changed the title Implement basic support for withCredentials API M1504: Implement basic support for withCredentials API Dec 4, 2015
@Manishearth Manishearth self-assigned this Dec 4, 2015
Comment thread components/net/http_loader.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably take an &LoadData so we don't have to clone it. Alternatively, just pass in include_third_party_credentials directly

@Manishearth

Copy link
Copy Markdown
Member

Thanks for the PR! I think we need some minor changes and some spec links here, otherwise it looks good to me!

(Let me know if you're having trouble with the spec)

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Dec 4, 2015
@jdm

jdm commented Dec 4, 2015

Copy link
Copy Markdown
Member

I missed one step from the spec which is important here (but a straightforward fix!): in https://fetch.spec.whatwg.org/#concept-http-network-fetch step 9, we need to avoid setting cookies if the credentials flag is false. That corresponds to set_cookies_from_response in http_loader.rs.

@jigesh-mehta
jigesh-mehta force-pushed the support-withCredentials branch from 54a09c7 to ce3c9ff Compare December 4, 2015 21:36
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Dec 4, 2015
@jigesh-mehta

Copy link
Copy Markdown
Contributor Author

@jdm We have implemented all the suggested changes in addition to the missing step.

However as we talked earlier, I am still getting an assertion error due to unmatched Content-Type and the test case /XMLHttpRequest/send-entity-body-document.htm fails.
(Error: assert_equals: document should be serialized and sent as text/html;charset=UTF-8 (TEST#6) expected "text/html;charset=UTF-8" but got "text/plain;charset=UTF-8" )

@jdm

jdm commented Dec 4, 2015

Copy link
Copy Markdown
Member

@jigesh-mehta I tried your changes locally and do not see that error, so I'm going to move ahead with this PR as if you do not see that error :)

@jdm

jdm commented Dec 4, 2015

Copy link
Copy Markdown
Member

@bors-servo: r+
Thanks!


Reviewed 4 of 4 files at r2.
Review status: all files reviewed at latest revision, 3 unresolved discussions.


Comments from the review on Reviewable.io

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit ce3c9ff has been approved by jdm

@highfive highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Dec 4, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit ce3c9ff with merge 217a55a...

@highfive highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Dec 4, 2015
bors-servo pushed a commit that referenced this pull request Dec 4, 2015
M1504: Implement basic support for withCredentials API

The pull request includes the following task:

* Implemented basic network-level support by adding a member to LoadData that is used by http_loader.rs to conditionally exclude cookies from the HTTP request if the flag is false (default true)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8812)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants