Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
garnaat opened this issue Jan 27, 2014 · 0 comments · Fixed by boto/botocore#221 or boto/botocore#250
Assignees
Labels
bug This issue is a bug.

Comments

@garnaat
Copy link
Contributor

garnaat commented Jan 27, 2014

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.

@ghost ghost assigned garnaat Jan 27, 2014
garnaat added a commit to garnaat/botocore that referenced this issue Jan 29, 2014
jamesls added a commit to boto/botocore that referenced this issue Jan 30, 2014
* 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.
jamesls pushed a commit to jamesls/aws-cli that referenced this issue Mar 4, 2014
jamesls added a commit to jamesls/botocore that referenced this issue Mar 4, 2014
jamesls added a commit that referenced this issue Mar 5, 2014
* 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
jamesls added a commit that referenced this issue Mar 6, 2014
* 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
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment