diff --git a/back/lib/http_res b/back/lib/http_res index 04470e4..25c87ce 100755 --- a/back/lib/http_res +++ b/back/lib/http_res @@ -3,6 +3,9 @@ # DESCRIPTION: Formats an http response from arguments # USAGE: [printf "message" |] res [200] [text/plain] +body="$(cat)" +printf "${*}\n${body}" >>"${LOGFILE}" + # Parse status status='' case "${1}" in @@ -15,7 +18,6 @@ case "${1}" in esac # Parse inputs -body="$(cat)" content_type='' if [ "${2}" == '' ] && [ "${body}" == '' ] then content_type=''