Skip to content

Commit

Permalink
Fix compilation error when using 2201.4.x dist
Browse files Browse the repository at this point in the history
  • Loading branch information
nisuraaa committed May 3, 2024
1 parent 94e73ef commit 6cb44a9
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 6cb44a9

Please sign in to comment.