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

AWS: allow dots ('.') in bucket name during upload. #63

Closed

Conversation

astraw
Copy link

@astraw astraw commented Feb 1, 2015

Previously, HTTPS certificate validation would fail if dots were in
the bucket name because the bucketURL would then contain multiple
levels of subdomains (e.g. some.depth.of.domains.s3.amazonaws.com).

Now, the bucket name is not included in the domain name during
uploads, and the HTTPS certificate is valid even when dots are in the
bucket name.

Note that this commit does not fix the situation for downloads. This
is more complicated because of multiple ways of downloading a
file. With S3 alone there is 1 (
https://bucket-name.s3[-and-possibly-region].amazonaws.com/key ) and
the approach used by this commit for uploading 2 (
https://s3[-and-possibly-region].amazonaws.com/bucket-name/key ). Then
there is with a CDN, which would typically be something like 3 (
https://cdn-distribution-name.cloudfront.net/key ). A suitable
solution to create download URLs that allows dots in the bucket name
is not covered by this commit. To word around this present limitation,
construct your own download URL using options 1, 2 and 3 according
to your needs.

Previously, HTTPS certificate validation would fail if dots were in
the bucket name because the bucketURL would then contain multiple
levels of subdomains (e.g. some.depth.of.domains.s3.amazonaws.com).

Now, the bucket name is not included in the domain name during
uploads, and the HTTPS certificate is valid even when dots are in the
bucket name.

Note that this commit does not fix the situation for downloads. This
is more complicated because of multiple ways of downloading a
file. With S3 alone there is CulturalMe#1 (
https://bucket-name.s3[-and-possibly-region].amazonaws.com/key ) and
the approach used by this commit for uploading CulturalMe#2 (
https://s3[-and-possibly-region].amazonaws.com/bucket-name/key ). Then
there is with a CDN, which would typically be something like CulturalMe#3 (
https://cdn-distribution-name.cloudfront.net/key ). A suitable
solution to create download URLs that allows dots in the bucket name
is not covered by this commit. To word around this present limitation,
construct your own download URL using options CulturalMe#1, CulturalMe#2 and CulturalMe#3 according
to your needs.
@gsuess
Copy link
Contributor

gsuess commented Mar 22, 2015

Fixed with #77.

@gsuess gsuess closed this Mar 22, 2015
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.

2 participants