Merge branch 'master' into ws-proxy

This commit is contained in:
砚然
2018-01-21 19:43:02 +08:00
24 changed files with 312 additions and 149 deletions

View File

@@ -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');