From: Paul Hänsch Date: Wed, 17 Apr 2024 14:33:29 +0000 (+0200) Subject: debug function X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=1a733d66393fa87f936f19ab64b31ecdb828994f;p=cgilite debug function --- diff --git a/cgilite.awk b/cgilite.awk index f16ed6a..ebf4411 100644 --- a/cgilite.awk +++ b/cgilite.awk @@ -1,5 +1,7 @@ #!/bin/env awk -f +function debug(t) { printf "%s\n", t >>"/dev/stderr"; } + function PATH( str, seg, out ) { while ( str ) { seg = str; @@ -151,8 +153,9 @@ BEGIN { split("", _GET); split("", _POST); split("", _REF); split("", _HEADER); split("", _COOKIE); - if ( ENVIRON["REQUEST_METHOD"] ) + if ( ENVIRON["REQUEST_METHOD"] ) { _cgilite_headers(); - else + } else { _cgilite_request(); + } }