Skip to content

Commit

Permalink
Fix deflate responses not being decompressed (#1918)
Browse files Browse the repository at this point in the history
  • Loading branch information
iOnline247 authored Dec 10, 2021
1 parent 49c605c commit ecb0534
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/as-promise/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function asPromise<T>(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;

Expand Down

0 comments on commit ecb0534

Please sign in to comment.