summaryrefslogtreecommitdiff
path: root/src/mod_alias.c
diff options
context:
space:
mode:
authorArno Töll <arno@debian.org>2013-10-15 20:19:04 +0200
committerArno Töll <arno@debian.org>2013-10-15 20:19:04 +0200
commit1380410981681f011377225708e9c530330fd5a0 (patch)
tree7dd371bc4cac8910130e4ee0f4508bc519f1778d /src/mod_alias.c
parent5b23e76990e58208a01c2a5362362575bc12b397 (diff)
downloadlighttpd-1380410981681f011377225708e9c530330fd5a0.tar.gz
Imported Upstream version 1.4.33upstream/1.4.33upstream
Diffstat (limited to 'src/mod_alias.c')
-rw-r--r--src/mod_alias.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_alias.c b/src/mod_alias.c
index 5b7b510..0bac56b 100644
--- a/src/mod_alias.c
+++ b/src/mod_alias.c
@@ -156,7 +156,8 @@ PHYSICALPATH_FUNC(mod_alias_physical_handler) {
mod_alias_patch_connection(srv, con, p);
/* not to include the tailing slash */
- basedir_len = (con->physical.basedir->used - 1) - 1;
+ basedir_len = (con->physical.basedir->used - 1);
+ if ('/' == con->physical.basedir->ptr[basedir_len-1]) --basedir_len;
uri_len = con->physical.path->used - 1 - basedir_len;
uri_ptr = con->physical.path->ptr + basedir_len;