mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix Host header on stream commands
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 <tonistiigi@gmail.com> (github: tonistiigi)
This commit is contained in:
parent
44264f48e4
commit
e457b21db3
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ func (cli *DockerCli) streamHelper(method, path string, setRawTerminal bool, in
|
||||||
in = bytes.NewReader([]byte{})
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue