From d653391cdd6c997dd0b2a42b1ec0fac01253ac9f Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Thu, 14 Sep 2017 11:09:36 +0200 Subject: [PATCH] feat(api): write Docker response code when using local proxy (#1192) --- api/http/proxy/socket.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/http/proxy/socket.go b/api/http/proxy/socket.go index 740010a63..5a9158492 100644 --- a/api/http/proxy/socket.go +++ b/api/http/proxy/socket.go @@ -34,6 +34,9 @@ func (proxy *socketProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Add(k, v) } } + + w.WriteHeader(res.StatusCode) + if _, err := io.Copy(w, res.Body); err != nil { httperror.WriteErrorResponse(w, err, http.StatusInternalServerError, nil) }