Skip to content

Commit 1336d4d

Browse files
fraxkenCopilot
andauthored
Update workspaces/server/src/endpoints/util/send.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 34f306d commit 1336d4d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • workspaces/server/src/endpoints/util

workspaces/server/src/endpoints/util/send.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ export function send(
3232
contentType ??= "text/plain";
3333
}
3434

35-
headers["content-type"] = contentType;
36-
headers["content-length"] = Buffer.byteLength(body);
35+
const finalHeaders = {
36+
...headers,
37+
"content-type": contentType,
38+
"content-length": Buffer.byteLength(body)
39+
};
3740

38-
res.writeHead(code, headers);
41+
res.writeHead(code, finalHeaders);
3942
res.end(body);
4043
}

0 commit comments

Comments
 (0)