浏览代码

Don't confuse with empty body

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

Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
Kanstantsin Shautsou 9 年之前
父节点
当前提交
57db05cb10
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      api/server/router/container/container_routes.go

+ 1 - 1
api/server/router/container/container_routes.go

@@ -137,7 +137,7 @@ func (s *containerRouter) postContainersStart(ctx context.Context, w http.Respon
 	// A non-nil json object is at least 7 characters.
 	// A non-nil json object is at least 7 characters.
 	if r.ContentLength > 7 || r.ContentLength == -1 {
 	if r.ContentLength > 7 || r.ContentLength == -1 {
 		if versions.GreaterThanOrEqualTo(version, "1.24") {
 		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 {
 		if err := httputils.CheckForJSON(r); err != nil {