forked from svrjs/svrjs
Fix URL parser even more
This commit is contained in:
parent
6933e3e9ed
commit
5942f9dbde
1 changed files with 1 additions and 1 deletions
2
svr.js
2
svr.js
|
@ -1359,7 +1359,7 @@ function parseURL(uri, prepend) {
|
||||||
var hasSlashes = (uri.indexOf("/") != -1);
|
var hasSlashes = (uri.indexOf("/") != -1);
|
||||||
|
|
||||||
// Parse the URL using regular expression
|
// Parse the URL using regular expression
|
||||||
var parsedURI = uri.match(/^(?:([^:]+:)(\/\/)?)?(?:([^@:\/?#\*]+)@)?([^:\/?#\*]+|\[[^\*]\/]\])?(?::([0-9]+))?(\*|\/[^?#]*)?(\?[^#]*)?(#[\S\s]*)?/);
|
var parsedURI = uri.match(/^(?:([^:]+:)(\/\/)?)?(?:([^@\/?#\*]+)@)?([^:\/?#\*]+|\[[^\*]\/]\])?(?::([0-9]+))?(\*|\/[^?#]*)?(\?[^#]*)?(#[\S\s]*)?/);
|
||||||
// Match 1: protocol
|
// Match 1: protocol
|
||||||
// Match 2: slashes after protocol
|
// Match 2: slashes after protocol
|
||||||
// Match 3: authentication credentials
|
// Match 3: authentication credentials
|
||||||
|
|
Reference in a new issue