Merge pull request #341 from STRML/fixAccessTokenMutatedOptions

Fix a slowdown caused by mutation of an incoming accessToken option.
This commit is contained in:
Raymond Feng 2014-06-20 17:36:57 -07:00
commit 3672c59410
1 changed files with 3 additions and 5 deletions

View File

@ -191,11 +191,9 @@ function tokenIdForRequest(req, options) {
var length; var length;
var id; var id;
params.push('access_token'); params = params.concat(['access_token']);
headers.push('X-Access-Token'); headers = headers.concat(['X-Access-Token', 'authorization']);
headers.push('authorization'); cookies = cookies.concat(['access_token', 'authorization']);
cookies.push('access_token');
cookies.push('authorization');
for(length = params.length; i < length; i++) { for(length = params.length; i < length; i++) {
id = req.param(params[i]); id = req.param(params[i]);