thttp_status: on unknown statuscode print statusheader before exiting - vote - simple cgi voting system for web and gopher
git clone git://src.adamsgaard.dk/vote
Log
Files
Refs
README
LICENSE
---
commit 273ce99a3b8fe03c3808861b41f8cbfcbdc8f0b3
parent a6b0af117e74c1704a22aa4dcb1264b6f131bee4
Author: Hiltjo Posthuma 
Date:   Sun,  4 Oct 2020 15:45:38 +0200

http_status: on unknown statuscode print statusheader before exiting

(This condition never happens though)

Signed-off-by: Anders Damsgaard 

Diffstat:
  M vote.c                              |       2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/vote.c b/vote.c
t@@ -39,8 +39,8 @@ http_status(int statuscode)
                 printf("Status: 500 Internal Server Error\r\n\r\n");
                 break;
         default:
-                err(1, "unknown status code %d\n", statuscode);
                 printf("Status: 500 Internal Server Error\r\n\r\n");
+                err(1, "unknown status code %d\n", statuscode);
         }
 }