Commit 68111d76 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow the specification.

PUT to shacache shall be done to shacache path, not shacache path+sha sum.

This break backward compatibility during upload, but download is used more
often.
parent a8b6de0e
......@@ -97,13 +97,12 @@ class NetworkcacheClient(object):
break
sha512sum.update(d)
sha512sum = sha512sum.hexdigest()
path = os.path.join(self.shacache_path, sha512sum)
file_descriptor.seek(0)
shacache_connection = httplib.HTTPConnection(self.shacache_host,
self.shacache_port)
try:
shacache_connection.request('PUT', path, file_descriptor,
shacache_connection.request('PUT', self.shacache_path, file_descriptor,
self.shacache_header_dict)
result = shacache_connection.getresponse()
data = result.read()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment