From 0b94a146148bed3abfa4b700e1d12865c77b3401 Mon Sep 17 00:00:00 2001 From: David Cooper Date: Tue, 3 Dec 2019 16:06:35 -0500 Subject: [PATCH] Indent subsequent rows of HTTP security headers by two spaces When printing a long HTTP security header, this commit causes every row after the first one to be indented by two additional spaces. In the case of very long headers, this extra indentation makes it a little easier for readers to see where the next security header begins. --- testssl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index 6634e364..5ef74cb3 100755 --- a/testssl.sh +++ b/testssl.sh @@ -3050,8 +3050,8 @@ run_security_headers() { # Include $header when determining where to insert line breaks, but print $header # separately. pr_svrty_good "$header" - header_output="$(out_row_aligned_max_width "$header $HEADERVALUE" "$spaces" $TERM_WIDTH)" - outln "${header_output#$header}" + header_output="$(out_row_aligned_max_width "${header:2} $HEADERVALUE" "$spaces " $TERM_WIDTH)" + outln "${header_output#${header:2}}" fileout "$header" "OK" "$HEADERVALUE" fi done