Permalink
Browse files

Fix compatibility with JetS3t for S3 Object Copy

When JetS3t does an object copy, the source path, defined as Bucket/Object in
the x-amz-copy-source header, is fully encoded (including the slash separating
Bucket and Object).

However, Cumulus was expecting this slash to be unencoded. We now decode the
whole source path first.
  • Loading branch information...
1 parent f9342de commit 398526e680943239676b61de45b51ab8401e8e71 @priteau priteau committed Jul 8, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 cumulus/cb/pycb/cumulus.py
View
3 cumulus/cb/pycb/cumulus.py
@@ -46,6 +46,7 @@ def init_redirector(req, bucketName, objectName):
raise ex
def path_to_bucket_object(path):
+ path = urllib.unquote(path)
if path == "/":
return (path, None)
# extract out the bucket name
@@ -59,8 +60,6 @@ def path_to_bucket_object(path):
objectName = p_a[1].strip()
if objectName == "":
objectName = None
- else:
- objectName = urllib.unquote(objectName)
return (bucketName, objectName)
def createPath(headers, path):

0 comments on commit 398526e

Please sign in to comment.