proxy: handle encoded path in URL

fix issue #1362

Signed-off-by: Tw <tw19881113@gmail.com>
This commit is contained in:
Tw
2017-01-26 12:23:50 +08:00
parent 91ff734327
commit c37481cc7b
3 changed files with 62 additions and 11 deletions
-5
View File
@@ -273,11 +273,6 @@ func createUpstreamRequest(r *http.Request) *http.Request {
outreq.Body = nil
}
// Restore URL Path if it has been modified
if outreq.URL.RawPath != "" {
outreq.URL.Opaque = outreq.URL.RawPath
}
// We are modifying the same underlying map from req (shallow
// copied above) so we only copy it if necessary.
copiedHeaders := false