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

[BUGFIX release] Fixing adapter "Accept" header overwriting issue. #6062

Merged
merged 1 commit into from
May 1, 2019

Conversation

nikhilsane
Copy link
Contributor

@nikhilsane nikhilsane commented Apr 24, 2019

Fixing the bug that caused overwriting of "Accept" header in "ajaxOptions" method of the adapter. This is for addressing the issue #6058

Change description:

  1. Updated the code in "packages\adapter\addon\json-api.js". If the input hash contains value for "Accept" header, it should not be overwritten by the default "application/vnd.api+json" string.

  2. Added unit tests for checking this flow.

Fixes #6058

package.json Outdated Show resolved Hide resolved
@runspired
Copy link
Contributor

Appears there is a linting error, but otherwise lgtm 👍

@nikhilsane
Copy link
Contributor Author

@runspired : Fixed the linting issues and pushed the code.
I am not aware of the process - what happens next?

Thanks,
nikhil.

@rwjblue
Copy link
Member

rwjblue commented May 1, 2019

FYI - I'm labeling this as [BUGFIX release] as this is impacting folks in the 3.9 release.

@rwjblue rwjblue changed the title Fixing adapter "Accept" header overwriting issue. [BUGFIX release] Fixing adapter "Accept" header overwriting issue. May 1, 2019
Fixing the bug that caused overwriting of "Accept" header in "ajaxOptions" method of the adapter.
@rwjblue
Copy link
Member

rwjblue commented May 1, 2019

I rebased and fixed the remaining linting issue.

@runspired runspired merged commit 81af0fb into emberjs:master May 1, 2019
runspired pushed a commit that referenced this pull request May 1, 2019
[BUGFIX fetch] prevent Accept & ContentType header overwriting
runspired pushed a commit that referenced this pull request May 1, 2019
[BUGFIX fetch] prevent Accept & ContentType header overwriting
@nikhilsane
Copy link
Contributor Author

Thanks!

-nikhil.

rwjblue added a commit that referenced this pull request May 1, 2019
[BUGFIX fetch] prevent Accept & ContentType header overwriting (#6062)
rwjblue added a commit that referenced this pull request May 1, 2019
[BUGFIX fetch] prevent Accept & ContentType header overwriting (#6062)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ember-Data 3.9.1 adapter "headers" seems to be not getting sent.
4 participants