aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat/resize.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-02 06:08:21 -0400
committerGitHub <noreply@github.com>2020-06-02 06:08:21 -0400
commit94f2241831e30faf8a087194b3cb4e722b8355cd (patch)
treef8745e7414c086890138072b8b9346eb0dd4544e /pkg/api/handlers/compat/resize.go
parentcc021546c5212c2dcab41d183b33eaf262fdb0d8 (diff)
parent45a7e7266e14f2b759806f05eeb526d0524cf648 (diff)
downloadpodman-94f2241831e30faf8a087194b3cb4e722b8355cd.tar.gz
podman-94f2241831e30faf8a087194b3cb4e722b8355cd.tar.bz2
podman-94f2241831e30faf8a087194b3cb4e722b8355cd.zip
Merge pull request #6411 from mheon/exec_bindings
Add bindings for exec and enable attached remote exec
Diffstat (limited to 'pkg/api/handlers/compat/resize.go')
-rw-r--r--pkg/api/handlers/compat/resize.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/resize.go b/pkg/api/handlers/compat/resize.go
index 231b53175..478a8fab4 100644
--- a/pkg/api/handlers/compat/resize.go
+++ b/pkg/api/handlers/compat/resize.go
@@ -8,6 +8,7 @@ import (
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/pkg/api/handlers/utils"
+ "github.com/gorilla/mux"
"github.com/gorilla/schema"
"github.com/pkg/errors"
"k8s.io/client-go/tools/remotecommand"
@@ -37,9 +38,9 @@ func ResizeTTY(w http.ResponseWriter, r *http.Request) {
}
var status int
- name := utils.GetName(r)
switch {
case strings.Contains(r.URL.Path, "/containers/"):
+ name := utils.GetName(r)
ctnr, err := runtime.LookupContainer(name)
if err != nil {
utils.ContainerNotFound(w, name, err)
@@ -61,6 +62,7 @@ func ResizeTTY(w http.ResponseWriter, r *http.Request) {
// reasons.
status = http.StatusOK
case strings.Contains(r.URL.Path, "/exec/"):
+ name := mux.Vars(r)["id"]
ctnr, err := runtime.GetExecSessionContainer(name)
if err != nil {
utils.SessionNotFound(w, name, err)