Skip to content

Feat : Use custom host for S3 (not only AWS)#40

Open
KontainPluton wants to merge 5 commits intoapache:mainfrom
Geomatys:feat/CustomHostS3
Open

Feat : Use custom host for S3 (not only AWS)#40
KontainPluton wants to merge 5 commits intoapache:mainfrom
Geomatys:feat/CustomHostS3

Conversation

@KontainPluton
Copy link

Add support for Self-hosted S3

  • If URI is : s3://bucket/key => AWS Storage
  • If URI is : s3://host:port/bucket/key => Self-hosted storage

* - Self-Hosted path : s3://accessKey@host:port/bucket/key
* - AWS path : s3://accessKey@bucket/key
*/
boolean selfHosted = fs.host != null && fs.port >= 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

With this condition, either the URI has a host and a port, or either it has none of them. If only one of them is specified, this is silently ignored. But is it really illegal to specify only a host with a default port number? The implementation of toString() just below this method suggests that it is legal.

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