]> git.plutz.net Git - shcgi/commitdiff
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 319b9be2a986d60a7abc78536716f289a9913604..907041ee6395a89e4979b34e71b44bea47c124e5 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 $@