Ensure content is properly flushed before returning to the user
Fixes #553 Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
@@ -36,7 +36,6 @@ func file(rw http.ResponseWriter, req *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
instanceFile, err := core.InstanceFile(i, path)
|
instanceFile, err := core.InstanceFile(i, path)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
rw.WriteHeader(http.StatusInternalServerError)
|
rw.WriteHeader(http.StatusInternalServerError)
|
||||||
@@ -50,4 +49,6 @@ func file(rw http.ResponseWriter, req *http.Request) {
|
|||||||
rw.WriteHeader(http.StatusInternalServerError)
|
rw.WriteHeader(http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
encoder.Close()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user