Merge pull request #3974 from creack/3967-add_content_type-fix
Add json content type to /containers/json api endpoint Upstream-commit: 22aeae34c1d257956e6201697e30dd64028a1182 Component: engine
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user