[whatwg/fetch] Question: Why don't constructed Response unpack? (#1090)

I was just wondering why arn't the response unpacked when content encoding is set when constructing and reading a Response?

```js
gz = new CompressionStream('gzip')
blob = new Blob(['a'.repeat(100)]).stream()
gzipBlob = await new Response(blob.pipeThrough(gz)).blob()
headers = {'content-encoding': 'gzip'}
result = await new Response(gzipBlob, { headers }).blob()
result.size // 24
```

is it a bug or by design?
have it something to do with respondWith or that request and response share a common Body mixin?
or maybe the body isn't proper encoded? i have also tried deflate, didn't unpack either

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1090

Received on Thursday, 17 September 2020 12:13:55 UTC