From 56c275a9bf21d1edbc038423144019d897f96f75 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 17 Jun 2016 13:07:04 +0100 Subject: [PATCH] Copy Docker's response code through for raw stream. This means when Docker says "101 UPGRADED" the proxy will say the same, instead of "200 OK". Docker 1.12 barfs if you do that. --- proxy/proxy_intercept.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/proxy_intercept.go b/proxy/proxy_intercept.go index 45a16558..42373914 100644 --- a/proxy/proxy_intercept.go +++ b/proxy/proxy_intercept.go @@ -78,7 +78,7 @@ func doRawStream(w http.ResponseWriter, resp *http.Response, client *httputil.Cl defer down.Close() defer up.Close() - if _, err := down.Write([]byte("HTTP/1.1 200 OK\n")); err != nil { + if _, err := down.Write([]byte("HTTP/1.1 " + resp.Status + "\n")); err != nil { Log.Warning(err) return }