diff --git a/components/engine/commands.go b/components/engine/commands.go index 6212459b42..8112af021f 100644 --- a/components/engine/commands.go +++ b/components/engine/commands.go @@ -1199,7 +1199,7 @@ func (cli *DockerCli) stream(method, path string, in io.Reader, out io.Writer) e if (method == "POST" || method == "PUT") && in == nil { in = bytes.NewReader([]byte{}) } - req, err := http.NewRequest(method, fmt.Sprintf("http://%s:%d/v%f%s", cli.addr, cli.port, API_VERSION, path), in) + req, err := http.NewRequest(method, fmt.Sprintf("http://%s:%d/v%g%s", cli.addr, cli.port, API_VERSION, path), in) if err != nil { return err } @@ -1230,7 +1230,7 @@ func (cli *DockerCli) stream(method, path string, in io.Reader, out io.Writer) e } func (cli *DockerCli) hijack(method, path string, setRawTerminal bool) error { - req, err := http.NewRequest(method, fmt.Sprintf("/v%f%s", API_VERSION, path), nil) + req, err := http.NewRequest(method, fmt.Sprintf("/v%g%s", API_VERSION, path), nil) if err != nil { return err }