Skip to content

net/url: setPath does not set rawPath for foo%252Fbar #76171

@ldesauw

Description

@ldesauw

Go version

1.25.3

Output of go env in your module/workspace:

AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/home/ldesauw/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/home/ldesauw/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3444246438=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE='/home/ldesauw/go/pkg/mod'
GONOPROXY='stash.ovh.net,github.com/ovhcloud-kms/*'
GONOSUMDB='stash.ovh.net,github.com/ovhcloud-kms/*'
GOOS='linux'
GOPATH='/home/ldesauw/go'
GOPRIVATE='stash.ovh.net,github.com/ovhcloud-kms/*'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/ldesauw/bin/go'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/ldesauw/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/ldesauw/bin/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.25.3'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

  1. Created an URL u
  2. Called `u.SetPath("foo%252Fbar")

What did you see happen?

The RawPath was equal to ""

What did you expect to see?

The RawPath equal to "foo%252Fbar"

Metadata

Metadata

Assignees

No one assigned

    Labels

    WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions