From e457b21db32359af085b04b5900ca6aab993ac86 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Mon, 6 Oct 2014 16:43:09 +0300 Subject: [PATCH] Fix Host header on stream commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #8407 Setting Host on URL only works if the Request does not already have its Host property set. Note that the API version was also swallowed. Signed-off-by: Tõnis Tiigi (github: tonistiigi) --- api/client/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/client/utils.go b/api/client/utils.go index 0d8310cbba..415046a5f8 100644 --- a/api/client/utils.go +++ b/api/client/utils.go @@ -131,7 +131,7 @@ func (cli *DockerCli) streamHelper(method, path string, setRawTerminal bool, in in = bytes.NewReader([]byte{}) } - req, err := http.NewRequest(method, fmt.Sprintf("http://v%s%s", api.APIVERSION, path), in) + req, err := http.NewRequest(method, fmt.Sprintf("/v%s%s", api.APIVERSION, path), in) if err != nil { return err }