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

Use Header.Set() to override the existing header value #1032

Merged
merged 1 commit into from Dec 20, 2018

Conversation

life1347
Copy link
Member

@life1347 life1347 commented Dec 19, 2018

Header.Add() appends string if there are same header key exists. Use Header.Set() to prevent this.
Fix #1027


This change is Reviewable

@life1347 life1347 force-pushed the fix-router-wrongly-appends-header-value branch from 1988fc8 to 61ca318 Compare December 19, 2018 14:37
@life1347 life1347 added this to the 1.0-rc2 milestone Dec 19, 2018
Header.Add() appends string if there are same header key exists. Use Header.Set() to prevent this.
@life1347 life1347 force-pushed the fix-router-wrongly-appends-header-value branch from 61ca318 to 4d5fb7b Compare December 19, 2018 17:31
@vishal-biyani
Copy link
Member

Hi @life1347 Are there use cases where we might want to append headers and not set them?

@life1347
Copy link
Member Author

As far as I know, we don't have such use cases for appending headers.

@life1347 life1347 self-assigned this Dec 20, 2018
@life1347 life1347 merged commit 8e6f6ff into master Dec 20, 2018
@life1347 life1347 deleted the fix-router-wrongly-appends-header-value branch December 20, 2018 09:23
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.

None yet

2 participants