diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/compat/containers_create.go | 8 | ||||
-rw-r--r-- | pkg/api/handlers/compat/events.go | 8 | ||||
-rw-r--r-- | pkg/api/server/docs.go | 10 |
3 files changed, 17 insertions, 9 deletions
diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go index 4ad6aa862..cbcda474a 100644 --- a/pkg/api/handlers/compat/containers_create.go +++ b/pkg/api/handlers/compat/containers_create.go @@ -159,10 +159,10 @@ func makeCreateConfig(ctx context.Context, containerConfig *config.Config, input User: input.User, } pidConfig := createconfig.PidConfig{PidMode: namespaces.PidMode(input.HostConfig.PidMode)} - volumes := make([]string, 0, len(input.Volumes)) - for k := range input.Volumes { - volumes = append(volumes, k) - } + // TODO: We should check that these binds are all listed in the `Volumes` + // key since it doesn't make sense to define a `Binds` element for a + // container path which isn't defined as a volume + volumes := input.HostConfig.Binds // Docker is more flexible about its input where podman throws // away incorrectly formatted variables so we cannot reuse the diff --git a/pkg/api/handlers/compat/events.go b/pkg/api/handlers/compat/events.go index 9d5cb5045..8c4ad575b 100644 --- a/pkg/api/handlers/compat/events.go +++ b/pkg/api/handlers/compat/events.go @@ -29,8 +29,14 @@ func filtersFromRequest(r *http.Request) ([]string, error) { compatFilters map[string]map[string]bool filters map[string][]string libpodFilters []string + raw []byte ) - raw := []byte(r.Form.Get("filters")) + + if _, found := r.URL.Query()["filters"]; found { + raw = []byte(r.Form.Get("filters")) + } else { + return []string{}, nil + } // Backwards compat with older versions of Docker. if err := json.Unmarshal(raw, &compatFilters); err == nil { diff --git a/pkg/api/server/docs.go b/pkg/api/server/docs.go index 124c16092..1aaf31117 100644 --- a/pkg/api/server/docs.go +++ b/pkg/api/server/docs.go @@ -1,8 +1,10 @@ -// Package api Provides a container compatible interface. (Experimental) +// Package api Provides a container compatible interface. // -// This documentation describes the HTTP Libpod interface. It is to be considered -// only as experimental as this point. The endpoints, parameters, inputs, and -// return values can all change. +// This documentation describes the Podman v2.0 RESTful API. +// It replaces the Podman v1.0 API and was initially delivered +// along with Podman v2.0. It consists of a Docker-compatible +// API and a Libpod API providing support for Podman’s unique +// features such as pods. // // To start the service and keep it running for 5,000 seconds (-t 0 runs forever): // |