add content-length to streamed file downloads for browsers / progress - #3415
Open
syphar wants to merge 1 commit into
Open
add content-length to streamed file downloads for browsers / progress#3415syphar wants to merge 1 commit into
syphar wants to merge 1 commit into
Conversation
syphar
force-pushed
the
content-length
branch
2 times, most recently
from
August 5, 2026 01:56
515eafb to
2b98ab4
Compare
syphar
marked this pull request as ready for review
August 5, 2026 02:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is mainly for our zip / json downloads. Right now, the browser can't show any download progress because we don't send a
Content-Lengthheader.Thing is: we only know the original content length from S3, which becomes obsolete when we decompress the stream while serving it to the user.
But that doesn't matter for the zip / json downloads, since we use
get_raw_stream, which doesn't do any decompression.This was also a bug with our "don't cache big objects" logic, where we assumed that the S3 content length is also what we return to the user / the CDN.