@nxtedition/lib 26.0.1 → 26.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/http.js +6 -9
- package/package.json +1 -1
package/http.js
CHANGED
|
@@ -485,6 +485,12 @@ export class ServerResponse extends http.ServerResponse {
|
|
|
485
485
|
headers = headers ? Object.assign(this.#headersObj, headers) : this.#headersObj
|
|
486
486
|
}
|
|
487
487
|
|
|
488
|
+
if (!this.destroyed) {
|
|
489
|
+
if (this.#headers === -1) {
|
|
490
|
+
this.#headers = performance.now() - this.#created
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
488
494
|
this.#headersObj = null
|
|
489
495
|
|
|
490
496
|
return super.writeHead(statusCode, headers)
|
|
@@ -503,15 +509,6 @@ export class ServerResponse extends http.ServerResponse {
|
|
|
503
509
|
return super.assignSocket(socket)
|
|
504
510
|
}
|
|
505
511
|
|
|
506
|
-
flushHeaders() {
|
|
507
|
-
if (!this.destroyed) {
|
|
508
|
-
if (this.#headers === -1) {
|
|
509
|
-
this.#headers = performance.now() - this.#created
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
return super.flushHeaders()
|
|
513
|
-
}
|
|
514
|
-
|
|
515
512
|
write(chunk, encoding, callback) {
|
|
516
513
|
if (!this.destroyed) {
|
|
517
514
|
if (this.#data === -1) {
|