mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
test deflate content
This commit is contained in:
@@ -120,7 +120,7 @@ function fetchRemoteResponse(protocol, options, reqData, config) {
|
||||
// only do unzip when there is res data
|
||||
if (ifServerGzipped && originContentLen) {
|
||||
refactContentEncoding();
|
||||
zlib.gunzip(serverResData, (err, buff) => { // TODO test case to cover
|
||||
zlib.gunzip(serverResData, (err, buff) => {
|
||||
if (err) {
|
||||
rejectParsing(err);
|
||||
} else {
|
||||
@@ -129,7 +129,7 @@ function fetchRemoteResponse(protocol, options, reqData, config) {
|
||||
});
|
||||
} else if (isServerDeflated && originContentLen) {
|
||||
refactContentEncoding();
|
||||
zlib.inflateRaw(serverResData, (err, buff) => { // TODO test case to cover
|
||||
zlib.inflateRaw(serverResData, (err, buff) => {
|
||||
if (err) {
|
||||
rejectParsing(err);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user