Skip to content

Commit

Permalink
The http module expects protocols (http or https) to include the trai…
Browse files Browse the repository at this point in the history
…ling ':', otherwise an exception is throw. (see https://github.com/joyent/node/blob/master/lib/http.js#L1377)
  • Loading branch information
jplock committed Jan 16, 2012
1 parent 8eccd4d commit b4dddfe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.js
Expand Up @@ -307,7 +307,7 @@ function processRequest(req, res, next) {
baseHostPort = (baseHostInfo.length > 1) ? baseHostInfo[1] : "";

var paramString = query.stringify(params),
privateReqURL = apiConfig.protocol + '://' + apiConfig.baseURL + apiConfig.privatePath + methodURL + ((paramString.length > 0) ? '?' + paramString : ""),
privateReqURL = apiConfig.protocol + '//' + apiConfig.baseURL + apiConfig.privatePath + methodURL + ((paramString.length > 0) ? '?' + paramString : ""),
options = {
headers: {},
protocol: apiConfig.protocol,
Expand Down Expand Up @@ -395,7 +395,7 @@ function processRequest(req, res, next) {
null,
apiConfig.oauth.crypt);

var resource = options.protocol + '://' + options.host + options.path,
var resource = options.protocol + '//' + options.host + options.path,
cb = function(error, data, response) {
if (error) {
if (error.data == 'Server Error' || error.data == '') {
Expand Down

0 comments on commit b4dddfe

Please sign in to comment.