From: Fabian Keil Date: Sat, 18 Dec 2010 12:56:33 +0000 (+0000) Subject: Treat all Content-Type header values containing the pattern 'script' as a sign of... X-Git-Tag: v_3_0_18~372 X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/static/faq/static/gitweb.js?a=commitdiff_plain;h=7f3c57cb99de7b74c196dad02c6141193c98ed40;p=privoxy.git Treat all Content-Type header values containing the pattern 'script' as a sign of text. Reported by pribog in #3134970. --- diff --git a/parsers.c b/parsers.c index e2a70eaa..7e621040 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.213 2010/06/13 12:26:04 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.214 2010/06/13 12:26:32 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -1956,7 +1956,7 @@ static jb_err crunch_server_header(struct client_state *csp, char **header) * Function : server_content_type * * Description : Set the content-type for filterable types (text/.*, - * .*xml.*, javascript and image/gif) unless filtering has been + * .*xml.*, .*script.* and image/gif) unless filtering has been * forbidden (CT_TABOO) while parsing earlier headers. * NOTE: Since text/plain is commonly used by web servers * for files whose correct type is unknown, we don't @@ -2006,7 +2006,7 @@ static jb_err server_content_type(struct client_state *csp, char **header) */ if ((strstr(*header, "text/") && !strstr(*header, "plain")) || strstr(*header, "xml") - || strstr(*header, "application/x-javascript")) + || strstr(*header, "script")) { csp->content_type |= CT_TEXT; }