Skip to content

Conversation

@bcho
Copy link
Contributor

@bcho bcho commented May 26, 2017

From net/http:

Changing the header map after a call to WriteHeader (or Write)
has no effect unless the modified headers are trailers.

To send the content-type, need to set before calling WriteHeader.

Fixes #537

From `net/http`:

    Changing the header map after a call to WriteHeader (or Write)
    has no effect unless the modified headers are trailers.

To send the `content-type`, need to set before calling `WriteHeader`.

Fixes go-kit#537
@peterbourgon
Copy link
Member

Oh, perfect, thank you!

@peterbourgon peterbourgon merged commit f13c712 into go-kit:master May 26, 2017
@bcho bcho deleted the fix-example/set-header branch May 26, 2017 14:03
jamesgist pushed a commit to jamesgist/kit that referenced this pull request Nov 1, 2024
fix(example/shipping): header should set before `WriteHeader`
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.

2 participants