mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix streaming JSON Content-type for postBuild
See #8101 lineDelim is used by streamJSON() so it needs to be set before its called. Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
This commit is contained in:
parent
44264f48e4
commit
30d6ff99fc
1 changed files with 3 additions and 1 deletions
|
@ -993,6 +993,9 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite
|
|||
}
|
||||
}
|
||||
|
||||
// This needs to be set before calls to streamJSON
|
||||
job.SetenvBool("lineDelim", version.GreaterThanOrEqualTo("1.15"))
|
||||
|
||||
if version.GreaterThanOrEqualTo("1.8") {
|
||||
job.SetenvBool("json", true)
|
||||
streamJSON(job, w, true)
|
||||
|
@ -1013,7 +1016,6 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite
|
|||
job.Setenv("q", r.FormValue("q"))
|
||||
job.Setenv("nocache", r.FormValue("nocache"))
|
||||
job.Setenv("forcerm", r.FormValue("forcerm"))
|
||||
job.SetenvBool("lineDelim", version.GreaterThanOrEqualTo("1.15"))
|
||||
job.SetenvJson("authConfig", authConfig)
|
||||
job.SetenvJson("configFile", configFile)
|
||||
|
||||
|
|
Loading…
Reference in a new issue