Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Don't duplicate headers#354

Merged
tlmii merged 5 commits intodotnet:masterfrom
tlmii:dev/fix-duplicate-headers
Jun 27, 2020
Merged

Don't duplicate headers#354
tlmii merged 5 commits intodotnet:masterfrom
tlmii:dev/fix-duplicate-headers

Conversation

@tlmii
Copy link
Member

@tlmii tlmii commented Jun 25, 2020

Fixes #237.

There were actually two separate things going on:

  1. As pointed out by POST/PATCH with body adds custom headers twice #237, almost all headers were duplicated if you were doing anything with a request body (because headers were being set for both the request and the content).
  2. The fix in update to fix duplicated ContentType with Test #277 showed the other part of it - that Content-Type specifically was always being duplicated (with or without a request body) if it was added with set header or the --header argument, because it was special-cased and set early before all those were added in bulk.

This PR addresses both issues, and supersedes #277, which I'll close with an explanation once this goes in.

@tlmii tlmii requested a review from bzhu94 June 25, 2020 08:11
Copy link

@bzhu94 bzhu94 left a comment

Choose a reason for hiding this comment

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

Looks good!

@tlmii tlmii merged commit b7bba63 into dotnet:master Jun 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

POST/PATCH with body adds custom headers twice

2 participants