Skip to content

Commit

Permalink
Merge pull request #116 from nisuraaa/multipart-backport
Browse files Browse the repository at this point in the history
Fix compilation error when using 2201.4.x distribution
  • Loading branch information
NipunaRanasinghe authored May 3, 2024
2 parents 3ad9d9d + 6cb44a9 commit c9ed016
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions s3/client.bal
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,21 @@ public isolated client class Client {
};

GET|PUT httpMethod;
if action is CREATE || action is ObjectCreationHeaders {

if action is ObjectCreationHeaders {
httpMethod = PUT;
populateCreateObjectHeaders(requestHeaders, action);
}

if action is ObjectRetrievalHeaders {
httpMethod = GET;
populateGetObjectHeaders(requestHeaders, action);
}

if action is CREATE {
httpMethod = PUT;
if action is ObjectCreationHeaders {
populateCreateObjectHeaders(requestHeaders, action);
}
} else {
httpMethod = GET;
if action is ObjectRetrievalHeaders {
populateGetObjectHeaders(requestHeaders, action);
}
}

[string, string] [canonicalHeaders, signedHeaders] = generateCanonicalHeaders(requestHeaders, ());
Expand Down

0 comments on commit c9ed016

Please sign in to comment.