From ae9a444980105cc47854602c7bf9c1f2d9cc5af4 Mon Sep 17 00:00:00 2001 From: single-right-quote <34298117+single-right-quote@users.noreply.github.com> Date: Wed, 25 Aug 2021 22:44:46 -0400 Subject: [PATCH] http-error-response.execline: cleanup --- visible-to-httpd/binaries/http-error-response.execline | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- 2.47.3