Added some extra support to the url normalisation (ensure that when no path given the normalised url has a trailing slash)

This commit is contained in:
ciaranj
2010-04-27 19:49:42 +01:00
parent e3e4c81ee7
commit 091ac960b9
2 changed files with 8 additions and 3 deletions

View File

@ -54,6 +54,9 @@ exports.OAuth.prototype._normalizeUrl= function(url) {
port= ":" + parsedUrl.port;
}
}
if( !parsedUrl.pathname || parsedUrl.pathname == "" ) parsedUrl.pathname ="/";
return parsedUrl.protocol + "//" + parsedUrl.hostname + port + parsedUrl.pathname;
}