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

set error headers before writing them #800

Merged
merged 3 commits into from
Apr 14, 2021
Merged

set error headers before writing them #800

merged 3 commits into from
Apr 14, 2021

Conversation

willscott
Copy link
Member

@willscott willscott commented Apr 12, 2021

Should partially address #791

Copy link
Contributor

@lukevalenta lukevalenta left a comment

Choose a reason for hiding this comment

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

LGTM. For context for other code reviewers, according to the ResponseWriter docs (https://golang.org/pkg/net/http/#ResponseWriter):

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

@willscott willscott merged commit ec4f8f9 into master Apr 14, 2021
@willscott willscott deleted the fix/errorheader branch April 14, 2021 14:26
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

3 participants