@nxtedition/lib 23.3.2 → 23.3.4
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 +5 -3
- package/package.json +1 -1
package/http.js
CHANGED
|
@@ -48,7 +48,9 @@ export class Context {
|
|
|
48
48
|
assert(res)
|
|
49
49
|
assert(logger)
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
const id = req.headers['request-id'] || req.headers['Request-Id']
|
|
52
|
+
|
|
53
|
+
this.#id = (id ? `${id},` : '') + genReqId()
|
|
52
54
|
this.#userAgent = req.headers['user-agent'] || req.headers['User-Agent'] || ''
|
|
53
55
|
this.#req = req
|
|
54
56
|
this.#res = res
|
|
@@ -380,7 +382,7 @@ export async function request(ctx, next) {
|
|
|
380
382
|
|
|
381
383
|
export class ServerResponse extends http.ServerResponse {
|
|
382
384
|
#created = 0
|
|
383
|
-
#bytesWritten =
|
|
385
|
+
#bytesWritten = 0
|
|
384
386
|
#timing = {
|
|
385
387
|
connect: -1,
|
|
386
388
|
headers: -1,
|
|
@@ -479,7 +481,7 @@ export class ServerResponse extends http.ServerResponse {
|
|
|
479
481
|
|
|
480
482
|
export class Http2ServerResponse extends http2.Http2ServerResponse {
|
|
481
483
|
#created = 0
|
|
482
|
-
#bytesWritten =
|
|
484
|
+
#bytesWritten = 0
|
|
483
485
|
#timing = {
|
|
484
486
|
connect: -1,
|
|
485
487
|
headers: -1,
|