From d1f83c0359a09cede75d1c1fb01a080f5a465ea5 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 3 Jul 2023 22:12:17 -0700 Subject: [PATCH] Update http.js --- src/utils/proxy/http.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/proxy/http.js b/src/utils/proxy/http.js index 61f41585..107a7038 100644 --- a/src/utils/proxy/http.js +++ b/src/utils/proxy/http.js @@ -34,6 +34,9 @@ function handleRequest(requestor, url, params) { let responseContent = response; if (contentEncoding === 'gzip' || contentEncoding === 'deflate') { + // https://github.com/request/request/blob/3c0cddc7c8eb60b470e9519da85896ed7ee0081e/request.js#L1018-L1025 + // Be more lenient with decoding compressed responses, in case of invalid gzip responses that are still accepted + // by common browsers. responseContent = createUnzip({ flush: zlibConstants.Z_SYNC_FLUSH, finishFlush: zlibConstants.Z_SYNC_FLUSH