Use the official mime type that exists instead of an imaginary one that does not.

Signed-off-by: Jean-Paul Calderone <exarkun@twistedmatrix.com>

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@linux.com> (github: jfrazelle)
This commit is contained in:
Jean-Paul Calderone 2015-01-07 11:19:14 -05:00 committed by Jessica Frazelle
parent 91b5634dee
commit f29ee87051
2 changed files with 4 additions and 4 deletions

View File

@ -134,7 +134,7 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
return err
}
req.Header.Set("User-Agent", "Docker-Client/"+dockerversion.VERSION)
req.Header.Set("Content-Type", "plain/text")
req.Header.Set("Content-Type", "text/plain")
req.Header.Set("Connection", "Upgrade")
req.Header.Set("Upgrade", "tcp")
req.Host = cli.addr

View File

@ -89,7 +89,7 @@ func (cli *DockerCli) call(method, path string, data interface{}, passAuthInfo b
if data != nil {
req.Header.Set("Content-Type", "application/json")
} else if method == "POST" {
req.Header.Set("Content-Type", "plain/text")
req.Header.Set("Content-Type", "text/plain")
}
resp, err := cli.HTTPClient().Do(req)
if err != nil {
@ -135,7 +135,7 @@ func (cli *DockerCli) streamHelper(method, path string, setRawTerminal bool, in
req.URL.Host = cli.addr
req.URL.Scheme = cli.scheme
if method == "POST" {
req.Header.Set("Content-Type", "plain/text")
req.Header.Set("Content-Type", "text/plain")
}
if headers != nil {
@ -260,7 +260,7 @@ func (cli *DockerCli) monitorTtySize(id string, isExec bool) error {
sigchan := make(chan os.Signal, 1)
gosignal.Notify(sigchan, signal.SIGWINCH)
go func() {
for _ = range sigchan {
for range sigchan {
cli.resizeTty(id, isExec)
}
}()