{"action":"closed","issue":{"url":"https://api.github.com/repos/moby/moby/issues/33501","repository_url":"https://api.github.com/repos/moby/moby","labels_url":"https://api.github.com/repos/moby/moby/issues/33501/labels{/name}","comments_url":"https://api.github.com/repos/moby/moby/issues/33501/comments","events_url":"https://api.github.com/repos/moby/moby/issues/33501/events","html_url":"https://github.com/moby/moby/issues/33501","id":233313860,"number":33501,"title":"POST requests to start endpoint fails with ContentLength error","user":{"login":"FrenchBen","id":3965324,"avatar_url":"https://avatars3.githubusercontent.com/u/3965324?v=3","gravatar_id":"","url":"https://api.github.com/users/FrenchBen","html_url":"https://github.com/FrenchBen","followers_url":"https://api.github.com/users/FrenchBen/followers","following_url":"https://api.github.com/users/FrenchBen/following{/other_user}","gists_url":"https://api.github.com/users/FrenchBen/gists{/gist_id}","starred_url":"https://api.github.com/users/FrenchBen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrenchBen/subscriptions","organizations_url":"https://api.github.com/users/FrenchBen/orgs","repos_url":"https://api.github.com/users/FrenchBen/repos","events_url":"https://api.github.com/users/FrenchBen/events{/privacy}","received_events_url":"https://api.github.com/users/FrenchBen/received_events","type":"User","site_admin":false},"labels":[{"id":73615608,"url":"https://api.github.com/repos/moby/moby/labels/area/api","name":"area/api","color":"fbca04","default":false},{"id":190258329,"url":"https://api.github.com/repos/moby/moby/labels/kind/bug","name":"kind/bug","color":"FF8C94","default":false},{"id":439920748,"url":"https://api.github.com/repos/moby/moby/labels/platform/mac","name":"platform/mac","color":"F6FBFF","default":false},{"id":283253906,"url":"https://api.github.com/repos/moby/moby/labels/priority/P1","name":"priority/P1","color":"eb6420","default":false},{"id":616332869,"url":"https://api.github.com/repos/moby/moby/labels/version/17.06","name":"version/17.06","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/moby/moby/milestones/69","html_url":"https://github.com/moby/moby/milestone/69","labels_url":"https://api.github.com/repos/moby/moby/milestones/69/labels","id":2444280,"number":69,"title":"17.06.0","description":"","creator":{"login":"vieux","id":1032519,"avatar_url":"https://avatars3.githubusercontent.com/u/1032519?v=3","gravatar_id":"","url":"https://api.github.com/users/vieux","html_url":"https://github.com/vieux","followers_url":"https://api.github.com/users/vieux/followers","following_url":"https://api.github.com/users/vieux/following{/other_user}","gists_url":"https://api.github.com/users/vieux/gists{/gist_id}","starred_url":"https://api.github.com/users/vieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vieux/subscriptions","organizations_url":"https://api.github.com/users/vieux/orgs","repos_url":"https://api.github.com/users/vieux/repos","events_url":"https://api.github.com/users/vieux/events{/privacy}","received_events_url":"https://api.github.com/users/vieux/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":316,"state":"open","created_at":"2017-04-07T23:27:32Z","updated_at":"2017-06-08T23:56:05Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2017-06-02T22:03:31Z","updated_at":"2017-06-08T23:56:05Z","closed_at":"2017-06-08T23:56:05Z","body":"**Description**\r\n\r\nMaking an API request to start a container with an empty JSON string in the body will return the following error:\r\n`{\"message\":\"starting container with non-empty request body was deprecated since v1.10 and removed in v1.12\"}`\r\n\r\nThis functionality worked in all previous versions of docker but is now broken in 17.06.0-rc1\r\n\r\n**Steps to reproduce the issue:**\r\n1. Create a container\r\n2. Send a request to start the container via the API and an empty JSON string `{}`\r\n3. Get the above error\r\n\r\n```\r\n$ docker create --name my-test alpine top\r\n$ curl -vvv --unix-socket /var/run/docker.sock -X POST -H 'Content-Type: application/json' -d '{}' http://1.29/containers/my-test/start\r\nNote: Unnecessary use of -X or --request, POST is already inferred.\r\n*   Trying /var/run/docker.sock...\r\n...\r\n> POST /containers/my-test/start HTTP/1.1\r\n> Host: 1.29\r\n> User-Agent: curl/7.51.0\r\n> Accept: */*\r\n> Content-Type: application/json\r\n> Content-Length: 2\r\n>\r\n* upload completely sent off: 2 out of 2 bytes\r\n< HTTP/1.1 400 Bad Request\r\n< Api-Version: 1.30\r\n< Content-Length: 109\r\n< Content-Type: application/json\r\n< Date: Fri, 02 Jun 2017 21:57:20 GMT\r\n< Docker-Experimental: true\r\n< Ostype: linux\r\n< Server: Docker/17.06.0-ce-rc1 (linux)\r\n<\r\n{\"message\":\"starting container with non-empty request body was deprecated since v1.10 and removed in v1.12\"}\r\n* Curl_http_done: called premature == 0\r\n* Connection #0 to host 1.29 left intact\r\n```\r\nTo make it work:\r\n```\r\n$ curl --unix-socket /var/run/docker.sock -X POST -H 'Content-Type: application/json' -d '' http://1.29/containers/my-test/start\r\n```\r\n\r\n**Describe the results you received:**\r\n`{\"message\":\"starting container with non-empty request body was deprecated since v1.10 and removed in v1.12\"}`\r\n\r\n**Describe the results you expected:**\r\nFor the container to start\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\nhttps://github.com/moby/moby/blob/master/api/server/router/container/container_routes.go#L144\r\n\r\n\r\n\r\n**Output of `docker version`:**\r\n\r\n```                                                                                                                                          \r\nClient:\r\n Version:      17.06.0-ce-rc1\r\n API version:  1.30\r\n Go version:   go1.8.1\r\n Git commit:   7f8486a\r\n Built:        Wed May 31 02:56:01 2017\r\n OS/Arch:      darwin/amd64\r\n\r\nServer:\r\n Version:      17.06.0-ce-rc1\r\n API version:  1.30 (minimum version 1.12)\r\n Go version:   go1.8.1\r\n Git commit:   7f8486a\r\n Built:        Wed May 31 03:00:14 2017\r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\nVersion 17.06.0-rc1-ce-mac13 (18169)\r\n"}}
{"actor":{"display_login":"thaJeztah"}}