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

Apollo Datasource adds content-type: header when Content-Type (case sensitive) header is set #153

Closed
AaronMoat opened this issue Feb 1, 2023 · 3 comments

Comments

@AaronMoat
Copy link
Contributor

https://github.com/apollographql/datasource-rest/blame/9a8b6278d80bc677fa7608ac0c3f065d991a79af/src/RESTDataSource.ts#L486

If this.get or similar is called with headers: { 'Content-Type': 'x' }, two duplicate headers get set (content-type and Content-Type).

This can cause problems in the API resulting in problematic behaviour.

@glasser
Copy link
Member

glasser commented Feb 2, 2023

Looks like a PR was filed (by a colleague of yours?): #154.

@AaronMoat
Copy link
Contributor Author

Not a colleague of mine, just seem to have run into the same problem at the same time :)

@JustinSomers
Copy link
Contributor

@AaronMoat We were able to get #154 merged in:
bb0cff0

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

No branches or pull requests

4 participants