Permalink
Browse files

The ? to start a query string was missing when no parameters are requ…

…ired on an unsecured call.
  • Loading branch information...
jplock committed Jan 17, 2012
1 parent 128a8ac commit 166b3c7a56747799eae5b8bb588dfdf88d30503f
Showing with 7 additions and 1 deletion.
  1. +7 −1 app.js
View
8 app.js
@@ -469,7 +469,13 @@ function processRequest(req, res, next) {
// Add API Key to params, if any.
if (apiKey != '' && apiKey != 'undefined' && apiKey != undefined) {
- options.path += '&' + apiConfig.keyParam + '=' + apiKey;
+ if (options.path.indexOf('?') !== -1) {
+ options.path += '&';
+ }
+ else {
+ options.path += '?';
+ }
+ options.path += apiConfig.keyParam + '=' + apiKey;
}
// Perform signature routine, if any.

0 comments on commit 166b3c7

Please sign in to comment.