summaryrefslogtreecommitdiffhomepage
path: root/src/tinyproxy.h
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2003-08-01 00:14:34 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2003-08-01 00:14:34 +0000
commita117ed9cb0c468c7b0ad94fd5a2c9fc2c8717ab7 (patch)
treebcea5250b925a0b02133f0deefe15335eff8a547 /src/tinyproxy.h
parent15870a95828f0fdb6b19a816db2aac7b3225794a (diff)
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.
Diffstat (limited to 'src/tinyproxy.h')
-rw-r--r--src/tinyproxy.h19
1 files changed, 9 insertions, 10 deletions
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.