X-Git-Url: http://git.plutz.net/?p=cgilite;a=blobdiff_plain;f=cgilite.sh;h=4c6de8ca6b784a5a361fb5cd8d70208c1a4d701d;hp=ae09497817521d8795b0e92a7f859d5bda2426a9;hb=7335b7357a3be377ba5ae85bddc603948a4d3183;hpb=8c2e52ffc8910781575126547c067bbd609932bd diff --git a/cgilite.sh b/cgilite.sh index ae09497..4c6de8c 100755 --- a/cgilite.sh +++ b/cgilite.sh @@ -87,10 +87,10 @@ if [ -z "$REQUEST_METHOD" ]; then . "$0" | while read -r l; do case $l in Status:*) cgilite_status="${l#Status: }";; Content-Length:*) cgilite_cl="${l}";; - $CR) printf '%s %s\r\n%s\n%s\n\r\n' \ + $CR) printf '%s %s\r\n%s%s\n\r\n' \ 'HTTP/1.1' "${cgilite_status%${CR}}" \ - "$cgilite_response" "${cgilite_cl}" - cat + "${cgilite_response}${cgilite_response:+${BR}}" "${cgilite_cl}" + cat || kill $$ [ "${cgilite_cl#Connection}" = "${cgilite_cl}" ]; exit;; *) cgilite_response="${cgilite_response:+${cgilite_response}${BR}}${l}";; esac; done || exit 0;