From: single-right-quote <34298117+single-right-quote@users.noreply.github.com> Date: Thu, 26 Aug 2021 02:44:46 +0000 (-0400) Subject: http-error-response.execline: cleanup X-Git-Tag: v1.0.0~36 X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=ae9a444980105cc47854602c7bf9c1f2d9cc5af4;p=httpd-execline.git http-error-response.execline: cleanup --- diff --git a/visible-to-httpd/binaries/http-error-response.execline b/visible-to-httpd/binaries/http-error-response.execline index 0880566..7add6c1 100755 --- a/visible-to-httpd/binaries/http-error-response.execline +++ b/visible-to-httpd/binaries/http-error-response.execline @@ -45,7 +45,7 @@ if { cd ${error_response_directory} backtick -D "application/xhtml+xml; charset=utf-8" -n Content-Type { cat Content-Type } - backtick -i -n Content-Length { wc -c message_body } + backtick -i -n Content-Length { stat -c %s -- message_body } multisubstitute { importas -i -u Content-Type Content-Type @@ -66,11 +66,10 @@ Date: "${Date}${extra_headers}" # (why does `hoc -e` not work?) backtick -n -E Content-Length { - backtick -i -n message_length { + backtick -E -i -n message_length { pipeline { s6-echo -n -- ${2} } wc -c } - importas -i -u message_length message_length pipeline { s6-echo -- ${message_length}"*2 + 288" } hoc