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