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

net/http: NewRequest surprising behaviour with escaped forward slashes #11991

Closed
samcday opened this issue Aug 3, 2015 · 1 comment
Closed
Milestone

Comments

@samcday
Copy link

samcday commented Aug 3, 2015

What version of Go are you using (go version)?
go version go1.4.2 darwin/amd64

What operating system and processor architecture are you using?
OSX Mavericks 10.10.4

What did you do?
I tried to issue a HTTP request using http.NewRequest like this:

req, _ := http.NewRequest("GET", "http://example.com/encoded%2fslashes", nil)

What did you expect to see?
I expected to see a request fired to the remote server with a path of /encoded%2fslashes.

What did you see instead?
A request was fired to the remote server with a path of /encoded/slashes.

@samcday
Copy link
Author

samcday commented Aug 3, 2015

Dup of #10887

@samcday samcday closed this as completed Aug 3, 2015
@mikioh mikioh changed the title http.NewRequest surprising behaviour with escaped forward slashes net/http: NewRequest surprising behaviour with escaped forward slashes Aug 3, 2015
@mikioh mikioh added this to the Go1.5 milestone Aug 3, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants