Added an extra test, and checked realHeaders to catch any dodgy custom ones
This commit is contained in:
@ -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 && !('Authorization' in headers)) {
|
||||
if( access_token && !('Authorization' in realHeaders)) {
|
||||
if( ! parsedUrl.query ) parsedUrl.query= {};
|
||||
parsedUrl.query[this._accessTokenName]= access_token;
|
||||
}
|
||||
|
Reference in New Issue
Block a user