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
Closed

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

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

Comments

@etoews
Copy link

etoews 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
Copy link

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
Copy link
Contributor

bradfitz 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
Copy link
Contributor

rsc 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
Copy link
Contributor

Here's the proposed fix - https://go-review.googlesource.com/#/c/9385/

@gopherbot
Copy link

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

@bradfitz
Copy link
Contributor

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
Copy link
Contributor

I agree with @bradfitz to not include the GITCOMMITHASH.

@rsc rsc closed this as completed in 0d1ceef Jun 26, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc removed their assignment Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants