diff --git a/testssl.sh b/testssl.sh index 36914d3..5fef023 100755 --- a/testssl.sh +++ b/testssl.sh @@ -2175,10 +2175,8 @@ run_http_header() { # Populate vars for HTTP time debugme echo "$NOW_TIME: $HTTP_TIME" - # delete from pattern til the end. We ignore any leading spaces (e.g. www.amazon.de) - sed -e '//,$d' -e '//,$d' -e '/<\!DOCTYPE/,$d' -e '/<\!doctype/,$d' \ - -e '/$HEADERFILE.tmp - # ^^^ Attention: filtering is for html body only as of now, doesn't work for other content yet + # Quit on first empty line + sed -e '/^$/q' $HEADERFILE >$HEADERFILE.tmp mv $HEADERFILE.tmp $HEADERFILE HTTP_STATUS_CODE=$(awk '/^HTTP\// { print $2 }' $HEADERFILE 2>>$ERRFILE)