Skip to content

Commit

Permalink
Update lib/fetch/util.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Jan 27, 2024
1 parent b05230c commit 09b68f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/fetch/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,10 @@ function buildContentRange (rangeStart, rangeEnd, fullLength) {
class InflateStream extends Transform {
_transform (chunk, encoding, callback) {
if (!this._inflateStream) {
if (chunk.length === 0) {
callback()
return
}
this._inflateStream = (chunk[0] & 0x0F) === 0x08
? zlib.createInflate()
: zlib.createInflateRaw()
Expand Down

0 comments on commit 09b68f0

Please sign in to comment.