src/server/safs/cgi.c

changeset 585
bae488d2b3c2
parent 579
e10457d74fe1
child 617
01228719b3ce
--- a/src/server/safs/cgi.c	Mon May 26 21:13:11 2025 +0200
+++ b/src/server/safs/cgi.c	Tue May 27 18:41:23 2025 +0200
@@ -452,7 +452,11 @@
                 
                 parser->cgiheader = FALSE;
                 if(parser->status > 0) {
+                    log_ereport(LOG_DEBUG, "cgi-send: req: %p pid: %d response status code: %d", rq, handler->process.pid, parser->status);
                     protocol_status(sn, rq, parser->status, parser->msg);
+                } else {
+                    log_ereport(LOG_DEBUG, "cgi-send: req: %p pid: %d no status code", rq, handler->process.pid);
+                    protocol_status(sn, rq, 200, NULL); // default 200 ok
                 }
                 
                 handler->response = http_create_response(sn, rq);
@@ -858,7 +862,7 @@
                 return -1;
             }
             
-            if(!cx_strcmp((cxstring){name.ptr, name.length}, (cxstring)CX_STR("status"))) {
+            if(!cx_strcasecmp((cxstring){name.ptr, name.length}, (cxstring)CX_STR("status"))) {
                 cxmutstr codestr = value;
                 int j;
                 for(j=0;j<codestr.length;j++) {

mercurial