mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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)
This commit is contained in:
parent
983edd40fa
commit
d5d948a038
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue