Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/frontend: fix redirects for shortcuts with trailing slashes
Opening /http/ on pkg.go.dev is considered a shortcut to pkg.go.dev/net/http and should redirect there. However, http.Redirect() creates a URL relative to the current URL (/http/) and redirects to pkg.go.dev/http/net/http instead. In this CL, relative redirect paths are replaced by absolute paths so that /http/ redirects to /net/http. Fixes golang/go#40166. Change-Id: Ic3b9e6da59bfa2358b7f75e565b8a52662f17eb8 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/242138 Reviewed-by: Julie Qiu <julie@golang.org>
- Loading branch information
Showing
2 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters