mirror of
https://github.com/umputun/reproxy.git
synced 2024-11-25 23:52:43 +03:00
2e8733b152
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. |
||
---|---|---|
.. | ||
testdata | ||
cache_control_test.go | ||
cache_control.go | ||
error_reporter_test.go | ||
error_reporter.go | ||
handlers_test.go | ||
handlers.go | ||
health_test.go | ||
health.go | ||
matcher_mock.go | ||
proxy_test.go | ||
proxy.go | ||
ssl_test.go | ||
ssl.go |