fix content length for oauth 1.0

This commit is contained in:
selead 2011-06-25 12:36:25 +04:00
parent f261b9f4c0
commit 5f383ff1b1

View File

@ -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;