Merge pull request #8101 from jfrazelle/6974-correct-ct-json-stream

Change content-type for json stream to application/x-json-stream.
This commit is contained in:
Victor Vieux
2014-09-23 11:24:31 -07:00
5 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ func (cli *DockerCli) streamHelper(method, path string, setRawTerminal bool, in
return fmt.Errorf("Error: %s", bytes.TrimSpace(body))
}
if api.MatchesContentType(resp.Header.Get("Content-Type"), "application/json") {
if api.MatchesContentType(resp.Header.Get("Content-Type"), "application/json") || api.MatchesContentType(resp.Header.Get("Content-Type"), "application/x-json-stream") {
return utils.DisplayJSONMessagesStream(resp.Body, stdout, cli.terminalFd, cli.isTerminal)
}
if stdout != nil || stderr != nil {