Permalink
Browse files

[fix] **ALWAYS** prefer `this.end()` over `this.response.end()` in Re…

…sponseStream
  • Loading branch information...
1 parent f8d6fec commit edc77cd7ed6ce6d29f2a133aa4185030afe0a5f0 @indexzero indexzero committed Nov 12, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/response-stream.js
View
@@ -171,8 +171,6 @@ ResponseStream.prototype.redirect = function(path, status) {
url += (path[0] === '/') ? path : '/' + path;
}
- this.res.writeHead(status || 302, {
- 'Location': url
- });
- this.res.end();
+ this.response.writeHead(status || 302, { 'Location': url });
+ this.response.end();
};

1 comment on commit edc77cd

Owner

indexzero commented on edc77cd Nov 29, 2012

wtf is wrong with me? This is still wrong.

Please sign in to comment.