X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=cgi.c;h=98d05cdc18aebd73bdcc3f17207214658178e95b;hb=59e68c837eaa393a3fa0bb979b9b1da23a93e841;hp=c58107869ecbf19c6f19522264b61c202420946f;hpb=7e9d34e867547d7938f500eccdf2567797152b6e;p=privoxy.git
diff --git a/cgi.c b/cgi.c
index c5810786..98d05cdc 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-const char cgi_rcs[] = "$Id: cgi.c,v 1.47 2002/03/08 16:41:33 oes Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.49 2002/03/13 00:27:04 jongfoster Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgi.c,v $
@@ -38,6 +38,12 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.47 2002/03/08 16:41:33 oes Exp $";
*
* Revisions :
* $Log: cgi.c,v $
+ * Revision 1.49 2002/03/13 00:27:04 jongfoster
+ * Killing warnings
+ *
+ * Revision 1.48 2002/03/08 17:47:07 jongfoster
+ * Adding comments
+ *
* Revision 1.47 2002/03/08 16:41:33 oes
* Added GIF images again
*
@@ -327,6 +333,11 @@ static const struct cgi_dispatcher cgi_dispatchers[] = {
{ "",
cgi_default,
"Junkbuster main page" },
+#ifdef FEATURE_GRACEFUL_TERMINATION
+ { "die",
+ cgi_die,
+ "Shut down - Do not deploy this build in a production environment, this is a one click Denial Of Service attack!!!" },
+#endif
{ "show-status",
cgi_show_status,
"Show information about the current configuration" },
@@ -660,7 +671,8 @@ static struct http_response *dispatch_known_cgi(struct client_state * csp,
csp->ip_addr_str, csp->http->cmd);
/* Find and start the right CGI function*/
- for (d = cgi_dispatchers; FOREVER; d++)
+ d = cgi_dispatchers;
+ for (;;)
{
if ((d->name == NULL) || (strcmp(path_copy, d->name) == 0))
{
@@ -683,6 +695,7 @@ static struct http_response *dispatch_known_cgi(struct client_state * csp,
return cgi_error_memory();
}
}
+ d++;
}
}