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:
@@ -103,6 +103,11 @@ KoaServer.prototype.constructRouter = function () {
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/test/response/304', this.logRequest, function *(next) {
|
||||
this.response.set('Content-Encoding', 'gzip');
|
||||
this.status = 304;
|
||||
});
|
||||
|
||||
router.get('/test/response/303', function *(next) {
|
||||
printLog('now to redirect 303');
|
||||
this.redirect('/test');
|
||||
|
||||
Reference in New Issue
Block a user