From 2fa7f4ecb7b50d514c567bb7c0fd0cfa37d9fa91 Mon Sep 17 00:00:00 2001 From: Paul McKellar Date: Mon, 6 Sep 2010 15:23:12 +0800 Subject: [PATCH] clone was too agressive, was getting some functions copied to headers from a bad library --- lib/oauth.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/oauth.js b/lib/oauth.js index 49c5b50..c705fe3 100644 --- a/lib/oauth.js +++ b/lib/oauth.js @@ -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