Skip to content

Commit

Permalink
Ensure s3 requests send a null body when unset
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade committed Aug 15, 2023
1 parent 822415f commit c4bfb05
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/internal/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class S3Client extends AWSClient {
{}
)

const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {
const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {
headers: signedRequest.headers,
})
this._handle_error('ListBuckets', res)
Expand Down Expand Up @@ -118,7 +118,7 @@ export class S3Client extends AWSClient {
{}
)

const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {
const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {
headers: signedRequest.headers,
})
this._handle_error('ListObjectsV2', res)
Expand Down Expand Up @@ -183,7 +183,7 @@ export class S3Client extends AWSClient {
{}
)

const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {
const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {
headers: signedRequest.headers,
})
this._handle_error('GetObject', res)
Expand Down Expand Up @@ -266,7 +266,7 @@ export class S3Client extends AWSClient {
{}
)

const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {
const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {
headers: signedRequest.headers,
})
this._handle_error('DeleteObject', res)
Expand Down Expand Up @@ -339,7 +339,7 @@ export class S3Client extends AWSClient {
{}
)

const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {
const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {
headers: signedRequest.headers,
})
this._handle_error('CreateMultipartUpload', res)
Expand Down Expand Up @@ -388,7 +388,7 @@ export class S3Client extends AWSClient {
{}
)

const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {
const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {
headers: signedRequest.headers,
})
this._handle_error('UploadPart', res)
Expand Down Expand Up @@ -436,7 +436,7 @@ export class S3Client extends AWSClient {
{}
)

const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {
const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {
headers: signedRequest.headers,
})

Expand Down Expand Up @@ -470,7 +470,7 @@ export class S3Client extends AWSClient {
{}
)

const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || '', {
const res = await http.asyncRequest(method, signedRequest.url, signedRequest.body || null, {
headers: signedRequest.headers,
})
this._handle_error('AbortMultipartUpload', res)
Expand Down

0 comments on commit c4bfb05

Please sign in to comment.