Commit 19d97773 authored by Dominika Liberda's avatar Dominika Liberda 💽
Browse files

* cfg[unbuffered] now does additional fun things

parent b1710af3
Pipeline #368 failed with stage
in 14 seconds
printf "HTTP/1.0 200 OK
if [[ "${cfg[unbuffered]}" != true ]]; then
printf "HTTP/1.0 200 OK
${cfg[extra_headers]}\r\n"
else
echo "uh oh - we're running unbuffered" > /dev/stderr
fi
if [[ ${r[status]} == 200 ]]; then
get_mime "${r[uri]}"
......@@ -8,7 +12,6 @@ fi
if [[ ${r[status]} == 212 ]]; then
if [[ "${cfg[unbuffered]}" == true ]]; then
printf "\r\n"
source "${r[view]}"
else
temp=$(mktemp)
......
......@@ -160,6 +160,7 @@ fi
echo "${r[url]}" >&2
if [[ "${cfg[auth_required]}" == true && "${r[authorized]}" != true ]]; then
echo "Auth failed." >> ${cfg[log_misc]}
r[status]=401
......@@ -212,6 +213,9 @@ if [[ "${r[post]}" == true && "${r[status]}" == 200 ]]; then
fi
fi
# the app config gets loaded a second time to allow for path-specific config modification
[[ -f "${cfg[namespace]}/config.sh" ]] && source "${cfg[namespace]}/config.sh"
if [[ ${r[status]} == 210 && ${cfg[autoindex]} == true ]]; then
source "src/response/listing.sh"
elif [[ ${r[status]} == 211 ]]; then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment