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

cmd/go: allow omitting http scheme from GOPROXY #32191

Closed
rogpeppe opened this issue May 22, 2019 · 6 comments
Closed

cmd/go: allow omitting http scheme from GOPROXY #32191

rogpeppe opened this issue May 22, 2019 · 6 comments
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@rogpeppe
Copy link
Contributor

rogpeppe commented May 22, 2019

Currently, GOPROXY has to be specified as a full URL (https://proxy.golang.org) whereas GOSUMDB does not (sum.golang.org). Without knowing the details of the underlying protocol, this seems like an unnecessary inconsistency that will be easy for people to get wrong.

How about allowing GOPROXY to be specified without the URL scheme? So:

GOPROXY=proxy.golang.org

would be treated the same as:

GOPROXY=https://proxy.golang.org

Then in the common case, both GOPROXY and GOSUMDB can be specified in a similar way. The go command would continue to accept a full URL for GOPROXY so all the original flexibility is still available.

@rogpeppe rogpeppe changed the title cmd/go: allow omitting http schema from GOPROXY cmd/go: allow omitting http scheme from GOPROXY May 22, 2019
@ALTree ALTree added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label May 23, 2019
@bradfitz bradfitz added this to the Go1.13 milestone May 23, 2019
@bradfitz
Copy link
Contributor

/cc @bcmills @rsc

@gopherbot
Copy link

Change https://golang.org/cl/179217 mentions this issue: cmd/go: default to HTTPS for GOPROXY URLs

@rsc
Copy link
Contributor

rsc commented Jun 4, 2019

I agree this inconsistency is annoying and hard to explain. Let's say that a GOPROXY entry (something in the comma-separated list) without :// gets https:// inserted at the front, and let's also say that a leading https:// in GOSUMDB is dropped before the rest of the processing happens.

@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Jun 4, 2019
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jun 4, 2019
@bcmills
Copy link
Contributor

bcmills commented Jun 6, 2019

One minor wrinkle: we should probably reserve dotless words for special tokens. (Today we have off and direct, and we may want to add others.)

Those will be fine with an explicit https:// prefix.

@bcmills
Copy link
Contributor

bcmills commented Jun 6, 2019

One more wrinkle: RFC 8089 allows file URIs of the form file:/path/to/file or file:c:/path/to/file. I suggest that we check for the :/ token rather than ://.

@gopherbot
Copy link

Change https://golang.org/cl/181019 mentions this issue: cmd/go: allow GOPROXY to elide the "https://" prefix

@golang golang locked and limited conversation to collaborators Jun 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

6 participants