You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something node-fetch and browser could handle was the infamous raw deflate response from old servers
basically if the coding is either: coding === 'deflate' || coding === 'x-deflate'
then read the first byte. if it match chunk[0] & 0x0F) === 0x08 then use zlib.createInflate() otherwise use zlib.createInflateRaw()
Bug Description
Something node-fetch and browser could handle was the infamous raw deflate response from old servers
basically if the coding is either:
coding === 'deflate' || coding === 'x-deflate'
then read the first byte. if it match
chunk[0] & 0x0F) === 0x08
then usezlib.createInflate()
otherwise usezlib.createInflateRaw()
Reproducible By
You already have a test for it here:
undici/test/node-fetch/main.js
Lines 663 to 672 in 51fa0fe
Expected Behavior
Additional context
Relevant part that needs fixing:
undici/lib/fetch/index.js
Lines 2018 to 2019 in 51fa0fe
how node-fetch solved it:
https://github.com/node-fetch/node-fetch/blob/7b86e946b02dfdd28f4f8fca3d73a022cbb5ca1e/src/index.js#L314-L350
The text was updated successfully, but these errors were encountered: