clone was too agressive, was getting some functions copied to headers from a bad library
This commit is contained in:
parent
d265de82f3
commit
2fa7f4ecb7
@ -195,7 +195,7 @@ exports.OAuth.prototype._performSecureRequest= function( oauth_token, oauth_toke
|
|||||||
oauthProvider= this._createClient(parsedUrl.port, parsedUrl.hostname);
|
oauthProvider= this._createClient(parsedUrl.port, parsedUrl.hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
var headers= {}
|
var headers= {};
|
||||||
|
|
||||||
// build request authorization header
|
// build request authorization header
|
||||||
var authHeader="OAuth ";
|
var authHeader="OAuth ";
|
||||||
@ -212,7 +212,9 @@ exports.OAuth.prototype._performSecureRequest= function( oauth_token, oauth_toke
|
|||||||
headers["Host"] = parsedUrl.host
|
headers["Host"] = parsedUrl.host
|
||||||
|
|
||||||
for( var key in this._headers ) {
|
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
|
headers["Content-length"]= post_body ? post_body.length : 0; //Probably going to fail if not posting ascii
|
||||||
|
Loading…
x
Reference in New Issue
Block a user