mirror of
https://github.com/kemko/reproxy.git
synced 2026-01-04 01:05:50 +03:00
Consider proxy configuration `*,/test/(.*),https://dest/$1`. When reproxy accepts a request with URL encoded path, i.e. '/test/a%205%25%20b/' which the encoded form of '/test/a 5% b', it is using request.URL.Path which is already URL decoded by Golang. This causes an error in proxy.go while it is trying to validate the destination with `url.Parse(match.Destination)` as, strictly speaking, destination URL is not a valid URL anymore, it is `https://target-dest/a 5% b`. With this fix, the original escaped URL stays as is, correctly passes the validation and then it is up to destination server to URL decode and correctly handle the URL.