Fix content-length header set

This commit is contained in:
Garrett Mills 2022-03-30 23:55:41 -05:00
parent 445f16d973
commit bea48602f5
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -243,7 +243,7 @@ export class Response {
await this.sending$.next(this) await this.sending$.next(this)
if ( !(this.body instanceof Readable) ) { 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()) this.setHeader('Date', (new Date()).toUTCString())