Permalink
Browse files

The http module expects protocols (http or https) to include the trai…

…ling ':', otherwise an exception is throw. (see https://github.com/joyent/node/blob/master/lib/http.js#L1377)
  • Loading branch information...
1 parent 8eccd4d commit b4dddfe2e445bcbd6b5f39f7600ca647cddcf326 @jplock jplock committed Jan 16, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app.js
View
4 app.js
@@ -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,
@@ -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 == '') {

0 comments on commit b4dddfe

Please sign in to comment.