From 96a115b37ba8c9beca5d31f1408ffc5f89da54c2 Mon Sep 17 00:00:00 2001 From: Uriel Date: Tue, 13 Jan 2009 03:18:19 +0100 Subject: [PATCH] Get rid of response_format which was only used by blagh feeds anyway, and we can emulate by setting $headers to nil plus adding a $res_tail var. --- bin/werc.rc | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/bin/werc.rc b/bin/werc.rc index c923b61..4594642 100755 --- a/bin/werc.rc +++ b/bin/werc.rc @@ -3,7 +3,6 @@ cd .. forbidden_uri_chars='[^a-zA-Z0-9_+\-\/\.]' -response_format=html fn get_lib_file { if(test -f $sitedir/_werc/lib/$1) @@ -133,6 +132,7 @@ path=(. $PLAN9/bin ./bin/ /bin/ /usr/bin) headers=lib/headers.tpl master_template=default_master.tpl +res_tail='' sidebar=sidebar werc_root=`{pwd} for(i in siteTitle siteSubTitle pageTitle extraHeaders) @@ -210,12 +210,5 @@ setup_handlers if(! ~ $#debug 0) dprint ' '$"SERVER_NAME^$"REQUEST_URI' - '$"HTTP_USER_AGENT' - '$"REQUEST_METHOD' - '$"handler -# Template/body selection -master_template=`{get_lib_file $master_template} - -if(~ $response_format html) { - template $headers $master_template | awk_buffer - echo '' -} -if not if(~ $response_format raw) - template < $master_template +template $headers `{get_lib_file $master_template} | awk_buffer +echo $res_tail