Multipart COPY operation fails when source filename contains + character #614

Closed
garnaat opened this Issue Jan 27, 2014 · 0 comments

1 participant

@garnaat

If you perform a bucket -> bucket cp or sync operation and one of the filenames in the source bucket contains a + character, you get this error:

ClientError: A client error (NoSuchKey) occurred when calling the UploadPartCopy operation: The specified key does not exist.

The problem is that the filename is not being quoted in the x-amz-copy-source header. For example, if the source filename is foo++bar.txt the header is:

x-amz-copy-source:fiebazfoobar/foo++bar.txt

but S3 expects it to be:

x-amz-copy-source:fiebazfoobar/foo%2B%2Bbar.txt

This only affects multipart COPY operations.

@garnaat garnaat was assigned Jan 27, 2014
@garnaat garnaat added a commit to garnaat/aws-cli that referenced this issue Jan 27, 2014
@garnaat garnaat Quote the filename in the x-amz-copy-source header for multipart COPY…
… operations. Fixes #614.
354c29e
@garnaat garnaat added a commit to garnaat/botocore that referenced this issue Jan 29, 2014
@garnaat garnaat Add event handler to quote the x-amz-copy-source header value as expe…
…cted by S3. Fixes aws/aws-cli#614.
59c6cd9
@jamesls jamesls added a commit to boto/botocore that referenced this issue Jan 30, 2014
@jamesls jamesls Merge branch 'release-0.32.0'
* release-0.32.0:
  Bumping version to 0.32.0
  Update models to the lastet version
  Backing out #221 for now.  It's causing errors in the integration tests.
  Add handler to override signature version based on cfg value
  Support one level of nested configs
  Add event handler to quote the x-amz-copy-source header value as expected by S3.  Fixes aws/aws-cli#614.
  Update EC2 to latest model
  Adding new EU endpoint for SES.
d3fdbca
@jamesls jamesls added a commit to jamesls/aws-cli that referenced this issue Mar 4, 2014
@garnaat garnaat Quote the filename in the x-amz-copy-source header for multipart COPY…
… operations. Fixes #614.
15e7b06
@jamesls jamesls added a commit to jamesls/botocore that referenced this issue Mar 4, 2014
@jamesls jamesls Reintroduce #221 c56ccc0
@jamesls jamesls added a commit that referenced this issue Mar 5, 2014
@jamesls jamesls Merge branch 'garnaat-fix-614' into develop
* garnaat-fix-614:
  Update CHANGELOG
  Don't encode the copy_source argument
  The fake session should no longer unquote the copy_source.
  Let botocore handle the quoting of the x-amz-copy-source header.
  Quote the filename in the x-amz-copy-source header for multipart COPY operations.  Fixes #614.

Conflicts:
	CHANGELOG.rst
22cc39f
@jamesls jamesls added a commit that referenced this issue Mar 6, 2014
@jamesls jamesls Merge branch 'release-1.3.1'
* release-1.3.1: (25 commits)
  Bumping version to 1.3.1
  Add ELB changelog item
  Update CHANGELOG with latest changes
  Fix regression when parsing number types in shorthand
  Use public rather than private members
  When JSON model's no_paramfile attribute is given, check for its value
  Add 691 to changelog
  Update bundled installer to work with pip 1.5
  Add Route53 max items test case
  More useful error and added tests
  Fix pagination with string params
  Update CHANGELOG
  Don't encode the copy_source argument
  The fake session should no longer unquote the copy_source.
  Let botocore handle the quoting of the x-amz-copy-source header.
  Quote the filename in the x-amz-copy-source header for multipart COPY operations.  Fixes #614.
  Fix integ test failure on windows
  Update changelog with create-snapshots issue
  Update CHANGELOG with issue 681
  Remove region check in s3 high level commands
  ...
e23ca3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment