Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

send both data and end

  • Loading branch information...
commit a33457f2403bdc9e1d05cdfc0d8dba4a8b3a9843 1 parent 4027a96
James Halliday authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 index.js
6 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);
Please sign in to comment.
Something went wrong with that request. Please try again.