Permalink
Browse files

Issue #47 - fix for wrong Content-Length setting in doRequest

  • Loading branch information...
1 parent b26a86c commit e3e892db98797a8e0575c9a71da040741ff467dd @nedzynski nedzynski committed Aug 16, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/node.io/request.js
View
@@ -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 e3e892d

Please sign in to comment.