summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Flatz2014-02-17 18:16:12 +0100
committerDavid Flatz2014-02-17 18:19:49 +0100
commit2225339ece6ca6bf479abe3b176624fe98c034a2 (patch)
tree8b21480c00119e80b05b08e4d91148d6d1e87cf2
parent31d0ff64befeb9c4777b51f1ca8d621e2d469753 (diff)
downloaditools-2225339ece6ca6bf479abe3b176624fe98c034a2.tar.gz
itools-2225339ece6ca6bf479abe3b176624fe98c034a2.tar.bz2
itools-2225339ece6ca6bf479abe3b176624fe98c034a2.zip
don't get rid of common index file names in urls, we can't assume server configurations
-rw-r--r--it_url.class3
-rwxr-xr-xtests/it_url.t4
2 files changed, 2 insertions, 5 deletions
diff --git a/it_url.class b/it_url.class
index 2cebc62..d63e332 100644
--- a/it_url.class
+++ b/it_url.class
@@ -95,9 +95,6 @@ function it_url($url = null, $options = array())
$this->hostname = preg_replace('/^www\./', '', $this->realhostname);
- # Get rid of common index file names
- $url = preg_replace('#(^|/)(index\.[ps]?html?|index\.php[34]?|default\.aspx?)$#', '', $url);
-
$this->path = preg_replace('#^/$#', '', $url);
if ($this->port != $protoport)
diff --git a/tests/it_url.t b/tests/it_url.t
index a1caaaa..6ece8d8 100755
--- a/tests/it_url.t
+++ b/tests/it_url.t
@@ -8,7 +8,7 @@ $url = new it_url('HTTP://falcon:joshua@www.Relog.CH:80/default.asp');
is(
$url->url,
- 'http://www.relog.ch/',
+ 'http://www.relog.ch/default.asp',
'$url->url'
);
@@ -38,7 +38,7 @@ is(
is(
$url->path,
- '',
+ 'default.asp',
'$url->path'
);