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/tools/cmd/godoc: trailing %2F in "/pkg/foo%2F" results in invalid links. #5652
Labels
Milestone
Comments
Assigning to bradfitz because it reminds me of other discussions about URL handling. Feel free to redirect. Labels changed: added priority-later, removed priority-triage. Owner changed to @bradfitz. Status changed to Accepted. |
Several possible fixes: 1a) don't navigate to a URL with %2f in it. (how did that happen?) 1b) if we do get an HTTP request for /foo%2f, redirect to /foo/ 2) make the Subdirectories Dirs list link to absolute paths (href="/pkg/net/http/") instead of relative (href="http"). Owner changed to @griesemer. |
> 1a) don't navigate to a URL with %2f in it. (how did that happen?) I've added a bookmark in Firefox with the keyword "pkg" which navigates to "http://golang.org/pkg/%s". http://s21.postimg.org/moyc3urmt/keyword.png A simple example that would trigger this behavior is typing "pkg encoding/" into the navigation bar which Firefox would translate into "http://golang.org/pkg/encoding%2F". A more common example would be using different variations of github.com or code.google.com repositories were you would want to view all packages of a specific user or all packages contained within a specific repository. (This is when running godoc locally of cause). While it is possible to teach yourself not to add a trailing "/" at the end of such requests, I do think this should be resolved in godoc and not at the client. |
rsc
changed the title
cmd/godoc: trailing %2F in "/pkg/foo%2F" results in invalid links.
x/tools/cmd/godoc: trailing %2F in "/pkg/foo%2F" results in invalid links.
Apr 14, 2015
Close the issue for now as it has remained inactive for more than 6 months. Anyone with more insight into the current status may re-open the issue or add a comment about the current progress. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: