X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=cgi.c;h=9895505c99128a7636f23088938c39dade3b78f9;hb=a63ab812d6982e9829a0b44a02606e08539f738a;hp=eb099fd0ceae065cc09d5fec09e25dd72b9bda86;hpb=126ff944cbdc598e2119bc97f09a430a251bdf3d;p=privoxy.git diff --git a/cgi.c b/cgi.c index eb099fd0..9895505c 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 1.41 2002/01/17 20:56:22 jongfoster Exp $"; +const char cgi_rcs[] = "$Id: cgi.c,v 1.43 2002/03/05 21:33:45 david__schmidt Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgi.c,v $ @@ -38,6 +38,17 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.41 2002/01/17 20:56:22 jongfoster Exp $"; * * Revisions : * $Log: cgi.c,v $ + * Revision 1.43 2002/03/05 21:33:45 david__schmidt + * - Re-enable OS/2 building after new parms were added + * - Fix false out of memory report when resolving CGI templates when no IP + * address is available of failed attempt (a la no such domain) + * + * Revision 1.42 2002/01/21 00:33:20 jongfoster + * Replacing strsav() with the safer string_append() or string_join(). + * Adding map_block_keep() to save a few bytes in the edit-actions-list HTML. + * Adding missing html_encode() to error message generators. + * Adding edit-actions-section-swap and many "shortcuts" to the list of CGIs. + * * Revision 1.41 2002/01/17 20:56:22 jongfoster * Replacing hard references to the URL of the config interface * with #defines from project.h @@ -682,7 +693,16 @@ struct http_response *error_response(struct client_state *csp, if (!err) err = map(exports, "hostport", 1, html_encode(csp->http->hostport), 0); if (!err) err = map(exports, "path", 1, html_encode(csp->http->path), 0); if (!err) err = map(exports, "error", 1, html_encode_and_free_original(safe_strerror(sys_err)), 0); - if (!err) err = map(exports, "host-ip", 1, html_encode(csp->http->host_ip_addr_str), 0); + if (!err) + { + err = map(exports, "host-ip", 1, html_encode(csp->http->host_ip_addr_str), 0); + if (err) + { + /* Some failures, like "404 no such domain", don't have an IP address. */ + err = map(exports, "host-ip", 1, html_encode(csp->http->host), 0); + } + } + if (err) { @@ -747,7 +767,7 @@ void cgi_init_error_messages(void) "500 Internal JunkBuster Proxy Error\r\n" "\r\n" "

500 Internal JunkBuster Proxy Error

\r\n" - "

JunkBuster ran out of memory whilst processing your request.

\r\n" + "

JunkBuster ran out of memory while processing your request.

\r\n" "

Please contact your proxy administrator, or try again later

\r\n" "\r\n" "\r\n"; @@ -815,7 +835,7 @@ jb_err cgi_error_no_template(struct client_state *csp, "500 Internal JunkBuster Proxy Error\r\n" "\r\n" "

500 Internal JunkBuster Proxy Error

\r\n" - "

JunkBuster encountered an error whilst processing your request:

\r\n" + "

JunkBuster encountered an error while processing your request:

\r\n" "

Could not load template file "; static const char body_suffix[] = "

\r\n"