Skip to content

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

Merged
life1347 merged 1 commit into
masterfrom
fix-router-wrongly-appends-header-value
Dec 20, 2018
Merged

life1347 merged 1 commit into
masterfrom
fix-router-wrongly-appends-header-value

Conversation

@life1347

@life1347 life1347 commented Dec 19, 2018 •

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

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

@life1347

Copy link
Copy Markdown
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.

3 participants