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

Correctly set the credentials of a fetch request, when the withCredentials parameter was passed to getDocument #8848

Merged
merged 1 commit into from
Aug 31, 2017

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Aug 31, 2017

Skimming through https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Sending_a_request_with_credentials_included, it looks to me like the credentials option was accidentally inverted.

@yurydelendik If I've completely misunderstood this code, and the MDN docs, please just close this PR (and sorry about wasting your time in that case).

…dentials` parameter was passed to `getDocument`

Skimming through https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Sending_a_request_with_credentials_included, it looks to me like the `credentials` option was accidentally inverted.
@Rob--W
Copy link
Member

Rob--W commented Aug 31, 2017

The logic is good, but tests are needed to avoid regressions. I noticed this regression when I wanted to run the test case for #8804 (which worked before the fetch feature landed).

I'll continue with writing the test case (since I started already) and see how I can attach the commit to this PR (I've seen other repositories with multiple commits from different authors, so that should be possible, I guess).

@Rob--W
Copy link
Member

Rob--W commented Aug 31, 2017

I'm going to merge this because I don't see a way to open a PR that depends on this, or attach another commit to this PR (I would need write access to your branch).

@Rob--W Rob--W merged commit 0430e99 into mozilla:master Aug 31, 2017
@Rob--W
Copy link
Member

Rob--W commented Aug 31, 2017

Until #8855 is merged, a manual test is to open the test URL from #8804 and see if the load succeeds.

@Snuffleupagus Snuffleupagus deleted the fetch-credentials branch August 31, 2017 15:05
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
Correctly set the `credentials` of a fetch request, when the `withCredentials` parameter was passed to `getDocument`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants