mirror of
https://github.com/containers/podman.git
synced 2025-05-21 17:16:22 +08:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user