From fd89f1b99f5c308eb247e6477808c984a3783dab Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 4 Jun 2007 06:02:00 +0200 Subject: [PATCH] Blockbuffer all output. --- bin/controller.rc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/controller.rc b/bin/controller.rc index a0a81c7..db8ea55 100755 --- a/bin/controller.rc +++ b/bin/controller.rc @@ -124,6 +124,18 @@ if (! ~ $#sidebar 0) if (test -d $body) body=$body/index +fn template { + template.awk | rc | + awk '{ + buf = buf $0"\n" + if(length(buf) > 8192) { + printf "%s", buf + buf = "" + } + } + END{ printf "%s", buf }' +} + # RSS fn statpost { f = $1 @@ -146,7 +158,7 @@ fn statpost { } if(! ~ $REQUEST_URI */index.rss) { - cat $headers $template | template.awk | rc + cat $headers $template | template exit } @@ -154,7 +166,7 @@ uri = `{echo $uri | sed 's/indexrss$//'} uri=$baseuri$"uri # Should be in a separate file. -cat <<'!' | template.awk | rc +cat <<'!' | template