Skip to content

Make signurl work with objects containing tildes.#783

Merged
houglum merged 1 commit into
GoogleCloudPlatform:masterfrom
houglum:signurl-with-tildes
May 20, 2019
Merged

Make signurl work with objects containing tildes.#783
houglum merged 1 commit into
GoogleCloudPlatform:masterfrom
houglum:signurl-with-tildes

Conversation

@houglum

@houglum houglum commented May 20, 2019

Copy link
Copy Markdown
Collaborator

Fixes https://issuetracker.google.com/issues/133019153

Per the docs, the tilde character should not be percent-encoded:

When defining the path to the resource, you must percent encode the
following reserved characters: ?=!#$&'()*+,:;@[]."

https://cloud.google.com/storage/docs/access-control/signing-urls-manually

Note that Python 3's urllib quote method ignores the tilde, but Python
2's does not:

  • Py2 docs: "Letters, digits, and the characters '_.-' are never quoted."
  • Py3 docs: "Letters, digits, and the characters '_.-~' are never quoted."

Fixes https://issuetracker.google.com/issues/133019153

Per the docs, the tilde character should not be percent-encoded:

When defining the path to the resource, you must percent encode the
following reserved characters: ?=!#$&'()*+,:;@[]."

https://cloud.google.com/storage/docs/access-control/signing-urls-manually

Note that Python 3's urllib quote method ignores the tilde, but Python
2's does not:
- Py2 docs: "Letters, digits, and the characters '_.-' are never quoted."
- Py3 docs: "Letters, digits, and the characters '_.-~' are never quoted."
@houglum houglum requested a review from catleeball May 20, 2019 18:15

@catleeball catleeball left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Ship it! ⛵

@houglum houglum merged commit 5fe3491 into GoogleCloudPlatform:master May 20, 2019
houglum added a commit to houglum/gsutil that referenced this pull request Jun 28, 2019
The tilde behavior was changed between 2 and 3; this also bit us in
another issue, see GoogleCloudPlatform#783.
houglum added a commit that referenced this pull request Jun 28, 2019
The tilde behavior was changed between 2 and 3; this also bit us in
another issue, see #783.
houglum added a commit that referenced this pull request Jun 28, 2019
The tilde behavior was changed between 2 and 3; this also bit us in
another issue, see #783.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants