Merge remote-tracking branch 'jfromaniello/bug129'

This commit is contained in:
ciaranj
2013-03-05 17:43:51 +00:00
2 changed files with 13 additions and 2 deletions

View File

@ -75,7 +75,7 @@ exports.OAuth2.prototype._request= function(method, url, headers, post_body, acc
realHeaders['Host']= parsedUrl.host;
realHeaders['Content-Length']= post_body ? Buffer.byteLength(post_body) : 0;
if( access_token ) {
if( access_token && !('Authorization' in headers)) {
if( ! parsedUrl.query ) parsedUrl.query= {};
parsedUrl.query[this._accessTokenName]= access_token;
}