From 73d417158939a0cddab25bdcf45b025939db5bc9 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Thu, 25 Jan 2024 13:50:31 -0800 Subject: [PATCH] Update Documentation for onResponseHeaders Callback (#742) --- crt/aws-c-io | 2 +- .../amazon/awssdk/crt/s3/S3MetaRequestResponseHandler.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crt/aws-c-io b/crt/aws-c-io index 6225ebb9d..0b03c3094 160000 --- a/crt/aws-c-io +++ b/crt/aws-c-io @@ -1 +1 @@ -Subproject commit 6225ebb9da28f1023ad5e21694de9d165cd65f3b +Subproject commit 0b03c30949a2d6327557f25fd02ea1d148e1900b diff --git a/src/main/java/software/amazon/awssdk/crt/s3/S3MetaRequestResponseHandler.java b/src/main/java/software/amazon/awssdk/crt/s3/S3MetaRequestResponseHandler.java index a1ca2cd9e..a42c4f422 100644 --- a/src/main/java/software/amazon/awssdk/crt/s3/S3MetaRequestResponseHandler.java +++ b/src/main/java/software/amazon/awssdk/crt/s3/S3MetaRequestResponseHandler.java @@ -13,8 +13,9 @@ public interface S3MetaRequestResponseHandler { /** - * Invoked to provide response headers received during execution of the meta request, both for - * success and error HTTP status codes. + * Invoked to provide response headers received during the execution of the meta request. + * Note: the statusCode in this callback is not the final statusCode. It is possible that the statusCode in `onResponseHeaders` + * is 200, and then the request fail leading to a different statusCode in the final `onFinished` callback. * * @param statusCode statusCode of the HTTP response * @param headers the headers received @@ -31,7 +32,7 @@ default void onResponseHeaders(final int statusCode, final HttpHeader[] headers) * Whenever the flow-control window reaches zero, data will stop downloading. * To keep data flowing, you must increment the window by returning a number * from this method, or by calling {@link S3MetaRequest#incrementReadWindow}. - *

+ *

* If backpressure is disabled, you do not need to maintain the flow-control window, * data will arrive as fast as possible. *