Navigation Menu

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

x/mod/module: MatchPrefixPattern doesn't match when glob ends with trailing slash #48513

Open
howjmay opened this issue Sep 21, 2021 · 4 comments · May be fixed by #48516
Open

x/mod/module: MatchPrefixPattern doesn't match when glob ends with trailing slash #48513

howjmay opened this issue Sep 21, 2021 · 4 comments · May be fixed by #48516
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@howjmay
Copy link
Contributor

howjmay commented Sep 21, 2021

What version of Go are you using (go version)?

$ go version
go version go1.16.5 darwin/arm64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
```
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/hauyang/Library/Caches/go-build"
GOENV="/Users/hauyang/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/hauyang/go/pkg/mod"
GONOPROXY="github.com/zeals-co-ltd/"
```

What did you do?

I want to get a private repo with GOPRIVATE, but I failed. The reason is the url ends with salsh /.

What did you expect to see?

Ends with slash should be fine for url

What did you see instead?

failed to get the private repo

@dr2chase
Copy link
Contributor

This looks like a proxy server thing, but I am not super-familiar with that part of the system (so I need a little help).

Can you provide the command, or a similar example, that failed?

And if you leave the slash off the end, does it work as you expected?

@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 21, 2021
@seankhliao seankhliao changed the title GOPRIVATE can't access the right site if ends with / x/mod/module: MatchPrefixPattern doesn't match when glob ends with trailing slash Sep 21, 2021
@gopherbot gopherbot added this to the Unreleased milestone Sep 21, 2021
@seankhliao
Copy link
Member

howjmay added a commit to howjmay/go that referenced this issue Sep 21, 2021
Trailing slash of glob is not accepted in MatchPrefixPattern.

close golang#48513
howjmay added a commit to howjmay/go that referenced this issue Sep 21, 2021
Trailing slash of glob is not accepted in MatchPrefixPattern.

close golang#48513
@howjmay
Copy link
Contributor Author

howjmay commented Sep 21, 2021

I have opened a PR #48516 for this issue.

@gopherbot
Copy link

Change https://golang.org/cl/351193 mentions this issue: module: accept trailing slash in MatchPrefixPattern

howjmay added a commit to howjmay/go that referenced this issue Sep 21, 2021
Trailing slash of glob is not accepted in MatchPrefixPattern.

close golang#48513
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants