shithub: werc

Download patch

ref: c64f594c3b27b3def8dfb0b03296e9365728f41b
parent: 123b4552b05964e0e0fc01c1e2229b543d1c4965
author: uriel <[email protected]>
date: Thu Jan 15 20:08:54 EST 2009

Fix handling of static /pub/ files.

--- a/bin/werc.rc
+++ b/bin/werc.rc
@@ -116,8 +116,8 @@
     # Fallback static file handler
     if not if(test -f $local_path)
         static_file $local_path
-    if not if(test -f pub/$req_path)
-        static_file pub/$req_path
+    if not if(~ $req_path /pub/* && test -f .$req_path)
+        static_file .$req_path
     # File not found
     if not {
         handler_body_main=(tpl_handler `{get_lib_file 404.tpl})