Don't confuse with empty body

It fails with any (even empty) json request body.

Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
This commit is contained in:
Kanstantsin Shautsou 2016-08-17 01:36:37 +03:00
parent 6e70a976ba
commit 57db05cb10
No known key found for this signature in database
GPG Key ID: 9CD508743D8AAE1D
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ func (s *containerRouter) postContainersStart(ctx context.Context, w http.Respon
// A non-nil json object is at least 7 characters.
if r.ContentLength > 7 || r.ContentLength == -1 {
if versions.GreaterThanOrEqualTo(version, "1.24") {
return validationError{fmt.Errorf("starting container with HostConfig was deprecated since v1.10 and removed in v1.12")}
return validationError{fmt.Errorf("starting container with non-empty request body was deprecated since v1.10 and removed in v1.12")}
}
if err := httputils.CheckForJSON(r); err != nil {