From a423ab86f863dddd7019dd06b39e73b695ecd1ad Mon Sep 17 00:00:00 2001 From: Rohith Date: Sun, 7 Jan 2018 12:00:09 +0000 Subject: [PATCH] Websocket Fix The http2FancyWriter does not implement the http.Hijacker method causing the websocket upgrade to throw an exception. This PR fixes the issues by forcing the selection of httpFancyWriter{} --- middleware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware.go b/middleware.go index 8bb30058..e39c1b6b 100644 --- a/middleware.go +++ b/middleware.go @@ -51,7 +51,7 @@ func entrypointMiddleware(next http.Handler) http.Handler { // continue the flow scope := &RequestScope{} - resp := middleware.NewWrapResponseWriter(w, 2) + resp := middleware.NewWrapResponseWriter(w, 1) next.ServeHTTP(resp, req.WithContext(context.WithValue(req.Context(), contextScopeName, scope))) // place back the original uri for proxying request