Browse Source

Merge pull request #10019 from jfrazelle/9954-text-plain-content-type

Use "text/plain" content-type
Michael Crosby 10 years ago
parent
commit
9215c3901e

+ 1 - 1
api/client/hijack.go

@@ -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

+ 2 - 2
api/client/utils.go

@@ -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 {

+ 2 - 2
docs/sources/reference/api/docker_remote_api_v1.17.md

@@ -1616,12 +1616,12 @@ This API is valid only if `tty` was specified as part of creating and starting t
 **Example request**:
 
         POST /exec/e90e34656806/resize HTTP/1.1
-        Content-Type: plain/text
+        Content-Type: text/plain
 
 **Example response**:
 
         HTTP/1.1 201 OK
-        Content-Type: plain/text
+        Content-Type: text/plain
 
 Query Parameters: