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

net/http: default User-Agent is invalid #9792

Closed
etoews opened this issue Feb 6, 2015 · 7 comments

Comments

Projects
None yet
6 participants
@etoews
Copy link

commented Feb 6, 2015

The default User-Agent

Go 1.1 package http

in the http package doesn't appear to be valid according to the User-Agent section of RFC 7231.

Go should have a properly formatted User-Agent. e.g.

Go-http/1.1
@sigmavirus24

This comment has been minimized.

Copy link

commented Feb 6, 2015

Also, since it seems like "1.1" might be the version of Go not the package, it might make sense to do something like

Go-1.1-http-package/{package-version}

But I'm not sure if there is a version for standard packages.

@ianlancetaylor ianlancetaylor changed the title Default User-Agent is invalid net/http: default User-Agent is invalid Feb 6, 2015

@bradfitz

This comment has been minimized.

Copy link
Member

commented Feb 6, 2015

I've never had opinions on this. I believe @rsc picked this string on purpose.

@bradfitz bradfitz assigned rsc and unassigned bradfitz Feb 6, 2015

@rsc

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2015

I have never seen anything about user-agent syntax before. Sorry.

@rsc rsc added this to the Go1.5 milestone Apr 10, 2015

@syst3mw0rm

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2015

@gopherbot

This comment has been minimized.

Copy link

commented Apr 27, 2015

CL https://golang.org/cl/9385 mentions this issue.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Apr 28, 2015

I would like to put the Go version number in the User-Agent. Perhaps we only include it if it's not a dev release? So go-package-http/1.5 or go-package-http/dev but never go-package-http/GITCOMMITHASH. @rsc, thoughts?

@syst3mw0rm

This comment has been minimized.

Copy link
Contributor

commented Apr 29, 2015

I agree with @bradfitz to not include the GITCOMMITHASH.

@rsc rsc closed this in 0d1ceef Jun 26, 2015

@golang golang locked and limited conversation to collaborators Jun 25, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.