浏览代码

Add json content type to /containers/json api endpoint

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Guillaume J. Charmes 11 年之前
父节点
当前提交
d5d948a038
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      api/api.go

+ 1 - 0
api/api.go

@@ -320,6 +320,7 @@ func getContainersJSON(eng *engine.Engine, version float64, w http.ResponseWrite
 	job.Setenv("limit", r.Form.Get("limit"))
 
 	if version >= 1.5 {
+		w.Header().Set("Content-Type", "application/json")
 		job.Stdout.Add(w)
 	} else if outs, err = job.Stdout.AddTable(); err != nil {
 		return err