You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pkg.go.dev supports shortcuts for packages from the standard library (for example, https://pkg.go.dev/http redirects to https://pkg.go.dev/net/http). However, these don't work if a trailing / is appended to the URL.
julieqiu
added
pkgsite
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Jul 14, 2020
pkg.go.dev supports shortcuts for packages from the standard library (for example, https://pkg.go.dev/http redirects to https://pkg.go.dev/net/http). However, these don't work if a trailing / is appended to the URL.
Opening https://pkg.go.dev/http/ results in a redirect to https://pkg.go.dev/http/net/http (and not https://pkg.go.dev/net/http).
Below are the request and the server's response (shortened):
In the case of https://github.com/golang/pkgsite/blob/master/internal/frontend/details.go#L432, the
url
parameter tohttp.Redirect()
is a relative path. Therefore, the (full) redirect path is constructed by appending the relative URL to the current location (https://golang.org/src/net/http/server.go#L2082).I have a CL ready but it is based on a fix for #39663.
Related: #39663.
The text was updated successfully, but these errors were encountered: