Skip to content

Commit

Permalink
fix: use existing createInflate util
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfalleiro committed May 18, 2024
1 parent 6329607 commit 938fa4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/interceptor/decompress.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const util = require('../core/util')
const DecoratorHandler = require('../handler/decorator-handler')
const zlib = require('node:zlib')
const { pipeline } = require('node:stream')
const { createInflate } = require('../web/fetch/util')

const nullBodyStatus = [101, 204, 205, 304]

Expand Down Expand Up @@ -43,7 +44,7 @@ class DecompressHandler extends DecoratorHandler {
finishFlush: zlib.constants.Z_SYNC_FLUSH
}))
} else if (encoding === 'deflate') {
decoders.push(zlib.createInflate())
decoders.push(createInflate())
} else if (encoding === 'br') {
decoders.push(zlib.createBrotliDecompress())
} else {
Expand Down

0 comments on commit 938fa4b

Please sign in to comment.