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

headers were being set after they were written #1985

Merged
merged 2 commits into from
Mar 18, 2015
Merged

headers were being set after they were written #1985

merged 2 commits into from
Mar 18, 2015

Conversation

dstrek
Copy link
Contributor

@dstrek dstrek commented Mar 17, 2015

fixes #1961
Headers need to be modified before calls to WriteHeader as this actually writes the response headers out on the wire.

@corylanou
Copy link
Contributor

I would like to see some test coverage that validates this so it doesn't regress in the future.

@corylanou
Copy link
Contributor

Also, good catch. Adding a reference to the go library that states this: http://golang.org/pkg/net/http/#ResponseWriter

@toddboom
Copy link
Contributor

@dstrek If you can add a test to this, we'll get this merged in today.

@dstrek
Copy link
Contributor Author

dstrek commented Mar 18, 2015

added the tests, I noticed this also fixes issue #1878

@corylanou
Copy link
Contributor

+1

@otoolep
Copy link
Contributor

otoolep commented Mar 18, 2015

+1, thanks @dstrek

otoolep added a commit that referenced this pull request Mar 18, 2015
headers were being set after they were written
@otoolep otoolep merged commit 616cef6 into influxdata:master Mar 18, 2015
@toddboom
Copy link
Contributor

👏

@toddboom
Copy link
Contributor

Awesome work, thanks a ton @dstrek!

@toddboom toddboom added this to the 0.9.0 milestone Mar 18, 2015
@dstrek dstrek deleted the response-type-fix branch March 19, 2015 06:14
mark-rushakoff pushed a commit that referenced this pull request Jan 11, 2019
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.

Admin interface broken in 0.9.rc11
4 participants