Bug: Duplicate header "Content-Range" in Response (cannot play html video) #7051
Labels
bug
Something isn't working
bun.js
Something to do with a Bun-specific API
good first issue
Something that would be good for new contributors
What version of Bun is running?
1.0.11
What platform is your computer?
Linux 6.1.0-13-amd64 x86_64 unknown (Debain 12)
What steps can reproduce the bug?
What is the expected behavior?
To have a single header "Content-Range" in response.
What do you see instead?
Two "Content-Range" headers in response.
Additional information
This is because bun does not know the file size, so it creates "Content-Range" ending "/*" instead of "/file_size". So it ends up like this in response:
content-range: bytes 30269309-31317884/1063300891
content-range: bytes 30269309-31317884/*
... two headers "content-range" instead of just one that I set in response.
This is quite a problem when playing a video in "video" html element, because it doesn't know the size of the video, so I have to wait when the whole file is downloaded. Considering video files can have 1 GB+, this is a problem.
Firefox is OK with those two headers and plays the video well, but Chrome does not.
The text was updated successfully, but these errors were encountered: