Skip to content

Commit

Permalink
Merge pull request #103 from nisuraaa/master
Browse files Browse the repository at this point in the history
Fix object retrieval for partial content
  • Loading branch information
NipunaRanasinghe authored Feb 15, 2024
2 parents a3f3c9d + 513cf6e commit 3918745
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 3918745

Please sign in to comment.