From 5c4931e23524a47821af242426e09a2798766ccf Mon Sep 17 00:00:00 2001 From: SALLEYRON Julien Date: Thu, 7 Sep 2017 16:06:04 +0200 Subject: [PATCH] Update oxy for websocket bug --- glide.lock | 4 ++-- glide.yaml | 2 +- vendor/github.com/vulcand/oxy/forward/fwd.go | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/glide.lock b/glide.lock index 93f62b790..565142835 100644 --- a/glide.lock +++ b/glide.lock @@ -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: diff --git a/glide.yaml b/glide.yaml index c286e58ec..cdfa3c63f 100644 --- a/glide.yaml +++ b/glide.yaml @@ -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: diff --git a/vendor/github.com/vulcand/oxy/forward/fwd.go b/vendor/github.com/vulcand/oxy/forward/fwd.go index f7fafbfb8..04974ad4d 100644 --- a/vendor/github.com/vulcand/oxy/forward/fwd.go +++ b/vendor/github.com/vulcand/oxy/forward/fwd.go @@ -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 }