From 0884966b4ebae5dd09b372e5c388b1d0e8eef91a Mon Sep 17 00:00:00 2001 From: Uriel Date: Fri, 23 Jan 2009 17:48:09 +0100 Subject: [PATCH] Fix minor cosmetic bug in dir listing by passing req_path instead of local_path. --- bin/werc.rc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/werc.rc b/bin/werc.rc index b67e0de..38ccf5d 100755 --- a/bin/werc.rc +++ b/bin/werc.rc @@ -78,10 +78,9 @@ fn txt_handler { fn dir_listing_handler { d=`{basename -d $1} - # XXX $d is based on $local_path, but should display only req_path here. echo $d|sed 's,.*//,,g; s,/$,,; s,/, / ,g; s,.*,

&

' } @@ -108,7 +107,7 @@ fn setup_handlers { { } # We are done # Dir listing if not if(~ $local_path */index) - handler_body_main=(dir_listing_handler $local_path) + handler_body_main=(dir_listing_handler $req_path) # Canonize explicit .html urls, the web server might handle this first! if not if(~ $local_path *.html && test -f $local_path) perm_redirect `{ echo $req_path|sed 's/.html$//' }