Skip to content

Commit 4ca01b7

Browse files
authored
fix: always clean http body (#7)
1 parent 5b72d60 commit 4ca01b7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
deno-version: [v1.4.0, nightly]
15+
deno-version: [v1.4.2, nightly]
1616
unstable: [false, true]
17-
no-check: [false, true]
17+
# FIXME(lucacasonato): temporarially disable no-check testing (see https://github.com/denoland/deno/issues/7709)
18+
no-check: [false]
1819
env:
1920
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
2021
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

src/bucket.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ export class S3Bucket {
216216
await resp.text(),
217217
);
218218
}
219+
// clean up http body
220+
await resp.arrayBuffer();
219221
return {
220222
etag: JSON.parse(resp.headers.get("etag")!),
221223
versionId: resp.headers.get("x-amz-version-id") ?? undefined,
@@ -309,6 +311,7 @@ export class S3Bucket {
309311
await resp.text(),
310312
);
311313
}
314+
// clean up http body
312315
await resp.arrayBuffer();
313316
return {
314317
etag: JSON.parse(resp.headers.get("etag")!),
@@ -331,6 +334,8 @@ export class S3Bucket {
331334
await resp.text(),
332335
);
333336
}
337+
// clean up http body
338+
await resp.arrayBuffer();
334339
return {
335340
versionID: resp.headers.get("x-amz-version-id") ?? undefined,
336341
deleteMarker: resp.headers.get("x-amz-delete-marker") === "true",

0 commit comments

Comments
 (0)