forked from Ivasoft/traefik
Upgrade oxy for websocket bug
This commit is contained in:
committed by
Traefiker
parent
16fc3675db
commit
ecf31097ea
7
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
7
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
@@ -128,6 +128,7 @@ func New(setters ...optSetter) (*Forwarder, error) {
|
||||
if f.httpForwarder.roundTripper == nil {
|
||||
f.httpForwarder.roundTripper = http.DefaultTransport
|
||||
}
|
||||
f.websocketForwarder.TLSClientConfig = f.httpForwarder.roundTripper.(*http.Transport).TLSClientConfig
|
||||
if f.httpForwarder.rewriter == nil {
|
||||
h, err := os.Hostname()
|
||||
if err != nil {
|
||||
@@ -317,7 +318,11 @@ func (f *websocketForwarder) copyRequest(req *http.Request, u *url.URL) (outReq
|
||||
}
|
||||
|
||||
if requestURI, err := url.ParseRequestURI(outReq.RequestURI); err == nil {
|
||||
outReq.URL.Path = requestURI.Path
|
||||
if requestURI.RawPath != "" {
|
||||
outReq.URL.Path = requestURI.RawPath
|
||||
} else {
|
||||
outReq.URL.Path = requestURI.Path
|
||||
}
|
||||
outReq.URL.RawQuery = requestURI.RawQuery
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user