summaryrefslogtreecommitdiff
path: root/server/src/leap
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-03-19 10:16:55 +0100
committerdrebs <drebs@leap.se>2017-04-04 18:27:36 +0200
commit36183b7c9daa68ca120ef80767f311faba588cc6 (patch)
treeb180d7fcb108cf9851c5487fa92cf17d612925ed /server/src/leap
parentc082a2d030bb9a40a198c0e1451535fd2df40159 (diff)
[bug] use postpath to get blobs user and id in server
Diffstat (limited to 'server/src/leap')
-rw-r--r--server/src/leap/soledad/server/_blobs.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py
index e90c6672..d5476aae 100644
--- a/server/src/leap/soledad/server/_blobs.py
+++ b/server/src/leap/soledad/server/_blobs.py
@@ -189,21 +189,15 @@ class BlobsResource(resource.Resource):
def render_GET(self, request):
logger.info("http get: %s" % request.path)
- user, blob_id = self._split_path(request.path)
+ user, blob_id = request.postpath
self._handler.tag_header(user, blob_id, request)
return self._handler.read_blob(user, blob_id, request)
def render_PUT(self, request):
logger.info("http put: %s" % request.path)
- user, blob_id = self._split_path(request.path)
+ user, blob_id = request.postpath
return self._handler.write_blob(user, blob_id, request)
- def _split_path(self, blob_id):
- # FIXME catch errors here
- parts = blob_id.split('/')
- _, user, blobname = parts
- return user, blobname
-
# provide a configured instance of the resource
_config = get_config()