X-Git-Url: https://code.grnet.gr/git/pithos/blobdiff_plain/cfac048c9b582930f34026738941bd041d737386..1d9ec8fbb05e9c2058c87b01f694cc5278e2497d:/tools/store diff --git a/tools/store b/tools/store index cdf449a..d19dcd6 100755 --- a/tools/store +++ b/tools/store @@ -10,7 +10,7 @@ import json import logging -DEFAULT_HOST = '127.0.0.1:9000' +DEFAULT_HOST = 'pithos.dev.grnet.gr' DEFAULT_API = 'v1' @@ -36,9 +36,10 @@ class Client(object): kwargs = {} kwargs['headers'] = headers or {} + kwargs['headers']['Content-Length'] = len(body) if body else 0 if body: - kwargs['headers']['Content-Length'] = len(body) kwargs['body'] = body + kwargs['headers']['Content-Type'] = 'application/octet-stream' conn.request(method, full_path, **kwargs) resp = conn.getresponse()