summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-03-19 10:05:10 -0500
committerBrent Baude <bbaude@redhat.com>2020-03-19 10:05:10 -0500
commitd375424854b93e208c9605a2f1612a88db5035ec (patch)
treeaea09103eb424371d2126c692f8d3a820a996856 /pkg/api/handlers/compat
parente87fe4dbbbc55be42d7a31f5415f55d2ff99f81b (diff)
downloadpodman-d375424854b93e208c9605a2f1612a88db5035ec.tar.gz
podman-d375424854b93e208c9605a2f1612a88db5035ec.tar.bz2
podman-d375424854b93e208c9605a2f1612a88db5035ec.zip
fix reported compat issues
honor -1 in in list containers for compatibility mode. it is commonly used to indicate no limit. change the json id parameter to Id in container create. Fixes: #5553 Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r--pkg/api/handlers/compat/containers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers.go b/pkg/api/handlers/compat/containers.go
index 1298e7fa4..e7031f471 100644
--- a/pkg/api/handlers/compat/containers.go
+++ b/pkg/api/handlers/compat/containers.go
@@ -87,7 +87,7 @@ func ListContainers(w http.ResponseWriter, r *http.Request) {
utils.InternalServerError(w, err)
return
}
- if _, found := r.URL.Query()["limit"]; found {
+ if _, found := r.URL.Query()["limit"]; found && query.Limit != -1 {
last := query.Limit
if len(containers) > last {
containers = containers[len(containers)-last:]