-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Labels
CRT/SDKbugThis issue is a bug.This issue is a bug.closed-for-stalenessp2This is a standard priority issueThis is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to 'closing-soon' in 7 days.Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days.
Description
Describe the bug
As described in aws/aws-sdk-java-v2#4642
When using default S3 Async Client, then the issue is no longer there.
Expected Behavior
No Content-Encoding metadata
Current Behavior
Content-Encoding has empty value
Reproduction Steps
// using CRT
S3AsyncClient s3AsyncClient = S3AsyncClient.crtBuilder()
.region(awsRegion)
.credentialsProvider(awsCredentialsProvider)
.build();
// not using CRT
// S3AsyncClient.builder()
// .region(awsRegion)
// .credentialsProvider(awsCredentialsProvider)
// .build();
Path f = Paths.get("test.pdf");
Flux<ByteBuffer> fileFlux = Flux.using(
() -> new FileReader(f.toFile()),
reader -> Flux.fromStream(new BufferedReader(reader).lines()).map(s -> ByteBuffer.wrap(s.getBytes(
StandardCharsets.UTF_8))),
reader -> {
try {
reader.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
);
final CompletableFuture<PutObjectResponse> s3Future =
s3AsyncClient.putObject(
PutObjectRequest.builder()
.bucket("mybucket")
.key("test.pdf")
.contentLength(Files.size(f))
.contentType(MediaType.APPLICATION_PDF_VALUE)
.build(),
AsyncRequestBody.fromPublisher(fileFlux));test.pdf has Content-Encoding with empty value.

While if using non CRT S3 Async Client, test.pdf won't have Content-Encoding

Possible Solution
No response
Additional Information/Context
aws-crt-java version used
0.28.10
Java version used
17
Operating System and version
MacOS 14.1.1 (23B81)
Metadata
Metadata
Assignees
Labels
CRT/SDKbugThis issue is a bug.This issue is a bug.closed-for-stalenessp2This is a standard priority issueThis is a standard priority issueresponse-requestedWaiting on additional info and feedback. Will move to 'closing-soon' in 7 days.Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days.