mirror of
https://github.com/containers/podman.git
synced 2025-10-12 16:56:32 +08:00
API attach: return vnd.docker.multiplexed-stream header
The attach API used to always return the Content-Type `vnd.docker.raw-stream`, however docker api v1.42 added the `vnd.docker.multiplexed-stream` type when no tty was used. Follow suit and return the same header for docker api v1.42 and libpod v4.7.0. This technically allows clients to make a small optimization as they no longer need to inspect the container to see if they get a raw or multiplexed stream. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -569,7 +569,7 @@ func attachExecHTTP(c *Container, sessionID string, r *http.Request, w http.Resp
|
||||
hijackDone <- true
|
||||
|
||||
// Write a header to let the client know what happened
|
||||
writeHijackHeader(r, httpBuf)
|
||||
writeHijackHeader(r, httpBuf, isTerminal)
|
||||
|
||||
// Force a flush after the header is written.
|
||||
if err := httpBuf.Flush(); err != nil {
|
||||
|
Reference in New Issue
Block a user