From b4d8202f1bc3219452939ad6c873577e6f290f40 Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 21 Oct 2022 18:11:12 +0200 Subject: [PATCH] Add HTTP/1.1 HEADER BEFORE SENDING HTML --- 12345.sh | 5 ++++- templates/index.http | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/12345.sh b/12345.sh index 8ec44ab1..f7ff36fe 100755 --- a/12345.sh +++ b/12345.sh @@ -35,7 +35,10 @@ HOMEPAGE="$HOME/.zen/Astroport.ONE/templates/instascan.html" while true; do if [[ $HOMEPAGE ]]; then - cp $HOMEPAGE $HOME/.zen/tmp/myIP.http.${MOATS} + echo "HTTP/1.1 200 Everything Is Just Fine +Server: Astroport +Content-Type: text/html; charset=UTF-8" > $HOME/.zen/tmp/myIP.http.${MOATS} + cat $HOMEPAGE $HOME/.zen/tmp/myIP.http.${MOATS} >> $HOME/.zen/tmp/myIP.http.${MOATS} else # REPLACE myIP in http response template sed "s~127.0.0.1:12345~$myIP:$PORT~g" $HOME/.zen/Astroport.ONE/templates/index.http > ~/.zen/tmp/myIP.http.${MOATS} diff --git a/templates/index.http b/templates/index.http index ae0a1c67..82842042 100644 --- a/templates/index.http +++ b/templates/index.http @@ -1,7 +1,6 @@ HTTP/1.1 200 Everything Is Just Fine Server: Astroport Content-Type: text/html; charset=UTF-8 -