X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=filters.c;h=49a9e89318d36e82bf4fa9f44a1968f73457db2d;hp=0450f5a7cc8c735699e22438b0ada91c3665c8a2;hb=c37e4fad3121a5dc86892eb35f19e92c83e05764;hpb=f67b3326138f428863c21c7738e0c8db87fa6f5c diff --git a/filters.c b/filters.c index 0450f5a7..49a9e893 100644 --- a/filters.c +++ b/filters.c @@ -1,4 +1,4 @@ -const char filters_rcs[] = "$Id: filters.c,v 1.202 2016/05/25 10:50:55 fabiankeil Exp $"; +const char filters_rcs[] = "$Id: filters.c,v 1.203 2016/12/24 16:00:49 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/filters.c,v $ @@ -1327,42 +1327,18 @@ struct http_response *redirect_url(struct client_state *csp) * * Function : is_imageurl * - * Description : Given a URL, decide whether it is an image or not, - * using either the info from a previous +image action - * or, #ifdef FEATURE_IMAGE_DETECT_MSIE, and the browser - * is MSIE and not on a Mac, tell from the browser's accept - * header. + * Description : Given a URL, decide whether it should be treated + * as image URL or not. * * Parameters : * 1 : csp = Current client state (buffers, headers, etc...) * - * Returns : True (nonzero) if URL is an image, false (0) + * Returns : True (nonzero) if URL is an image URL, false (0) * otherwise * *********************************************************************/ int is_imageurl(const struct client_state *csp) { -#ifdef FEATURE_IMAGE_DETECT_MSIE - char *tmp; - - tmp = get_header_value(csp->headers, "User-Agent:"); - if (tmp && strstr(tmp, "MSIE") && !strstr(tmp, "Mac_")) - { - tmp = get_header_value(csp->headers, "Accept:"); - if (tmp && strstr(tmp, "image/gif")) - { - /* Client will accept HTML. If this seems counterintuitive, - * blame Microsoft. - */ - return(0); - } - else - { - return(1); - } - } -#endif /* def FEATURE_IMAGE_DETECT_MSIE */ - return ((csp->action->flags & ACTION_IMAGE) != 0); }