mirror of https://github.com/containers/podman.git
pkg/api: BufferedResponseWriter flush correctly
Somehow my error message in top was never printed for the compat API, the libpod one using the same code worked fine. Turns out the compat one is using this buffered writter instaed but never made sure to flush it before closing the connection. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
d0505d6bac
commit
0ee19f08cf
|
@ -56,7 +56,9 @@ func (s *APIServer) apiWrapper(h http.HandlerFunc, w http.ResponseWriter, r *htt
|
|||
}
|
||||
|
||||
if buffer {
|
||||
w = newBufferedResponseWriter(w)
|
||||
bw := newBufferedResponseWriter(w)
|
||||
defer bw.b.Flush()
|
||||
w = bw
|
||||
}
|
||||
|
||||
h(w, r)
|
||||
|
|
Loading…
Reference in New Issue