X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=cgisimple.c;h=fcf71e7e205b56bae18dc993f6dbded4250bd4d5;hb=6c47bd9275fc43e458004e9221a2e171ef30d4cf;hp=005a83f1e012d0c826bd960b151fa4ff0e35ae27;hpb=3739843e889eb3d2cf3f52e61a5fa07db1b2b046;p=privoxy.git diff --git a/cgisimple.c b/cgisimple.c index 005a83f1..fcf71e7e 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,4 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.4 2001/10/02 15:31:12 oes Exp $"; +const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.5 2001/10/07 15:30:41 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -36,6 +36,9 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.4 2001/10/02 15:31:12 oes Exp * * Revisions : * $Log: cgisimple.c,v $ + * Revision 1.5 2001/10/07 15:30:41 oes + * Removed FEATURE_DENY_GZIP + * * Revision 1.4 2001/10/02 15:31:12 oes * Introduced show-request cgi * @@ -129,6 +132,37 @@ int cgi_default(struct client_state *csp, struct http_response *rsp, } + + +/********************************************************************* + * + * Function : cgi_error_404 + * + * Description : CGI function that is called if an unknow action was + * given. + * + * Parameters : + * 1 : csp = Current client state (buffers, headers, etc...) + * 2 : rsp = http_response data structure for output + * 3 : parameters = map of cgi parameters + * + * Returns : 0 + * + *********************************************************************/ +int cgi_error_404(struct client_state *csp, + struct http_response *rsp, + struct map *parameters) +{ + struct map *exports = default_exports(csp, NULL); + + rsp->status = strdup("404 JunkBuster configuration page not found"); + rsp->body = template_load(csp, "cgi-error-404"); + template_fill(&rsp->body, exports); + free_map(exports); + return 0; +} + + /********************************************************************* * * Function : cgi_show_request