cgi conformant 404s
authorpaul <paul@plutz.net>
Sun, 19 Mar 2017 19:08:06 +0000 (19:08 +0000)
committerpaul <paul@plutz.net>
Sun, 19 Mar 2017 19:08:06 +0000 (19:08 +0000)
svn path=/trunk/; revision=53

index.cgi

index 319b9be..907041e 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -54,7 +54,9 @@ elif [ -n "$ACTION" ] && [ -x "${_EXEC}/actions/${ACTION}.sh" ]; then
 elif   [ -n "$PAGE" ] && [ -x "${_EXEC}/pages/${PAGE}.sh" ]; then
   . "$_EXEC/shcgi/page.sh"
 else
-  printf 'HTTP/1.1 404 Not Found\r\n'
+  printf 'Status: 404 Not Found\r\n'
   PAGE=error
-  [ -x "${_EXEC}/pages/${PAGE}.sh" ] && . "$_EXEC/shcgi/page.sh"
+  [ -x "${_EXEC}/pages/${PAGE}.sh" ] \
+  && . "$_EXEC/shcgi/page.sh" \
+  || printf '\r\n'
 fi |HTTP_format $@