@@ -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 ) => {
0 commit comments