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

Fixed double WriteHeader calls caused by #71 #73

Merged
merged 1 commit into from Aug 16, 2018

Conversation

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

None yet

2 participants