Merge "Set HTTP PUT Content-Length for container actions"

This commit is contained in:
Jenkins
2014-12-27 07:23:53 +00:00
committed by Gerrit Code Review

View File

@@ -102,9 +102,11 @@ class ContainerManager(base.Manager):
return self._update(self._path(id), patch) return self._update(self._path(id), patch)
def _action(self, id, action, **kwargs): def _action(self, id, action, **kwargs):
kwargs.setdefault('headers', {})
kwargs['headers'].setdefault('Content-Length', '0')
resp, body = self.api.json_request('PUT', resp, body = self.api.json_request('PUT',
self._path(id) + action, self._path(id) + action,
kwargs) **kwargs)
return resp return resp
def start(self, id): def start(self, id):