diff --git a/lib/oauth.js b/lib/oauth.js index e407180..8ee56ce 100644 --- a/lib/oauth.js +++ b/lib/oauth.js @@ -325,7 +325,7 @@ exports.OAuth.prototype._performSecureRequest= function( oauth_token, oauth_toke post_body= querystring.stringify(extra_params); } - headers["Content-length"]= post_body ? post_body.length : 0; //Probably going to fail if not posting ascii + headers["Content-length"]= post_body ? Buffer.byteLength(post_body) : 0; headers["Content-Type"]= post_content_type; var path;