Open Calemy opened 5 months ago
Also tested with following code:
const server = Bun.serve({
port: 2450,
async fetch(req){
const download = await fetch(`https://catboy.best/d/1`)
return new Response(download.body, {
headers: {
"Content-Type": "application/x-osu-beatmap-archive",
"Content-Disposition": "attachment; filename=1.osz",
"Content-Length": "101"
}
})
}
})
@Electroid maybe you can give me some insight?
I'm running into the same issue. I think it's happening here:
I don't think Bun should overwrite the content-length header (or any header, really) if it's already set.
If you can build bun yourself, this patch should work, I think: https://github.com/SEAPUNK/bun/commit/53528ff64d1f8aa1a7f6dbfa35d3248aded42c9c#
What version of Bun is running?
1.1.4+fbe2fe0c3
What platform is your computer?
Linux 5.15.0-97-generic x86_64 x86_64
What steps can reproduce the bug?
What is the expected behavior?
by setting the content-length inside the header it should use that and being able to show up on the end-client.
What do you see instead?
no content-length set at all.
Additional information
No response