Skip to content

Fixed double WriteHeader calls caused by #71#73

Merged
jprobinson merged 1 commit into
nytimes:masterfrom
levenlabs:double
Aug 16, 2018
Merged

Fixed double WriteHeader calls caused by #71#73
jprobinson merged 1 commit into
nytimes:masterfrom
levenlabs:double

Conversation

@jameshartig
Copy link
Copy Markdown
Contributor

@jprobinson Small change that somehow I missed in #71. Apparently in specific scenarios WriteHeader can be called twice which doesn't actually break anything but causes http: multiple response.WriteHeader calls logs. Setting the code to 0 after we call WriteHeader prevents Close from triggering the WriteHeader. I added a test as well to verify.

Copy link
Copy Markdown
Contributor

@jprobinson jprobinson left a comment

Choose a reason for hiding this comment

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

🤸‍♀️

@jprobinson jprobinson merged commit edf8477 into nytimes:master Aug 16, 2018
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