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
cmd/go: go get mydomain.com #3099
Labels
Milestone
Comments
As mentioned in the thread: That looks nice, but can we please introduce the aspect of "go get" using a query argument? Without something like that, we can't distinguish who's being served at the server side, which restricts possibilities like redirecting people to an external documentation site like Gary's gopkgdoc, for example, or even generating the page for go get dynamically without interfering with the normal site content. Something like having ?go-import=1 would already do it. |
A query parameter is a little gross, but I agree with the desire. I'd prefer to do both User-Agent and Accept header. The User-Agent will show in almost everybody's typical logs, and the Accept header is the "correct" way to signal this intent for a certain type of content, and supported by mod_rewrite at least. That work? |
I don't understand. With a browser, your browser sends "Hi I'm FIrefox, and I Accept: text/html!". And then your webserver give it pretty javascript ponies. With go get, the go http client sends, "Hi, I'm go get, and I Accept: text/html, x-golang/go-imports". And then your webserver gives it a lighter-weight HTML page with just the metadata, and doesn't do any redirects. What don't I follow? |
Done: http://golang.org/cl/5660051/ (big CL description there now) Tested many cases by hand, and setup the code for easy testability, but no test code yet. I will do that in a subsequent CL or at least once people are happy with the code. |
This issue was closed by revision 932c8dd. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: