Fix content-length header set

orm-types
Garrett Mills 2 years ago
parent 445f16d973
commit bea48602f5

@ -1,6 +1,6 @@
{
"name": "@extollo/lib",
"version": "0.9.19",
"version": "0.9.20",
"description": "The framework library that lifts up your code.",
"main": "lib/index.js",
"types": "lib/index.d.ts",

@ -243,7 +243,7 @@ export class Response {
await this.sending$.next(this)
if ( !(this.body instanceof Readable) ) {
this.setHeader('Content-Length', String(this.body?.length ?? 0))
this.setHeader('Content-Length', String((this.body?.length ?? 0) + 2))
}
this.setHeader('Date', (new Date()).toUTCString())

Loading…
Cancel
Save