Skip to content

Commit

Permalink
Setting of chunkedEncodingEnabled for http mode (#382)
Browse files Browse the repository at this point in the history
In case of HTTPS we are using the NettyNioAsyncHttpClient
from software.amazon.awssdk.http.nio.netty package which
by default enables chunkedEncodingEnabled flag

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
  • Loading branch information
shtripat authored Apr 29, 2024
1 parent 76d55a9 commit f1cfe44
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.S3AsyncClient;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.S3Configuration;
import software.amazon.awssdk.services.s3.model.*;
import software.amazon.awssdk.utils.AttributeMap;

Expand Down Expand Up @@ -413,9 +414,13 @@ public static void main(String[] args) throws Exception, IOException, NoSuchAlgo
.credentialsProvider(StaticCredentialsProvider.create(credentials))
.region(region)
.build();
S3Configuration configuration = S3Configuration.builder()
.chunkedEncodingEnabled(true)
.build();
s3AsyncClient = S3AsyncClient
.builder()
.endpointOverride(URI.create(endpoint))
.serviceConfiguration(configuration)
.forcePathStyle(true)
.credentialsProvider(StaticCredentialsProvider.create(credentials))
.region(region)
Expand Down

0 comments on commit f1cfe44

Please # to comment.