1
0
mirror of https://github.com/containous/traefik.git synced 2024-10-27 01:55:17 +03:00

Upgrade oxy for websocket bug

This commit is contained in:
SALLEYRON Julien 2017-09-08 16:14:03 +02:00 committed by Traefiker
parent 16fc3675db
commit ecf31097ea
3 changed files with 9 additions and 4 deletions

4
glide.lock generated
View File

@ -1,4 +1,4 @@
hash: fd8e1bbabefc71e0fc1551dcf67688d0b5ad1f23168a5c0256b8c98dda1b1fb3
hash: 7b973a5de5444f7f29252ae78529ee50569174b2c17f4aa89bf15aaf2553c6b7
updated: 2017-08-25T11:52:16.848940186+02:00
imports:
- name: cloud.google.com/go
@ -479,7 +479,7 @@ imports:
- name: github.com/urfave/negroni
version: 490e6a555d47ca891a89a150d0c1ef3922dfffe9
- name: github.com/vulcand/oxy
version: 7baa97f97557ff96be2798972dc831c7ba0a46e7
version: 6c94d2888dba2b1a15a89b8a2ca515fc85e07477
repo: https://github.com/containous/oxy.git
vcs: git
subpackages:

View File

@ -12,7 +12,7 @@ import:
- package: github.com/cenk/backoff
- package: github.com/containous/flaeg
- package: github.com/vulcand/oxy
version: 7baa97f97557ff96be2798972dc831c7ba0a46e7
version: 6c94d2888dba2b1a15a89b8a2ca515fc85e07477
repo: https://github.com/containous/oxy.git
vcs: git
subpackages:

View File

@ -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
}