From a117ed9cb0c468c7b0ad94fd5a2c9fc2c8717ab7 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Fri, 1 Aug 2003 00:14:34 +0000 Subject: Included patches from Steven Young to use the hashmap functionality to manage the HTML error pages. It simplifies the source, and also make the object file smaller. Nice. Also added any casting from (void*) to ensure that the code compiles using a C++ compiler. --- src/tinyproxy.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/tinyproxy.h') diff --git a/src/tinyproxy.h b/src/tinyproxy.h index d014748..0c4e461 100644 --- a/src/tinyproxy.h +++ b/src/tinyproxy.h @@ -1,4 +1,4 @@ -/* $Id: tinyproxy.h,v 1.41 2003-06-20 17:02:12 rjkaes Exp $ +/* $Id: tinyproxy.h,v 1.42 2003-08-01 00:14:34 rjkaes Exp $ * * See 'tinyproxy.c' for a detailed description. * @@ -20,6 +20,7 @@ #define TINYPROXY_TINYPROXY_H #include "common.h" +#include "hashmap.h" /* Global variables for the main controls of the program */ #define MAXBUFFSIZE ((size_t)(1024 * 96)) /* Max size of buffer */ @@ -35,6 +36,9 @@ struct upstream { }; #endif +/* + * Hold all the configuration time information. + */ struct config_s { char *logf_name; char *config_file; @@ -66,16 +70,11 @@ struct config_s { */ char* via_proxy_name; - /* - * Error page support. This is an array of pointers to structures - * which describe the error page path, and what HTTP error it handles. - * an example would be { "/usr/local/etc/tinyproxy/404.html", 404 } - * Ending of array is noted with NULL, 0. + /* + * Error page support. Map error numbers to file paths. */ - struct error_pages_s { - char *errorpage_path; - unsigned int errorpage_errnum; - } **errorpages; + hashmap_t errorpages; + /* * Error page to be displayed if appropriate page cannot be located * in the errorpages structure. -- cgit v1.2.3