Skip to content

Commit 14e35ba

Browse files
committed
Handled Review commments from Zoe
1 parent 04e9ec5 commit 14e35ba

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.changes/next-release/bugfix-AmazonS3-bb097c9.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"type": "bugfix",
33
"category": "Amazon S3",
44
"contributor": "",
5-
"description": "Fix StreamingRequestInterceptor to skip Expect: 100-continue header when PutObject or UploadPart requests have zero content length."
5+
"description": "Skip Expect: 100-continue header for PutObject and UploadPart requests with zero content length"
66
}

services/s3/src/test/java/software/amazon/awssdk/services/s3/functionaltests/Expect100ContinueHeaderTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
*/
7070
@WireMockTest(httpsEnabled = true)
7171
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
72-
public class Expect100ContinueHeaderTest {
72+
class Expect100ContinueHeaderTest {
7373

7474
private static final String BUCKET = "test-bucket";
7575
private static final String KEY = "test-key";
@@ -216,6 +216,7 @@ public void request(long n) {
216216

217217
@Override
218218
public void cancel() {
219+
// No action.
219220
}
220221
});
221222
};
@@ -246,6 +247,7 @@ public void request(long n) {
246247

247248
@Override
248249
public void cancel() {
250+
// No action.
249251
}
250252
});
251253
};

services/s3/src/test/java/software/amazon/awssdk/services/s3/internal/handlers/StreamingRequestInterceptorTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void modifyHttpRequest_doesNotSetExpect_whenSdkRequestIsNotPutObject() {
6767

6868
@ParameterizedTest(name = "{0} with {1}={2} should not set Expect header")
6969
@MethodSource("zeroContentLengthProvider")
70-
public void modifyHttpRequest_doesNotSetExpect_whenContentLengthIsZero(
70+
void modifyHttpRequest_doesNotSetExpect_whenContentLengthIsZero(
7171
String requestType, String headerName, String headerValue, SdkRequest sdkRequest) {
7272

7373
SdkHttpRequest httpRequest = buildHttpRequest(headerName, headerValue);
@@ -83,7 +83,7 @@ public void modifyHttpRequest_doesNotSetExpect_whenContentLengthIsZero(
8383

8484
@ParameterizedTest(name = "{0} with {1}={2} should set Expect header")
8585
@MethodSource("nonZeroContentLengthProvider")
86-
public void modifyHttpRequest_setsExpect_whenContentLengthIsNonZero(
86+
void modifyHttpRequest_setsExpect_whenContentLengthIsNonZero(
8787
String requestType, String headerName, String headerValue, SdkRequest sdkRequest) {
8888

8989
SdkHttpRequest httpRequest = buildHttpRequest(headerName, headerValue);
@@ -96,7 +96,7 @@ public void modifyHttpRequest_setsExpect_whenContentLengthIsNonZero(
9696
}
9797

9898
@Test
99-
public void modifyHttpRequest_prioritizesDecodedContentLength_overContentLength() {
99+
void modifyHttpRequest_prioritizesDecodedContentLength_overContentLength() {
100100
SdkHttpRequest httpRequest = SdkHttpFullRequest.builder()
101101
.uri(URI.create("http://localhost:8080"))
102102
.method(SdkHttpMethod.PUT)

0 commit comments

Comments
 (0)