changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > werc / changeset: Proper 404 for dirs too

changeset 322: 3a671df6a55c
parent 321: 66692fc7f8b1
child 323: f4b819c71a2e
author: uriel@engel.se.cat-v.org
date: Fri, 16 Jan 2009 01:24:58 +0100
files: bin/werc.rc
description: Proper 404 for dirs too
     1.1--- a/bin/werc.rc	Fri Jan 16 01:08:54 2009 +0100
     1.2+++ b/bin/werc.rc	Fri Jan 16 01:24:58 2009 +0100
     1.3@@ -170,8 +170,12 @@
     1.4 if(~ $req_path */index)
     1.5     perm_redirect `{echo $req_path | sed 's,/index$,/,'}
     1.6 
     1.7-if(~ $local_path */)
     1.8-    local_path=$local_path^'index'
     1.9+if(~ $local_path */) {
    1.10+    if(test -d $local_path)
    1.11+        local_path=$local_path^'index'
    1.12+    if not
    1.13+        perm_redirect `{echo $req_path|sed 's,/+$,,'}
    1.14+}
    1.15 if not if(test -d $local_path)
    1.16     perm_redirect $req_path^'/'
    1.17