mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
add comment and replace the deprecated new Buffer() with Buffer.from()
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user