Commit ebbd6e08 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow the updated specification.

In order to create subresource of /path/ it is required to use POST not PUT.

References:

 * http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5
 * http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6
parent e89bf751
......@@ -102,7 +102,7 @@ class NetworkcacheClient(object):
shacache_connection = httplib.HTTPConnection(self.shacache_host,
self.shacache_port)
try:
shacache_connection.request('PUT', self.shacache_path, file_descriptor,
shacache_connection.request('POST', self.shacache_path, file_descriptor,
self.shacache_header_dict)
result = shacache_connection.getresponse()
data = result.read()
......@@ -131,7 +131,7 @@ class NetworkcacheClient(object):
shadir_connection = httplib.HTTPConnection(self.shadir_host,
self.shadir_port)
try:
shadir_connection.request('PUT', path, json.dumps(data),
shadir_connection.request('POST', path, json.dumps(data),
self.shadir_header_dict)
result = shadir_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