diff --git a/index.js b/index.js index 2b886ae0..e5bf7a97 100644 --- a/index.js +++ b/index.js @@ -248,6 +248,10 @@ function session(options){ end.call(res); }); + if (res.statusCode == 301 || res.statusCode == 302) { + sync = false; + } + if (sync) { ret = res.write(chunk, encoding); sync = false;