X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=filters.c;h=6140bb09009a26efa87f8640e4785b7a5861e248;hp=4fc07a2570cccab090dbed61db36d3a4a36f9e68;hb=82d49cad27a8ebfc04e7cc8211cbd81c533fe7ba;hpb=a90476caaea41cabf25cf48c85c324b482989dff diff --git a/filters.c b/filters.c index 4fc07a25..6140bb09 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.48 2002/03/13 20:25:34 oes Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.51 2002/03/24 15:23:33 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -12,7 +12,7 @@ const char filters_rcs[] = "$Id: filters.c,v 1.48 2002/03/13 20:25:34 oes Exp $" * 'ijb_send_banner', and `trust_url' * * Copyright : Written by and Copyright (C) 2001 the SourceForge - * IJBSWA team. http://ijbswa.sourceforge.net + * Privoxy team. http://ijbswa.sourceforge.net * * Based on the Internet Junkbuster originally written * by and Copyright (C) 1997 Anonymous Coders and @@ -38,6 +38,15 @@ const char filters_rcs[] = "$Id: filters.c,v 1.48 2002/03/13 20:25:34 oes Exp $" * * Revisions : * $Log: filters.c,v $ + * Revision 1.51 2002/03/24 15:23:33 jongfoster + * Name changes + * + * Revision 1.50 2002/03/24 13:25:43 swa + * name change related issues + * + * Revision 1.49 2002/03/16 20:29:14 oes + * Cosmetics + * * Revision 1.48 2002/03/13 20:25:34 oes * Better logging for content filters * @@ -684,15 +693,15 @@ struct http_response *block_url(struct client_state *csp) #if 1 /* Two alternative strategies, use this one for now: */ /* and handle accordingly: */ - if ((p == NULL) || (0 == strcmpic(p, "logo"))) + if ((p == NULL) || (0 == strcmpic(p, "pattern"))) { - rsp->body = bindup(image_logo_data, image_logo_length); + rsp->body = bindup(image_pattern_data, image_pattern_length); if (rsp->body == NULL) { free_http_response(rsp); return cgi_error_memory(); } - rsp->content_length = image_logo_length; + rsp->content_length = image_pattern_length; if (enlist_unique_header(rsp->headers, "Content-Type", BUILTIN_IMAGE_MIMETYPE)) { @@ -718,26 +727,9 @@ struct http_response *block_url(struct client_state *csp) } } - else if (0 == strcmpic(p, "pattern")) - { - rsp->body = bindup(image_pattern_data, image_pattern_length); - if (rsp->body == NULL) - { - free_http_response(rsp); - return cgi_error_memory(); - } - rsp->content_length = image_pattern_length; - - if (enlist_unique_header(rsp->headers, "Content-Type", BUILTIN_IMAGE_MIMETYPE)) - { - free_http_response(rsp); - return cgi_error_memory(); - } - } - else { - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { free_http_response(rsp); @@ -754,19 +746,15 @@ struct http_response *block_url(struct client_state *csp) #else /* Following code is disabled for now */ /* and handle accordingly: */ - if ((p == NULL) || (0 == strcmpic(p, "logo"))) + if ((p == NULL) || (0 == strcmpic(p, "pattern"))) { - p = CGI_PREFIX "send-banner?type=logo"; + p = CGI_PREFIX "send-banner?type=pattern"; } else if (0 == strcmpic(p, "blank")) { p = CGI_PREFIX "send-banner?type=blank"; } - else if (0 == strcmpic(p, "pattern")) - { - p = CGI_PREFIX "send-banner?type=pattern"; - } - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { free_http_response(rsp); @@ -1039,7 +1027,7 @@ struct http_response *redirect_url(struct client_state *csp) } if ( enlist_unique_header(rsp->headers, "Location", q) - || (NULL == (rsp->status = strdup("302 Local Redirect from Junkbuster"))) ) + || (NULL == (rsp->status = strdup("302 Local Redirect from Privoxy"))) ) { free_http_response(rsp); return cgi_error_memory();