Permalink
Browse files

send both data and end

  • Loading branch information...
1 parent 4027a96 commit a33457f2403bdc9e1d05cdfc0d8dba4a8b3a9843 @substack committed Sep 10, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 index.js
View
@@ -16,9 +16,9 @@ exports.createServer = function (cb) {
});
res.useChunkedEncodingByDefault = false;
- socket.on('data', function (buf) {
- req.emit('data', buf);
- });
+ socket.on('data', function (buf) { req.emit('data', buf) });
+ socket.on('end', function () { req.emit('end') });
+
server.emit('request', req, res);
if (head.length) req.emit('data', head);

0 comments on commit a33457f

Please sign in to comment.