Update oxy for websocket bug

This commit is contained in:
SALLEYRON Julien 2017-09-07 16:06:04 +02:00 committed by Traefiker
parent 7fd1eb3780
commit 5c4931e235
3 changed files with 9 additions and 4 deletions

4
glide.lock generated
View file

@ -1,4 +1,4 @@
hash: 68fad31b1980075ca1e93f3883e1bbeb95022824c63defbecb4eafb240fded39
hash: c5a62552734b2e283ebedf94e6b711e7efa47d2b1b80f3dda6ca923317fef3c2
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
}