Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rreno committed Nov 17, 2022
1 parent 8e5fb97 commit 65ff691
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fetch/content-encoding/gzip-body.any.js
@@ -0,0 +1,16 @@
// META: global=window,worker

const expectedDecompressedSize = 10500;
[
"text",
"octetstream"
].forEach(contentType => {
promise_test(async t => {
let response = await fetch(`resources/foo.${contentType}.gz`);
assert_true(response.ok);
let arrayBuffer = await response.arrayBuffer()
let u8 = new Uint8Array(arrayBuffer);
assert_equals(u8.length, expectedDecompressedSize);
}, `fetched gzip data with content type ${contentType} should be decompressed.`);
});

Binary file added fetch/content-encoding/resources/foo.octetstream.gz
Binary file not shown.
2 changes: 2 additions & 0 deletions fetch/content-encoding/resources/foo.octetstream.gz.headers
@@ -0,0 +1,2 @@
Content-type: application/octet-stream
Content-Encoding: gzip
Binary file added fetch/content-encoding/resources/foo.text.gz
Binary file not shown.
2 changes: 2 additions & 0 deletions fetch/content-encoding/resources/foo.text.gz.headers
@@ -0,0 +1,2 @@
Content-type: text/plain
Content-Encoding: gzip

1 comment on commit 65ff691

@community-tc-integration
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh! Looks like an error! Details

HttpError: You have exceeded a secondary rate limit. Please wait a few minutes before you try again.

Please sign in to comment.