mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
do not unzip the response body when it's empty, such as 304
also remove the delete operatoin for 'accept-encoding' in the test utils, since AnyProxy will not remove the header now
This commit is contained in:
@@ -130,13 +130,6 @@ function isCommonReqEqual(url, serverInstance) {
|
||||
isEqual = isEqual && proxyReqObj.headers['via-proxy'] === 'true';
|
||||
delete proxyReqObj.headers['via-proxy'];
|
||||
|
||||
// exclued accept-encoding from comparing, since the proxy will remove it before sending it out
|
||||
delete directReqObj.headers['accept-encoding'];
|
||||
|
||||
// TODO: 我这里proxy出去的options里没有accept-encoding, 但node自己加上了。Why ?
|
||||
// By 加里 2017.1.31
|
||||
delete proxyReqObj.headers['accept-encoding'];
|
||||
|
||||
directReqObj.headers['content-type'] = trimFormContentType(directReqObj.headers['content-type']);
|
||||
proxyReqObj.headers['content-type'] = trimFormContentType(proxyReqObj.headers['content-type']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user