diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-05-23 00:02:06 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-05-23 00:02:06 +0400 |
commit | 860cb906a683bcbf297a02a1e7e821ff469fafe4 (patch) | |
tree | 08b8100f3b6d760399654e7d14c1148e9ba83a30 /lib/http.js | |
parent | 59274e8a337e8e0d84fd6c9973e32f0d20edba39 (diff) | |
parent | 823604a4e0a6120ade470e98f8c0058d3fd0de05 (diff) |
Merge branch 'v0.4'
Conflicts:
src/node_version.h
Diffstat (limited to 'lib/http.js')
-rw-r--r-- | lib/http.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/http.js b/lib/http.js index acb8898215f..c18a8683df9 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1089,7 +1089,11 @@ function connectionListener(socket) { // When we're finished writing the response, check if this is the last // respose, if so destroy the socket. res.on('finish', function() { - assert(incoming[0] === req); + // Usually the first incoming element should be our request. it may + // be that in the case abortIncoming() was called that the incoming + // array will be empty. + assert(incoming.length == 0 || incoming[0] === req); + incoming.shift(); res.detachSocket(socket); |