diff --git a/CHANGELOG.md b/CHANGELOG.md index 57d99f6c6..889dd12de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [v1.3.6](https://github.com/containous/traefik/tree/v1.3.6) (2017-08-20) +[All Commits](https://github.com/containous/traefik/compare/v1.3.5...v1.3.6) + +**Bug fixes:** +- **[oxy,websocket]** Websocket parameters and protocol. ([#1970](https://github.com/containous/traefik/pull/1970) by [ldez](https://github.com/ldez)) + ## [v1.3.5](https://github.com/containous/traefik/tree/v1.3.5) (2017-08-01) [All Commits](https://github.com/containous/traefik/compare/v1.3.4...v1.3.5) diff --git a/glide.lock b/glide.lock index 50e64acd8..a6ddf84b2 100644 --- a/glide.lock +++ b/glide.lock @@ -1,4 +1,4 @@ -hash: b970da88f72aebed9ac07a31db3f40045de0cd63190a2aae8ce18b55ec3f434a +hash: 3d5a06016b7b56be08120ed653406a1e8d4ade7e69b4fbc37b31683cb4e9a519 updated: 2017-08-21T14:15:06.346751095+02:00 imports: - name: cloud.google.com/go @@ -477,7 +477,7 @@ imports: - name: github.com/urfave/negroni version: 490e6a555d47ca891a89a150d0c1ef3922dfffe9 - name: github.com/vulcand/oxy - version: 3772a8e4408fb033d00a947d340475e116854b1a + version: 321ed9ffd102941c736731b8e7bae811820d267d repo: https://github.com/containous/oxy.git vcs: git subpackages: diff --git a/glide.yaml b/glide.yaml index 2023623f8..ba1b19d9d 100644 --- a/glide.yaml +++ b/glide.yaml @@ -13,6 +13,7 @@ import: - package: github.com/containous/flaeg - package: github.com/vulcand/oxy version: 3772a8e4408fb033d00a947d340475e116854b1a + version: 321ed9ffd102941c736731b8e7bae811820d267d repo: https://github.com/containous/oxy.git vcs: git subpackages: diff --git a/integration/integration_test.go b/integration/integration_test.go index 505463367..618b76df3 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -22,26 +22,26 @@ func Test(t *testing.T) { } func init() { - check.Suite(&SimpleSuite{}) check.Suite(&AccessLogSuite{}) - check.Suite(&HTTPSSuite{}) - check.Suite(&TimeoutSuite{}) - check.Suite(&FileSuite{}) - check.Suite(&HealthCheckSuite{}) - check.Suite(&DockerSuite{}) - check.Suite(&ConsulSuite{}) - check.Suite(&ConsulCatalogSuite{}) - check.Suite(&EtcdSuite{}) - check.Suite(&MarathonSuite{}) - check.Suite(&ConstraintSuite{}) - check.Suite(&MesosSuite{}) - check.Suite(&EurekaSuite{}) check.Suite(&AcmeSuite{}) + check.Suite(&ConstraintSuite{}) + check.Suite(&ConsulCatalogSuite{}) + check.Suite(&ConsulSuite{}) + check.Suite(&DockerSuite{}) check.Suite(&DynamoDBSuite{}) check.Suite(&ErrorPagesSuite{}) - check.Suite(&WebsocketSuite{}) + check.Suite(&EtcdSuite{}) + check.Suite(&EurekaSuite{}) + check.Suite(&FileSuite{}) check.Suite(&GRPCSuite{}) + check.Suite(&HealthCheckSuite{}) + check.Suite(&HTTPSSuite{}) check.Suite(&LogRotationSuite{}) + check.Suite(&MarathonSuite{}) + check.Suite(&MesosSuite{}) + check.Suite(&SimpleSuite{}) + check.Suite(&TimeoutSuite{}) + check.Suite(&WebsocketSuite{}) } var traefikBinary = "../dist/traefik" diff --git a/vendor/github.com/vulcand/oxy/forward/fwd.go b/vendor/github.com/vulcand/oxy/forward/fwd.go index e2845afee..f7fafbfb8 100644 --- a/vendor/github.com/vulcand/oxy/forward/fwd.go +++ b/vendor/github.com/vulcand/oxy/forward/fwd.go @@ -258,7 +258,6 @@ func (f *websocketForwarder) serveHTTP(w http.ResponseWriter, req *http.Request, if outReq.URL.Scheme == "wss" && f.TLSClientConfig != nil { dialer.TLSClientConfig = f.TLSClientConfig } - targetConn, resp, err := dialer.Dial(outReq.URL.String(), outReq.Header) if err != nil { ctx.log.Errorf("Error dialing `%v`: %v", outReq.Host, err) @@ -308,7 +307,6 @@ func (f *websocketForwarder) copyRequest(req *http.Request, u *url.URL) (outReq outReq.URL = utils.CopyURL(req.URL) outReq.URL.Scheme = u.Scheme - outReq.URL.Path = outReq.RequestURI //sometimes backends might be registered as HTTP/HTTPS servers so translate URLs to websocket URLs. switch u.Scheme { @@ -318,9 +316,12 @@ func (f *websocketForwarder) copyRequest(req *http.Request, u *url.URL) (outReq outReq.URL.Scheme = "ws" } + if requestURI, err := url.ParseRequestURI(outReq.RequestURI); err == nil { + outReq.URL.Path = requestURI.Path + outReq.URL.RawQuery = requestURI.RawQuery + } + outReq.URL.Host = u.Host - // raw query is already included in RequestURI, so ignore it to avoid dupes - outReq.URL.RawQuery = "" outReq.Header = make(http.Header) //gorilla websocket use this header to set the request.Host tested in checkSameOrigin diff --git a/vendor/github.com/vulcand/oxy/forward/headers.go b/vendor/github.com/vulcand/oxy/forward/headers.go index d5d38bfd8..6d83c68cc 100644 --- a/vendor/github.com/vulcand/oxy/forward/headers.go +++ b/vendor/github.com/vulcand/oxy/forward/headers.go @@ -19,7 +19,6 @@ const ( SecWebsocketKey = "Sec-Websocket-Key" SecWebsocketVersion = "Sec-Websocket-Version" SecWebsocketExtensions = "Sec-Websocket-Extensions" - SecWebsocketProtocol = "Sec-Websocket-Protocol" SecWebsocketAccept = "Sec-Websocket-Accept" ) @@ -43,7 +42,6 @@ var WebsocketDialHeaders = []string{ SecWebsocketKey, SecWebsocketVersion, SecWebsocketExtensions, - SecWebsocketProtocol, SecWebsocketAccept, }