@nxtedition/nxt-undici 4.2.22 → 4.2.24

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.
@@ -36,7 +36,8 @@ class Handler extends DecoratorHandler {
36
36
  this.#timing.data = -1
37
37
  this.#timing.end = -1
38
38
 
39
- this.#logger.debug({ ureq: this.#opts }, 'upstream request started')
39
+ this.#logger = this.#logger.child({ ureq: this.#opts })
40
+ this.#logger.debug('upstream request started')
40
41
 
41
42
  return this.#handler.onConnect((reason) => {
42
43
  this.#aborted = true
@@ -83,7 +84,6 @@ class Handler extends DecoratorHandler {
83
84
 
84
85
  this.#logger.debug(
85
86
  {
86
- ureq: { id: this.#opts.id, url: this.#opts.url },
87
87
  ures: {
88
88
  bytesRead: this.#pos,
89
89
  bytesReadPerSecond: (this.#pos * 1e3) / (this.#timing.end - this.#timing.data),
@@ -101,7 +101,6 @@ class Handler extends DecoratorHandler {
101
101
  this.#timing.end = performance.now() - this.#created
102
102
 
103
103
  const data = {
104
- ureq: this.#opts,
105
104
  ures: {
106
105
  bytesRead: this.#pos,
107
106
  bytesReadPerSecond: (this.#pos * 1e3) / (this.#timing.end - this.#timing.data),
package/lib/utils.js CHANGED
@@ -16,7 +16,7 @@ export function parseRangeHeader(range) {
16
16
  return m
17
17
  ? {
18
18
  start: parseInt(m[1]),
19
- end: m[2] ? parseInt(m[2]) : null,
19
+ end: m[2] ? parseInt(m[2]) + 1 : null,
20
20
  size: m[3] ? parseInt(m[3]) : null,
21
21
  }
22
22
  : null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "4.2.22",
3
+ "version": "4.2.24",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",