Skip to content

Commit

Permalink
Merge pull request #7638 from jwhonce/wip/archive
Browse files Browse the repository at this point in the history
Correct HTTP methods for /containers/{id}/archive
  • Loading branch information
openshift-merge-robot authored Sep 15, 2020
2 parents e7af517 + e73db4b commit bec96ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/api/server/register_archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bec96ab

Please sign in to comment.