mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 20:31:25 +00:00
add comment and replace the deprecated new Buffer()
with Buffer.from()
This commit is contained in:
parent
52582bee07
commit
ecb9a71eb1
@ -139,8 +139,9 @@ function fetchRemoteResponse(protocol, options, reqData, config) {
|
|||||||
refactContentEncoding();
|
refactContentEncoding();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// an Unit8Array returned by decompression
|
||||||
const result = brotliTorb.decompress(serverResData);
|
const result = brotliTorb.decompress(serverResData);
|
||||||
fulfill(new Buffer(result));
|
fulfill(Buffer.from(result));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
rejectParsing(e);
|
rejectParsing(e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user