From 4a83b852bcafdb52fabd0a2c47105912c1fcbad9 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Sat, 7 Dec 1996 00:52:38 +0000 Subject: [PATCH] Added anonymizer patch from Lutz Donnerhacke --- src/http.cc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/http.cc b/src/http.cc index 4266ff7698..22b710fba1 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,5 +1,5 @@ /* - * $Id: http.cc,v 1.132 1996/12/05 16:15:32 wessels Exp $ + * $Id: http.cc,v 1.133 1996/12/06 17:52:38 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -103,6 +103,11 @@ * re-implementations of code complying to this set of standards. */ +/* + * Anonymizing patch by lutz@as-node.jena.thur.de + * have a look into http.anon.c to get more informations. + */ + #include "squid.h" #define HTTP_DELETE_GAP (1<<18) @@ -604,12 +609,24 @@ httpSendComplete(int fd, char *buf, int size, int errflag, void *data) } } +#ifdef USE_ANONYMIZER +#include "http-anon.c" +#endif + static void httpAppendRequestHeader(char *hdr, const char *line, size_t * sz, size_t max) { size_t n = *sz + strlen(line) + 2; if (n >= max) return; +#ifdef USE_ANONYMIZER + if (!httpAnonSearchHeaderField(http_anon_allowed_header, line)) { + debug(11, 5, "httpAppendRequestHeader: removed for anonymity: <%s>\n", + line); + return; + } +#endif + /* allowed header, explicitly known to be not dangerous */ debug(11, 5, "httpAppendRequestHeader: %s\n", line); strcpy(hdr + (*sz), line); strcat(hdr + (*sz), crlf); -- 2.39.2