diff options
author | Jordan Sissel <jls@semicomplete.com> | 2011-11-04 13:22:18 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2011-11-04 13:36:06 +0100 |
commit | 358f0ce96ba1147d0b382216af800e53682c5ff4 (patch) | |
tree | 61441bba64670c0cf56833a89fcbfdca5f1636cc /lib/url.js | |
parent | 5fd012e67a94bd3d7832534cdf4b3a24a0029dd4 (diff) | |
download | nodejs-358f0ce96ba1147d0b382216af800e53682c5ff4.tar.gz nodejs-358f0ce96ba1147d0b382216af800e53682c5ff4.tar.bz2 nodejs-358f0ce96ba1147d0b382216af800e53682c5ff4.zip |
url: add '.' '+' and '-' in url protocol
- Based on BNF from RFC 1738 section 5.
- Added tests to cover svn+ssh and some other examples
Diffstat (limited to 'lib/url.js')
-rw-r--r-- | lib/url.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/url.js b/lib/url.js index 7a28e0064..7b4e1b397 100644 --- a/lib/url.js +++ b/lib/url.js @@ -30,7 +30,7 @@ exports.format = urlFormat; // define these here so at least they only have to be // compiled once on the first module load. -var protocolPattern = /^([a-z0-9+]+:)/i, +var protocolPattern = /^([a-z0-9.+-]+:)/i, portPattern = /:[0-9]+$/, // RFC 2396: characters reserved for delimiting URLs. delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], |