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

Quote the filename in the x-amz-copy-source header for multipart COPY operations #615

Closed
wants to merge 3 commits into from

Conversation

garnaat
Copy link
Contributor

@garnaat garnaat commented Jan 27, 2014

Fixes #614.

@jamesls
Copy link
Member

jamesls commented Jan 28, 2014

Should this be fixed in the botocore layer? I think we have this problem for CopyObject as well.

@garnaat
Copy link
Contributor Author

garnaat commented Jan 28, 2014

I guess we could add event handlers in botocore to fix this in the request. That makes a more general solution. I can update.

@jamesls
Copy link
Member

jamesls commented Jan 28, 2014

@garnaat Is it not the case that this should apply to all header values in a rest-xml request? I image we'd run into similar issues for any header values with utf-8 characters. Maybe we can just fix this in endpoint.RestEndpoint.

@garnaat
Copy link
Contributor Author

garnaat commented Jan 29, 2014

No, I don't think that is the case. For example, if you just try to quote all of the header values you end up with this:

x-amz-copy-source:fiebazfoobar/foo%2B%2Bbar.txt
x-amz-copy-source-range:bytes%3D44040192-51199999

And then you get an error from S3 saying:

The x-amz-copy-source-range value must be of the form bytes=first-last where first and last are the zero-based offsets of the first and last bytes to copy

The weird thing is that there is really no reason for header values to be URL-quoted. But S3 is expecting this particular value to be quoted and so interprets + characters as spaces if they aren't URL-quoted. So, I was thinking we could do a very specify event handler for this.

@jamesls
Copy link
Member

jamesls commented Jan 29, 2014

Oh ok, yeah that makes sense to have a specific handler.

@garnaat
Copy link
Contributor Author

garnaat commented Jan 29, 2014

I'm not really sure if the Python3 issue in the unit tests that Travis is complaining about is a bug in the code or a bug in the test harness.

@jamesls
Copy link
Member

jamesls commented Jan 29, 2014

Do the CLI integration tests pass? If so I'd think it's likely a bug in the fake_session somewhere.

jamesls added a commit to jamesls/aws-cli that referenced this pull request Mar 4, 2014
Picks up on where aws#615 left off.
@jamesls
Copy link
Member

jamesls commented Mar 5, 2014

Closing in favor of #688

@jamesls jamesls closed this Mar 5, 2014
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this pull request Feb 12, 2022
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this pull request Feb 12, 2022
* fix: Functional tests must run on localhost to work in Windows (aws#552)

* fix: spacing typo in Log statement in start-lambda (aws#559)

* docs: Fix syntax highlighting in README.md (aws#561)

* docs: Change jest to mocha in Nodejs init README (aws#564)

* docs: Fix @mhart link in README (aws#562)

* docs(README): removed cloudtrail, added SNS to generate-event (aws#569)

* docs: Update repo name references (aws#577)

* feat(debugging): Fixing issues around debugging Golang functions. (aws#565)

* fix(init): Improve current init samples around docs and fixes (aws#558)

* docs(README): Update launch config to SAM CLI from SAM Local (aws#587)

* docs(README): Update sample code for calling Local Lambda Invoke (aws#584)

* refactor(init): renamed handler for camel case, moved callback call up (aws#586)

* chore: aws-lambda-java-core 1.1.0 -> 1.2.0 for java sam init (aws#578)

* feat(validate): Add profile and region options (aws#582)

Currently, `sam validate` requires AWS Creds (due to the SAM Translator).
This commits adds the ability to pass in the credientials through a profile
that is configured through `aws configure`.

* docs(README): Update README prerequisites to include awscli (aws#596)

* fix(start-lambda): Remove Content-Type Header check (aws#594)

* docs: Disambiguation "Amazon Kinesis" (aws#599)

* docs: Adding instructions for how to add pyenv to your PATH for Windows (aws#600)

* docs: Update README with small grammar fix (aws#601)

* fix: Update link in NodeJS package.json (aws#603)

* docs: Creating instructions for Windows users to install sam (aws#605)

* docs: Adding a note directing Windows users to use pipenv (aws#606)

* fix: Fix stringifying λ environment variables when using Python2 (aws#579)

* feat(generate-event): Added support for 50+ events (aws#612)

* feat(invoke): Add region parameter to all invoke related commands (aws#608)

* docs: Breaking up README into separate files to make it easier to read (aws#607)

* chore: Update JVM size params to match docker-lambda (aws#615)

* feat(invoke): Invoke Function Without Parameters through --no-event (aws#604)

* docs: Update advanced_usage.rst with clarification on --env-vars usage (aws#610)

* docs: Remove an extra word in the sam packaging command (aws#618)

* UX: Improves event names to reflect Lambda Event Sources (aws#619)

* docs: Fix git clone typo in installation docs (aws#630)

* docs(README): Callout go1.x runtime support (aws#631)

* docs(installation): Update sam --version command (aws#634)

* chore(0.6.0): SAM CLI Version bump (aws#635)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multipart COPY operation fails when source filename contains + character
2 participants