mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
Fix line delimited JSON response
For GET /events, line delimit JSON. Fixes #7047 Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com> Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jfrazelle@users.noreply.github.com> (github: )
This commit is contained in:
committed by
Jessica Frazelle
parent
68e07f3fa0
commit
d2f75a3040
@@ -278,6 +278,8 @@ func getEvents(eng *engine.Engine, version version.Version, w http.ResponseWrite
|
||||
}
|
||||
|
||||
var job = eng.Job("events")
|
||||
// lineDelimited JSON events was added #7047
|
||||
job.SetenvBool("lineDelim", version.GreaterThanOrEqualTo("1.15"))
|
||||
streamJSON(job, w, true)
|
||||
job.Setenv("since", r.Form.Get("since"))
|
||||
job.Setenv("until", r.Form.Get("until"))
|
||||
|
||||
Reference in New Issue
Block a user