From ecb05343dea3bd35933585a1ec5bcea01348d109 Mon Sep 17 00:00:00 2001 From: Matthew Bramer <515152+iOnline247@users.noreply.github.com> Date: Thu, 9 Dec 2021 19:31:03 -0500 Subject: [PATCH] Fix `deflate` responses not being decompressed (#1918) --- source/as-promise/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/as-promise/index.ts b/source/as-promise/index.ts index 67e06151e..95ce06dd2 100644 --- a/source/as-promise/index.ts +++ b/source/as-promise/index.ts @@ -53,7 +53,7 @@ export default function asPromise(firstRequest?: Request): CancelableRequest< request.once('response', async (response: Response) => { // Parse body const contentEncoding = (response.headers['content-encoding'] ?? '').toLowerCase(); - const isCompressed = contentEncoding === 'gzip' || contentEncoding === 'defalte' || contentEncoding === 'br'; + const isCompressed = contentEncoding === 'gzip' || contentEncoding === 'deflate' || contentEncoding === 'br'; const {options} = request;