clone was too agressive, was getting some functions copied to headers from a bad library

This commit is contained in:
Paul McKellar 2010-09-06 15:23:12 +08:00 committed by Ciaran Jessup
parent d265de82f3
commit 2fa7f4ecb7

View File

@ -195,7 +195,7 @@ exports.OAuth.prototype._performSecureRequest= function( oauth_token, oauth_toke
oauthProvider= this._createClient(parsedUrl.port, parsedUrl.hostname);
}
var headers= {}
var headers= {};
// build request authorization header
var authHeader="OAuth ";
@ -212,7 +212,9 @@ exports.OAuth.prototype._performSecureRequest= function( oauth_token, oauth_toke
headers["Host"] = parsedUrl.host
for( var key in this._headers ) {
headers[key]= this._headers[key];
if (this._headers.hasOwnProperty(key)) {
headers[key]= this._headers[key];
}
}
headers["Content-length"]= post_body ? post_body.length : 0; //Probably going to fail if not posting ascii