Skip to content

Commit

Permalink
fixup! Support compression.
Browse files Browse the repository at this point in the history
  • Loading branch information
iclanton committed Dec 9, 2024
1 parent 49eec6e commit ad61965
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/rush-lib/src/utilities/WebClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ const makeRequestAsync: FetchFn = async (
if (!noAcceptEncoding && !noDecode && encodings !== undefined) {
const zlib: typeof import('zlib') = await import('zlib');
if (!Array.isArray(encodings)) {
encodings = [encodings];
encodings = encodings.split(',');
}

let buffer: Buffer = responseData;
for (const encoding of encodings) {
let decompressFn: (buffer: Buffer, callback: import('zlib').CompressCallback) => void;
switch (encoding) {
switch (encoding.trim()) {
case DEFLATE_ENCODING: {
decompressFn = zlib.inflate.bind(zlib);
break;
Expand Down

0 comments on commit ad61965

Please sign in to comment.