fix(api): 🐛 Correctly return empty body without content-type headers, when returning empty responses

This commit is contained in:
Jesse Wierzbinski 2024-12-07 12:20:06 +01:00
parent 2743528727
commit 06376cf58a
No known key found for this signature in database
15 changed files with 18 additions and 18 deletions

View file

@ -76,7 +76,7 @@ export default apiRoute((app) =>
}
// Can't directly copy file into Response because this crashes Bun for now
return context.newResponse(buffer, 200, {
return context.body(buffer, 200, {
"Content-Type": file.type || "application/octet-stream",
"Content-Length": `${file.size - start}`,
"Content-Range": `bytes ${start}-${end}/${file.size}`,