mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-24 04:41:26 +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();
|
||||
|
||||
try {
|
||||
// an Unit8Array returned by decompression
|
||||
const result = brotliTorb.decompress(serverResData);
|
||||
fulfill(new Buffer(result));
|
||||
fulfill(Buffer.from(result));
|
||||
} catch (e) {
|
||||
rejectParsing(e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user