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

Content-type set in a http.put is being appended with text/plain after rc.2 #9452

Closed
pliscki opened this issue Jun 22, 2016 · 2 comments
Closed

Comments

@pliscki
Copy link

pliscki commented Jun 22, 2016

I'm submitting a ... (check one with "x")

[X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When Content-type is manually set in a http.put, instead of completely overriding its content, it's just appending it and producing the following:

Content-Type:text/plain, application/json

Expected/desired behavior

When any value is provided, it shouldn't defined a default content-type. At least, this is what was happening in versions prior to rc.2.

Reproduction of the problem

To see the problem, inspect network traffic in dev tools.
https://plnkr.co/edit/Qxw4pd2VnkkWg4iCXwUD?p=preview

What is the expected behavior?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 2.0.0-rc.2 and 2.0.0-rc.3
  • Browser: [Chrome 51.0.2704.103 ]
  • Language: [TypeScript 1.8.9 ]
@vicb
Copy link
Contributor

vicb commented Jun 22, 2016

The issue would be solved with headers.set ('Content-Type', 'application/json'), notice the T.

It will be fixed in a later release

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants