elazarl / goproxy

An HTTP proxy library for Go
BSD 3-Clause "New" or "Revised" License
6.02k stars 1.09k forks source link

MITM of https requests doesn't allow %2F in the URL #61

Open mjg123 opened 10 years ago

mjg123 commented 10 years ago

I use: proxy.OnRequest().HandleConnect(goproxy.AlwaysMitm)

then, try to browse https://review.openstack.org but some pages break because of %2F in URLs like: https://review.openstack.org/projects/openstack%2Fnova/config

I assume these are being proxied into requests for https://review.openstack.org/projects/openstack/nova/config - which is a 404

elazarl commented 10 years ago

Hi, Since %2F is equivalent to / in URL encoding, it looks like Go's net/http.Request parser loses this information.

I'll investigate further later today.

Apologize for the time it took me to get back to you. Holidays season.

mjg123 commented 10 years ago

Yes - you've inherited a bug in a standard library by the looks of things: http://play.golang.org/p/vaIhOr1VUl