AWS: allow dots ('.') in bucket name during upload. #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.