Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Typo fix in timeout middleware [req->res] #754

merged 1 commit into from

2 participants


Discovered this apparent typo while testing the timeout middleware. As far as I can tell "headerSent" is never defined on the ServerRequest object, instead it's on ServerResponse.

@tj tj merged commit 8a87714 into senchalabs:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 20, 2013
  1. @nfarina
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/middleware/timeout.js
3  lib/middleware/timeout.js
@@ -1,4 +1,3 @@
* Connect - timeout
* Ported from
@@ -36,7 +35,7 @@ module.exports = function timeout(ms) {
}, ms);
req.on('timeout', function(){
- if (req.headerSent) return debug('response started, cannot timeout');
+ if (res.headerSent) return debug('response started, cannot timeout');
var err = new Error('Response timeout');
err.timeout = ms;
err.status = 503;
Something went wrong with that request. Please try again.