aboutsummaryrefslogtreecommitdiffstats
path: root/src/services.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/services.js')
-rw-r--r--src/services.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/services.js b/src/services.js
index a8004dd1..70d774a9 100644
--- a/src/services.js
+++ b/src/services.js
@@ -1,4 +1,4 @@
-var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?([^\?#]+)(\?([^#]*))?(#(.*))?$/,
+var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,
HASH_MATCH = /^([^\?]*)?(\?([^\?]*))?$/,
DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp':21},
EAGER = 'eager',
@@ -184,7 +184,7 @@ angularServiceInject("$location", function(browser) {
loc.protocol = match[1];
loc.host = match[3] || '';
loc.port = match[5] || DEFAULT_PORTS[loc.protocol] || _null;
- loc.path = match[6];
+ loc.path = match[6] || '';
loc.search = parseKeyValue(match[8]);
loc.hash = match[10] || '';