@@ -790,9 +790,9 @@ _response() {
790
790
fi
791
791
done
792
792
793
- headers=" http_version : ${http_version}
794
- status_code : ${status_code}
795
- status_text : ${status_text}
793
+ headers=" HTTP_VERSION : ${http_version}
794
+ STATUS_CODE : ${status_code}
795
+ STATUS_TEXT : ${status_text}
796
796
"
797
797
while IFS=" : " read -r hdr val; do
798
798
# Headers stop at the first blank line.
@@ -822,7 +822,7 @@ status_text: ${status_text}
822
822
{
823
823
sub(/^rel="/, "", $2); sub(/"$/, "", $2)
824
824
sub(/^ *</, "", $1); sub(/>$/, "", $1)
825
- print "Link_" $2 , $1
825
+ print "LINK_" toupper($2) , $1
826
826
}' )
827
827
" # need trailing newline
828
828
;;
@@ -836,6 +836,7 @@ status_text: ${status_text}
836
836
# Output requested headers in deterministic order.
837
837
for arg in " $@ " ; do
838
838
_log debug " Outputting requested header '${arg} '."
839
+ arg=" $( printf ' %s' " $arg " | awk ' {print toupper($0)}' ) "
839
840
output=$( printf ' %s' " $headers " | while IFS=" : " read -r hdr val; do
840
841
[ " $hdr " = " $arg " ] && printf ' %s' " $val "
841
842
done)
0 commit comments