Correctly grab redirect url

This commit is contained in:
Frank Breedijk 2015-12-21 15:52:55 +01:00
parent d84279f571
commit 377f050ad7

View File

@ -705,7 +705,7 @@ run_http_header() {
out " $status_code$msg_thereafter"
case $status_code in
301|302|307|308)
redirect = $(grep -a '^Location' $HEADERFILE | sed 's/Location: //' | tr -d '\r\n')
redirect=`$(grep -a '^Location' $HEADERFILE | sed 's/Location: //' | tr -d '\r\n')`
out ", redirecting to \"$redirect\""
if [[ $redirect != "https://"* ]]; then
pr_litered " -- Redirect to insecure URL (NOT ok)"