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: doesn't correctly handle trailing slash in godoc.org redirection #43979

Closed
imjasonh opened this issue Jan 28, 2021 · 4 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@imjasonh
Copy link

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

$ go version
go version go1.15.6 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/jasonhall/Library/Caches/go-build"
GOENV="/Users/jasonhall/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/jasonhall/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/jasonhall/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.6/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/jasonhall/git/build/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/bb/l0yfqc6d6kb5zm5f9ktyx0nw0000gn/T/go-build918433136=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOROOT/bin/go version: go version go1.15.6 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.15.6
uname -v: Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.15.7
BuildVersion:	19H2
lldb --version: lldb-1200.0.44.2
Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)

What did you do?

Browse to https://godoc.org/github.com/google/go-containerregistry/ (with trailing slash)

...or any godoc.org link to a valid package name, with trailing slash:
https://godoc.org/github.com/google/go-github/
https://godoc.org/github.com/gorilla/mux/

What did you expect to see?

I expected to be redirected to https://pkg.go.dev/github.com/google/go-containerregistry/ (with or without the trailing slash, I have no preference)

...and that's what happens when I browse to https://godoc.org/github.com/google/go-containerregistry (no trailing slash)

What did you see instead?

I was redirected to #43036 which is closed working-as-intended, and seemingly unrelated to my issue.

@imjasonh
Copy link
Author

Possibly a regression of #40166?

@seankhliao seankhliao changed the title pkgsite: doesn't correctly handle trailing slash in godoc.org redirection x/pkgsite: doesn't correctly handle trailing slash in godoc.org redirection Jan 29, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jan 29, 2021
@jba jba added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 29, 2021
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Jan 29, 2021
@julieqiu
Copy link
Member

Thanks for letting us know, @imjasonh! We're working on a fix.

@gopherbot
Copy link

Change https://golang.org/cl/287794 mentions this issue: gddo-server: handle trailing slash in godoc.org redirect

@imjasonh
Copy link
Author

Thanks for the quick fix! 👍

@golang golang locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants