Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Fix compatibility with JetS3t for S3 Object Copy
Browse files Browse the repository at this point in the history
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
priteau committed Jul 8, 2011
1 parent f9342de commit 398526e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cumulus/cb/pycb/cumulus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 398526e

Please sign in to comment.