fix
This commit is contained in:
parent
b2c5753ff3
commit
e081068c98
|
|
@ -37,16 +37,10 @@ export const _ = {
|
||||||
});
|
});
|
||||||
res_body = await res.arrayBuffer();
|
res_body = await res.arrayBuffer();
|
||||||
|
|
||||||
console.log(
|
|
||||||
url,
|
|
||||||
res_headers["content-encoding"],
|
|
||||||
new TextDecoder().decode(res_body)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (res_headers["content-encoding"] === "gzip") {
|
if (res_headers["content-encoding"] === "gzip") {
|
||||||
delete res_headers["content-encoding"];
|
delete res_headers["content-encoding"];
|
||||||
} else if (res_headers["content-encoding"] === "br") {
|
} else if (res_headers["content-encoding"] === "br") {
|
||||||
res_body = brotli.decompress(res_body);
|
res_body = new TextDecoder().decode(res_body);
|
||||||
delete res_headers["content-encoding"];
|
delete res_headers["content-encoding"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue