summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-09-15 08:11:49 -0700
committerJhon Honce <jhonce@redhat.com>2020-09-15 08:11:49 -0700
commite73db4b43a6f0237f5f0c03156473c2d8656e1c2 (patch)
tree9642b704c28decdfa6568983dd9bac9e109ac6f2 /pkg/api
parent3f6045ce20f02257bcab7a51bcd884a5321ca7db (diff)
downloadpodman-e73db4b43a6f0237f5f0c03156473c2d8656e1c2.tar.gz
podman-e73db4b43a6f0237f5f0c03156473c2d8656e1c2.tar.bz2
podman-e73db4b43a6f0237f5f0c03156473c2d8656e1c2.zip
Correct HTTP methods for /containers/{id}/archive
Make methods align with Docker API Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/server/register_archive.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/api/server/register_archive.go b/pkg/api/server/register_archive.go
index 5931c2fc9..b2d2543c4 100644
--- a/pkg/api/server/register_archive.go
+++ b/pkg/api/server/register_archive.go
@@ -9,7 +9,7 @@ import (
)
func (s *APIServer) registerAchiveHandlers(r *mux.Router) error {
- // swagger:operation POST /containers/{name}/archive compat putArchive
+ // swagger:operation PUT /containers/{name}/archive compat putArchive
// ---
// summary: Put files into a container
// description: Put a tar archive of files into a container
@@ -84,9 +84,9 @@ func (s *APIServer) registerAchiveHandlers(r *mux.Router) error {
// $ref: "#/responses/NoSuchContainer"
// 500:
// $ref: "#/responses/InternalError"
- r.HandleFunc(VersionedPath("/containers/{name}/archive"), s.APIHandler(compat.Archive)).Methods(http.MethodGet, http.MethodPost)
+ r.HandleFunc(VersionedPath("/containers/{name}/archive"), s.APIHandler(compat.Archive)).Methods(http.MethodGet, http.MethodPut, http.MethodHead)
// Added non version path to URI to support docker non versioned paths
- r.HandleFunc("/containers/{name}/archive", s.APIHandler(compat.Archive)).Methods(http.MethodGet, http.MethodPost)
+ r.HandleFunc("/containers/{name}/archive", s.APIHandler(compat.Archive)).Methods(http.MethodGet, http.MethodPut, http.MethodHead)
/*
Libpod