Commit 35df3140 authored by Aaron G's avatar Aaron G
Browse files

Change to a more correct HTTP response header

parent 7120217b
......@@ -65,8 +65,19 @@ authorize()
# Basic http server, waiting for redirect from reddit auth site
# Word splitting is intended here
# shellcheck disable=2046
set -- $(printf 'HTTP/1.0 200 OK\n\n%s\n' \
'Done, you can leave this page now' | nc "$@")
set -- $(
{
printf '%s\r\n' \
"HTTP/1.1 200 OK" \
"Date: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %T %Z')" \
"Connection: close" \
'Content-Type: text/plain; charset=UTF-8' \
"Content-Length: 34" \
"Server: nc" \
""
printf '%s\n' "Done, you can leave this page now"
} | nc "$@"
)
$_ext_command &&
wait $_ext_command_pid
......
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