We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9b97bf4 + 8c557cb commit 8fc5603Copy full SHA for 8fc5603
src/response/EmptyResponse.ts
@@ -16,8 +16,8 @@ export class EmptyResponse<A> extends Response<A> {
16
}
17
18
protected override async send(res: http.ServerResponse, req?: Request<A>): Promise<void> {
19
- if (req !== undefined)
20
- req._responseHeaders.set("content-length", "0");
+ if (!this.headers.has("content-length"))
+ this.headers.set("content-length", "0");
21
this.writeHead(res, req);
22
res.end();
23
0 commit comments