Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46e6630
)
Redirect directory requests to dirplex to always include a trailing slash.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 24 Aug 2010 19:40:24 +0000
(21:40 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 24 Aug 2010 19:40:24 +0000
(21:40 +0200)
src/dirplex.c
patch
|
blob
|
blame
|
history
diff --git
a/src/dirplex.c
b/src/dirplex.c
index
c612c15
..
699819f
100644
(file)
--- a/
src/dirplex.c
+++ b/
src/dirplex.c
@@
-413,6
+413,10
@@
static void serve(struct hthead *req, int fd)
else
path = sprintf2("%s/%s", path, p);
free(tmp);
+ if(p2 == NULL) {
+ stdredir(req, fd, 301, sprintf3("%s/", p));
+ goto out;
+ }
if(checkdir(req, fd, path))
break;
goto next;