Skip to content
Browse files

Merge pull request #6 from bioship/master

fix parser.onbody
  • Loading branch information...
2 parents 0a47849 + 690999f commit 20d60bc49bd2f323e1a74e3e82e75eb9811f8bc3 @creationix committed Feb 3, 2015
Showing with 2 additions and 2 deletions.
  1. +2 −2 web.js
View
4 web.js
@@ -114,7 +114,7 @@ exports.socketHandler = function (app, options) {
return;
}
var length = Buffer.byteLength(chunk);
- body.emit("data", toString(16).toUpperCase() + "\r\n" + chunk + "\r\n");
+ body.emit("data", length.toString(16).toUpperCase() + "\r\n" + chunk + "\r\n");
});
originalBody.on("end", function () {
@@ -180,7 +180,7 @@ exports.socketHandler = function (app, options) {
}
parser.onBody = function (buf, start, len) {
- req.body.emit("data", buf.slide(start, len));
+ req.body.emit("data", buf.slice(start, len));
};
parser.onMessageComplete = function () {

0 comments on commit 20d60bc

Please sign in to comment.
Something went wrong with that request. Please try again.