summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/libpod/images_pull.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-12 02:07:36 -0400
committerGitHub <noreply@github.com>2021-09-12 02:07:36 -0400
commitf785d8d1940a6cf3ac76f4c333d157bd9d4c76b7 (patch)
tree215fcf8cac010819b632cc4c564025413b93728c /pkg/api/handlers/libpod/images_pull.go
parent72662f790bad0a3dc26a6a1498b6daa936702bb6 (diff)
parentdeaf9692432bb6a9353fe56cecb6cddf0401a78c (diff)
downloadpodman-f785d8d1940a6cf3ac76f4c333d157bd9d4c76b7.tar.gz
podman-f785d8d1940a6cf3ac76f4c333d157bd9d4c76b7.tar.bz2
podman-f785d8d1940a6cf3ac76f4c333d157bd9d4c76b7.zip
Merge pull request #11517 from jwhonce/issues/10053
Refactor API server emphasis on logging
Diffstat (limited to 'pkg/api/handlers/libpod/images_pull.go')
-rw-r--r--pkg/api/handlers/libpod/images_pull.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/api/handlers/libpod/images_pull.go b/pkg/api/handlers/libpod/images_pull.go
index 3c13c6e20..fabdb326b 100644
--- a/pkg/api/handlers/libpod/images_pull.go
+++ b/pkg/api/handlers/libpod/images_pull.go
@@ -10,6 +10,7 @@ import (
"github.com/containers/image/v5/types"
"github.com/containers/podman/v3/libpod"
"github.com/containers/podman/v3/pkg/api/handlers/utils"
+ api "github.com/containers/podman/v3/pkg/api/types"
"github.com/containers/podman/v3/pkg/auth"
"github.com/containers/podman/v3/pkg/channel"
"github.com/containers/podman/v3/pkg/domain/entities"
@@ -23,8 +24,8 @@ import (
// transport or be normalized to one). Other transports are rejected as they
// do not make sense in a remote context.
func ImagesPull(w http.ResponseWriter, r *http.Request) {
- runtime := r.Context().Value("runtime").(*libpod.Runtime)
- decoder := r.Context().Value("decoder").(*schema.Decoder)
+ runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
+ decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder)
query := struct {
Reference string `schema:"reference"`
OS string `schema:"OS"`
@@ -107,7 +108,7 @@ func ImagesPull(w http.ResponseWriter, r *http.Request) {
}
w.WriteHeader(http.StatusOK)
- w.Header().Add("Content-Type", "application/json")
+ w.Header().Set("Content-Type", "application/json")
flush()
enc := json.NewEncoder(w)