Skip to content

Commit

Permalink
Fix object retrieval for partial content
Browse files Browse the repository at this point in the history
  • Loading branch information
nisuraaa committed Feb 2, 2024
1 parent a3f3c9d commit 513cf6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ballerina/client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public isolated client class Client {
check generateSignature(self.accessKeyId, self.secretAccessKey, self.region, GET, requestURI, UNSIGNED_PAYLOAD,
requestHeaders);
http:Response httpResponse = check self.amazonS3->get(requestURI, requestHeaders);
if (httpResponse.statusCode == http:STATUS_OK) {
if (httpResponse.statusCode == http:STATUS_OK || (httpResponse.statusCode == http:STATUS_PARTIAL_CONTENT && objectRetrievalHeaders?.range != ())) {
if byteArraySize is int {
return httpResponse.getByteStream(byteArraySize);
}
Expand Down

0 comments on commit 513cf6e

Please sign in to comment.