Permalink
Browse files

Merge pull request #48 from nedzynski/master

Content-Length in request.js
  • Loading branch information...
2 parents b26a86c + e3e892d commit a942cf3e3a70ee73943650b156345ce834dd8ee1 @chriso chriso committed Aug 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/node.io/request.js
@@ -266,7 +266,7 @@ Job.prototype.doRequest = function (method, resource, body, headers, callback, p
if (typeof body === 'object') {
body = query.stringify(body);
}
- headers['Content-Length'] = body.length;
+ headers['Content-Length'] = Buffer.byteLength(body);
}
//Determine the port and add it to the host header

0 comments on commit a942cf3

Please sign in to comment.