mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
fix(api): 🐛 Correctly return empty body without content-type headers, when returning empty responses
This commit is contained in:
parent
2743528727
commit
06376cf58a
15 changed files with 18 additions and 18 deletions
|
|
@ -85,7 +85,7 @@ export default apiRoute((app) =>
|
|||
.get("Content-Disposition")
|
||||
?.match(/filename="(.+)"/)?.[1] || id.split("/").pop();
|
||||
|
||||
return context.newResponse(media.body, media.status as StatusCode, {
|
||||
return context.body(media.body, media.status as StatusCode, {
|
||||
"Content-Type":
|
||||
media.headers.get("Content-Type") || "application/octet-stream",
|
||||
"Content-Length": media.headers.get("Content-Length") || "0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue