@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.
Files changed (2) hide show
  1. package/http.js +5 -3
  2. 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
- this.#id = req.headers['request-id'] || req.headers['Request-Id'] || genReqId()
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 = -1
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 = -1
484
+ #bytesWritten = 0
483
485
  #timing = {
484
486
  connect: -1,
485
487
  headers: -1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "23.3.2",
3
+ "version": "23.3.4",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",