We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
go version
go version go1.9.1 darwin/amd64
Yes.
go env
GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/david/dev/go" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/yv/h0_940zx2j38gfnkrt3xcc5c0000gn/T/go-build797957211=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config"
I want to get at a raw URL path that contains %25. This program demonstrates the attempt.
%25
I would expect the output to be:
Path: `/here%20there` RawPath: `/here%2520there`
Instead, the output is:
Path: `/here%20there` RawPath: `
RawPath is not set. Should it be? Is there some other way to get back the original path with %25 preserved?
The text was updated successfully, but these errors were encountered:
Ah-ha, EscapedPath() seems to return what I need. I find the various path-handling interfaces a bit confusing.
EscapedPath()
Sorry, something went wrong.
So there isn't an issue to be fixed here?
I do wish there was a way to get back the path exactly as it was in the parsed string, but using EscapedPath() solves my immediate problem. Thanks.
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9.1 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/david/dev/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/yv/h0_940zx2j38gfnkrt3xcc5c0000gn/T/go-build797957211=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
What did you do?
I want to get at a raw URL path that contains
%25
. This program demonstrates the attempt.What did you expect to see?
I would expect the output to be:
What did you see instead?
Instead, the output is:
RawPath is not set. Should it be? Is there some other way to get back the original path with
%25
preserved?The text was updated successfully, but these errors were encountered: