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

pass along version to httpd/handler #2928

Merged
merged 1 commit into from
Jun 12, 2015

Conversation

neonstalwart
Copy link
Contributor

i'm not sure if this is how you want to do this. if there's a way which seems better, let me know and i'll change this.

@otoolep
Copy link
Contributor

otoolep commented Jun 11, 2015

Works for me +1. @corylanou?

@neonstalwart -- can you show an example response from the server, with this change in place?

@neonstalwart
Copy link
Contributor Author

I'm on my way out of town but I might be able to do something by Monday.

@@ -134,7 +133,7 @@ func (h *Handler) SetRoutes(routes []route) {
if r.gzipped {
handler = gzipFilter(handler)
}
handler = versionHeader(handler, h.version)
handler = versionHeader(handler, h)
Copy link
Contributor

Choose a reason for hiding this comment

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

I typically prefer to only send what is needed to the receiving method, which in this case is just the version string. It makes the receiving function easy to understand what is actually needed.

@corylanou
Copy link
Contributor

This looks good. I think we used to have a test that verified the version. I think it got lost in the shuffle. It would be nice to add that back in and make sure it works.

Once again, thanks for the work @neonstalwart!

+1

pauldix added a commit that referenced this pull request Jun 12, 2015
pass along version to httpd/handler
@pauldix pauldix merged commit 5e7ddc6 into influxdata:master Jun 12, 2015
@otoolep
Copy link
Contributor

otoolep commented Jun 12, 2015

Unfortunately this change does not work. s.Version has not yet been set when the handler's version field is set.

I am looking into a fix.

@otoolep
Copy link
Contributor

otoolep commented Jun 12, 2015

Fixed by #2969

@neonstalwart neonstalwart deleted the version-header branch June 15, 2015 14:40
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.

4 participants