Skip to content

Commit

Permalink
fix: support port number in URI (#10)
Browse files Browse the repository at this point in the history
Properly handle a URI with port number. (e.g. locally hosted MinIO server)
  • Loading branch information
ksugar authored Feb 24, 2024
1 parent 64d8526 commit 50ceb0a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private AmazonS3 createS3(final String uri) {
// if AmazonS3URI does not like the form of the uri
try {
final URI buri = new URI(uri);
final URI endpointUrl = new URI(buri.getScheme(), buri.getHost(), null, null);
final URI endpointUrl = new URI(buri.getScheme(), null, buri.getHost(), buri.getPort(), null, null, null);
return createS3(getS3Credentials(), new EndpointConfiguration(endpointUrl.toString(), null), null, getS3Bucket(uri));
} catch (final URISyntaxException e1) {}
}
Expand Down

0 comments on commit 50ceb0a

Please sign in to comment.