- From: basketofsoftkittens <notifications@github.com>
- Date: Fri, 11 Feb 2022 20:41:50 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 12 February 2022 04:42:03 UTC
> Im running into this issue regarding the lack of `Content-Length` headers. Im using Cloudflare Workers, and the `fetch()` API removes the `Content-Length` header when using Streams, since they are returned as `Transfer-Encoding: chunked`. Even if I manually create the response object and attach the `Content-Length` header its stripped out. > > The end result is a download is non-resumable, since there is no `Content-Length` Chrome doesnt even attempt to make it resumable, if there is a network dropout Chrome just deletes the `.crdownload` file that contains the bytes received so far. This is rather frustrating, since if I could send `Content-Length` and `Accept-Range` headers, I am guessing Chrome would utilise them and allow my Streamed download to be properly resumable? > > Unless there are some other headers you can send when doing `Transfer-Encoding: chunked` to still let modern browsers understand to keep the bytes received on net dropouts, and to send a `Range` header to resume downloading +1 -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fetch/issues/95#issuecomment-1036989988 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fetch/issues/95/1036989988@github.com>
Received on Saturday, 12 February 2022 04:42:03 UTC