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/pkgsite: Redirects of certain packages lose version information #54085

Open
tushar-deepsource opened this issue Jul 27, 2022 · 2 comments
Open
Labels
NeedsInvestigation pkgsite

Comments

@tushar-deepsource
Copy link

@tushar-deepsource tushar-deepsource commented Jul 27, 2022

What is the URL of the page with the issue?

https://pkg.go.dev/http@go1.16.13

What did you expect to see?

It should have redirected to https://pkg.go.dev/net/http@go1.16.13

What did you see instead?

It redirected to https://pkg.go.dev/net/http

@gopherbot gopherbot added this to the Unreleased milestone Jul 27, 2022
@hyangah
Copy link
Contributor

@hyangah hyangah commented Jul 28, 2022

@jamalc @julieqiu @jba Do you remember why pkgsite is supporting this http redirect? And what's the rule?
(I tried https://pkg.go.dev/pprof and this is an error)

From old go documentation code https://github.com/golang/website/blob/6b9583b28385477c088e8c70a2f6012251bdd0e7/internal/redirect/redirect.go#L61 I see this redirect was added to help people transitioning from pre-go1 to go1. But It was a decade ago.

@hyangah hyangah modified the milestones: Unreleased, pkgsite/unplanned Jul 28, 2022
@hyangah hyangah added the NeedsInvestigation label Jul 28, 2022
@jamalc
Copy link

@jamalc jamalc commented Aug 1, 2022

That logic was added here and only works if there is a single match. The path "/pprof" matches both "net/http/pprof" and "runtime/pprof" so a 404 is returned instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants