src/server/safs/cgi.c

changeset 585
bae488d2b3c2
parent 579
e10457d74fe1
child 617
01228719b3ce
equal deleted inserted replaced
584:f3ddd6dc8e7b 585:bae488d2b3c2
450 450
451 parser->response_length += r-pos; 451 parser->response_length += r-pos;
452 452
453 parser->cgiheader = FALSE; 453 parser->cgiheader = FALSE;
454 if(parser->status > 0) { 454 if(parser->status > 0) {
455 log_ereport(LOG_DEBUG, "cgi-send: req: %p pid: %d response status code: %d", rq, handler->process.pid, parser->status);
455 protocol_status(sn, rq, parser->status, parser->msg); 456 protocol_status(sn, rq, parser->status, parser->msg);
457 } else {
458 log_ereport(LOG_DEBUG, "cgi-send: req: %p pid: %d no status code", rq, handler->process.pid);
459 protocol_status(sn, rq, 200, NULL); // default 200 ok
456 } 460 }
457 461
458 handler->response = http_create_response(sn, rq); 462 handler->response = http_create_response(sn, rq);
459 if(!handler->response) { 463 if(!handler->response) {
460 handler->result = REQ_ABORTED; 464 handler->result = REQ_ABORTED;
856 860
857 if(name.length == 0 || value.length == 0) { 861 if(name.length == 0 || value.length == 0) {
858 return -1; 862 return -1;
859 } 863 }
860 864
861 if(!cx_strcmp((cxstring){name.ptr, name.length}, (cxstring)CX_STR("status"))) { 865 if(!cx_strcasecmp((cxstring){name.ptr, name.length}, (cxstring)CX_STR("status"))) {
862 cxmutstr codestr = value; 866 cxmutstr codestr = value;
863 int j; 867 int j;
864 for(j=0;j<codestr.length;j++) { 868 for(j=0;j<codestr.length;j++) {
865 if(!isdigit(codestr.ptr[j])) { 869 if(!isdigit(codestr.ptr[j])) {
866 break; 870 break;

mercurial