diff options
author | Ed Santiago <santiago@redhat.com> | 2020-08-27 12:57:33 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 12:57:33 -0600 |
commit | b13af4537fea0647c029067c664f1e79e0a6c3e6 (patch) | |
tree | 98163cb6467b5742ed73e2dbbc8be77b884fbce2 /libpod/oci.go | |
parent | 7d3cadcc54cbad9a109471f586c10541544bc7db (diff) | |
parent | 2ea9dac5e1d00b2820bd7156e3bea4b9fd98c1e6 (diff) | |
download | podman-b13af4537fea0647c029067c664f1e79e0a6c3e6.tar.gz podman-b13af4537fea0647c029067c664f1e79e0a6c3e6.tar.bz2 podman-b13af4537fea0647c029067c664f1e79e0a6c3e6.zip |
Merge pull request #7451 from mheon/fix_7195
Send HTTP Hijack headers after successful attach
Diffstat (limited to 'libpod/oci.go')
-rw-r--r-- | libpod/oci.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libpod/oci.go b/libpod/oci.go index 89850affc..924c32510 100644 --- a/libpod/oci.go +++ b/libpod/oci.go @@ -1,8 +1,7 @@ package libpod import ( - "bufio" - "net" + "net/http" "github.com/containers/podman/v2/libpod/define" "k8s.io/client-go/tools/remotecommand" @@ -63,7 +62,7 @@ type OCIRuntime interface { // used instead. Detach keys of "" will disable detaching via keyboard. // The streams parameter will determine which streams to forward to the // client. - HTTPAttach(ctr *Container, httpConn net.Conn, httpBuf *bufio.ReadWriter, streams *HTTPAttachStreams, detachKeys *string, cancel <-chan bool) error + HTTPAttach(ctr *Container, r *http.Request, w http.ResponseWriter, streams *HTTPAttachStreams, detachKeys *string, cancel <-chan bool, hijackDone chan<- bool, streamAttach, streamLogs bool) error // AttachResize resizes the terminal in use by the given container. AttachResize(ctr *Container, newSize remotecommand.TerminalSize) error @@ -80,7 +79,7 @@ type OCIRuntime interface { // Maintains the same invariants as ExecContainer (returns on session // start, with a goroutine running in the background to handle attach). // The HTTP attach itself maintains the same invariants as HTTPAttach. - ExecContainerHTTP(ctr *Container, sessionID string, options *ExecOptions, httpConn net.Conn, httpBuf *bufio.ReadWriter, streams *HTTPAttachStreams, cancel <-chan bool) (int, chan error, error) + ExecContainerHTTP(ctr *Container, sessionID string, options *ExecOptions, r *http.Request, w http.ResponseWriter, streams *HTTPAttachStreams, cancel <-chan bool, hijackDone chan<- bool, holdConnOpen <-chan bool) (int, chan error, error) // ExecContainerDetached executes a command in a running container, but // does not attach to it. Returns the PID of the exec session and an // error (if starting the exec session failed) |