From 8692f9c487d7f6a61a6a8aa81d0e85d8d2fab65b Mon Sep 17 00:00:00 2001 From: single-right-quote <34298117+single-right-quote@users.noreply.github.com> Date: Wed, 16 Sep 2020 18:52:45 +0000 Subject: [PATCH] http-get-extra-headers.execline: bugfix: terminate headers with \r\n embarrassing. --- visible-to-httpd/binaries/http-error-response.execline | 4 ++-- visible-to-httpd/binaries/http-get-extra-headers.execline | 4 +++- visible-to-httpd/binaries/httpd.execline | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/visible-to-httpd/binaries/http-error-response.execline b/visible-to-httpd/binaries/http-error-response.execline index af58267..f749eca 100755 --- a/visible-to-httpd/binaries/http-error-response.execline +++ b/visible-to-httpd/binaries/http-error-response.execline @@ -45,7 +45,7 @@ if { Content-Type: "${Content-Type}"\r Content-Length: "${Content-Length}"\r Date: "${Date}"\r -"${extra_headers}"\r +"${extra_headers}" \r " } @@ -72,7 +72,7 @@ Date: "${Date}"\r Content-Type: application/xhtml+xml; charset=utf-8\r Content-Length: "${Content-Length}"\r Date: "${Date}"\r -"${extra_headers}"\r +"${extra_headers}" \r " } diff --git a/visible-to-httpd/binaries/http-get-extra-headers.execline b/visible-to-httpd/binaries/http-get-extra-headers.execline index 39cd3c2..1a00f11 100755 --- a/visible-to-httpd/binaries/http-get-extra-headers.execline +++ b/visible-to-httpd/binaries/http-get-extra-headers.execline @@ -84,4 +84,6 @@ if -t { s6-test -v header-directory } pipeline { cat ${header_name} } tr -d "\r\n" } - # do make sure not to forget to supply the final newline + s6-echo -n -- "\r\n" + # do remember to add the terminating `\r\n`! + diff --git a/visible-to-httpd/binaries/httpd.execline b/visible-to-httpd/binaries/httpd.execline index 187f67b..ed8c6c0 100755 --- a/visible-to-httpd/binaries/httpd.execline +++ b/visible-to-httpd/binaries/httpd.execline @@ -238,7 +238,7 @@ Content-Type: "${Content-Type}"\r Content-Length: "${Content-Length}"\r Last-Modified: "${Last-Modified}"\r Date: "${Date}"\r -"${extra_headers}"\r +"${extra_headers}" \r " } -- 2.47.3