undici 5.17.0 → 5.17.1

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/lib/client.js +4 -4
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -363,7 +363,7 @@ async function lazyllhttp () {
363
363
  },
364
364
  wasm_on_status: (p, at, len) => {
365
365
  assert.strictEqual(currentParser.ptr, p)
366
- const start = at - currentBufferPtr
366
+ const start = at - currentBufferPtr + currentBufferRef.byteOffset
367
367
  return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
368
368
  },
369
369
  wasm_on_message_begin: (p) => {
@@ -372,12 +372,12 @@ async function lazyllhttp () {
372
372
  },
373
373
  wasm_on_header_field: (p, at, len) => {
374
374
  assert.strictEqual(currentParser.ptr, p)
375
- const start = at - currentBufferPtr
375
+ const start = at - currentBufferPtr + currentBufferRef.byteOffset
376
376
  return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
377
377
  },
378
378
  wasm_on_header_value: (p, at, len) => {
379
379
  assert.strictEqual(currentParser.ptr, p)
380
- const start = at - currentBufferPtr
380
+ const start = at - currentBufferPtr + currentBufferRef.byteOffset
381
381
  return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
382
382
  },
383
383
  wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {
@@ -386,7 +386,7 @@ async function lazyllhttp () {
386
386
  },
387
387
  wasm_on_body: (p, at, len) => {
388
388
  assert.strictEqual(currentParser.ptr, p)
389
- const start = at - currentBufferPtr
389
+ const start = at - currentBufferPtr + currentBufferRef.byteOffset
390
390
  return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0
391
391
  },
392
392
  wasm_on_message_complete: (p) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici",
3
- "version": "5.17.0",
3
+ "version": "5.17.1",
4
4
  "description": "An HTTP/1.1 client, written from scratch for Node.js",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {