Fixed response status headers

master
Keith Irwin 2022-09-10 14:06:11 -06:00
parent d9676bef0a
commit 960ed70b52
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 4 additions and 5 deletions

View File

@ -6,10 +6,10 @@
# Parse status
status=''
case "${1}" in
''|'0'|'200') status='Status: 200 OK\n';;
'202') status='Status: 202 Accepted\n';;
'400') status='Status: 400 Bad Request\n';;
'500') status='Status: 500 Internal Server Error\n';;
''|'0'|'200') status='200 OK\n';;
'202') status='202 Accepted\n';;
'400') status='400 Bad Request\n';;
'500') status='500 Internal Server Error\n';;
*) exit 3;;
esac
@ -24,5 +24,4 @@ elif [ "${2}" == '' ]
fi
# Send response
printf "${status}${content_type}\n${body}\n" >>"${LOGFILE}"
printf "${status}${content_type}\n${body}\n"