summaryrefslogtreecommitdiff
path: root/src/mod_alias.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-12-22 13:08:56 +0400
committerIgor Pashev <pashev.igor@gmail.com>2013-12-22 13:08:56 +0400
commitb966ec346bebe34e1f50fb9cc46b9adf111ea73d (patch)
tree5264705c133f3836ed0deca1915b30a4f29caaa9 /src/mod_alias.c
parentef95a4944d8367259f3b432e2ab1a84d9f5ed024 (diff)
parent9679c2dc7c0098b667c0ea8bbf309d5ae60a6cc3 (diff)
downloadlighttpd-b966ec346bebe34e1f50fb9cc46b9adf111ea73d.tar.gz
Merge branch 'master' of git://git.debian.org/git/pkg-lighttpd/lighttpd
Conflicts: debian/changelog
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;