From 7b7c7ecdc8a41ee4613c6ad7f3e7e7829be8081f Mon Sep 17 00:00:00 2001 From: single-right-quote <34298117+single-right-quote@users.noreply.github.com> Date: Wed, 8 Sep 2021 00:39:36 +0000 Subject: [PATCH] bugfix: respond for any sytactically valid Hosts as a fallback, make sure to send a response even when invalid hostnames are required --- visible-to-httpd/binaries/http-get-extra-headers.execline | 2 +- visible-to-httpd/binaries/http-header-parse.execline | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/visible-to-httpd/binaries/http-get-extra-headers.execline b/visible-to-httpd/binaries/http-get-extra-headers.execline index 0bee831..35185fa 100755 --- a/visible-to-httpd/binaries/http-get-extra-headers.execline +++ b/visible-to-httpd/binaries/http-get-extra-headers.execline @@ -17,7 +17,7 @@ # TODO: write a GUI?? with like, `yad(1)` or something??? idk multisubstitute { - importas -i hostname http_header_parse_Host + importas -D -fallback hostname http_header_parse_Host importas -i resource resource } diff --git a/visible-to-httpd/binaries/http-header-parse.execline b/visible-to-httpd/binaries/http-header-parse.execline index 26e6b0c..7a0f3f5 100755 --- a/visible-to-httpd/binaries/http-header-parse.execline +++ b/visible-to-httpd/binaries/http-header-parse.execline @@ -175,8 +175,9 @@ ifelse { s6-test \${header_name} = Host } # ifelse -n { ${supported_hostname_test} ${header_contents} } { - fdclose 0 - exit 0 + heredoc 0 "" + export http_header_parse_${header_name} ${header_contents} + ${@} } export http_header_parse_${header_name} ${header_contents} -- 2.47.3