ref: ed02341b0d46014d0d29e49d953894b66167d3dc
parent: e48ae2602e271104b6131206af96de92c20e7084
author: uriel <uriel@engel.se.cat-v.org>
date: Tue Dec 30 19:16:47 EST 2008
Move $local_path deffinition to a more correct place.
--- a/bin/werc.rc
+++ b/bin/werc.rc
@@ -185,6 +185,7 @@
# Parse request URL
# NOTE: $REQUEST_URI is not officially in CGI 1.1, but seems to be de-facto
req_path=`{echo -n $REQUEST_URI | sed 's/\?.*//; s/'^$forbidden_uri_chars^'//g; s/\.\.*/./g; 1q'}
+local_path=$sitedir$req_path
ifs='/' { args=`{echo -n $req_path} }
# Hack: preload post data so we can access it from templates where cgi's stdin is not accesible
@@ -231,7 +232,6 @@
pageTitle=$"pageTitle^' | '^$"siteTitle^' '^$"siteSubTitle
-local_path=$sitedir$req_path
if(test -d $local_path) {
if(! ~ $local_path */)
perm_redirect $req_path^'/'