[whatwg/fetch] Missing interface for uncompressed Content-Length when compression is used (Issue #1358)

In order to track progress of a fetch GET request(in a similar way to `onprogress` events of ` XMLHttpRequest`) it is possible to read the body of a request with a `ReadableStream` and retrieve the total size of the request body from `Content-Length` header.
However, if the request is compressed using the `Content-Enconding` header the `Content-Length` does not give the total uncompressed size of the request body but the size of the compressed request body.
It would be nice to have an interface to get the total size of the uncompressed body in order to properly track the progress of a request. There is the `FetchObserver`(https://github.com/whatwg/fetch/issues/607) proposal but it doesn't seem to have gained any traction.


-- 
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/1358

Received on Wednesday, 17 November 2021 15:05:14 UTC