Skip to content

Allow accept-encoding header with value "identity" #986

@mitar

Description

@mitar

Currently, if I want to display a progress bar of how much data has been downloaded, I have to check content-length header to get the amount of all data so that I can correctly display the progress bar as I stream chunks of data into a JavaScript array. But the issue is that if server is using content-encoding set to gzip, then content-length tells how large is compressed data, not uncompressed. But what I am getting in chunks in uncompressed. So there should be a way for me to get how large is uncompressed data.

One way to achieve this is to do HEAD request with accept-encoding header set to identity. This would force the server to tell me the real size of the payload. But the issue is that currently accept-encoding header is not allowed to be set for fetch requests. I would ask that an exception is made for identity.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions