shithub: werc

Download patch

ref: 48db5a9c81f3783750dbcbbc8bc89bce31c3a407
parent: cf074093fbb7535178428ecff8b8648305cdf216
author: uriel <[email protected]>
date: Sun Dec 28 06:52:57 EST 2008

Replace 404_handler with a direct call to tpl_handler.

--- a/bin/werc.rc
+++ b/bin/werc.rc
@@ -99,8 +99,6 @@
     echo '</ul>'
 }
 
-fn 404_handler { template `{get_lib_file 404.tpl} }
-
 fn blog_dir_handler {
     blogDirs=$*
     tpl_handler lib/feeds/html.tpl
@@ -196,7 +194,7 @@
 
     # File not found
     if not {
-        set_handler 404_handler $body
+        set_handler tpl_handler `{get_lib_file 404.tpl}
         dprint 'NOT FOUND: '$SERVER_NAME^$REQUEST_URI^' - '^$"HTTP_REFERER^' - '^$"HTTP_USER_AGENT
         echo 'Status: 404 Not Found'
     }