X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=parsers.c;h=185db7d6eb57a7f8165ba01d0c42bb2803efa323;hp=06f1ae8bfc3db61f5051400c91c2c2c05b38282b;hb=21e4440d6887f9866dbd3f725a009a18bff07ba0;hpb=afa231b8e31bbf0489303df30d103db2d737cd18 diff --git a/parsers.c b/parsers.c index 06f1ae8b..185db7d6 100644 --- a/parsers.c +++ b/parsers.c @@ -1540,6 +1540,15 @@ static jb_err header_tagger(struct client_state *csp, char *header) continue; } + if (list_contains_item(csp->action->multi[ACTION_MULTI_SUPPRESS_TAG], tag)) + { + log_error(LOG_LEVEL_HEADER, + "Tagger \'%s\' didn't add tag \'%s\': suppressed", + b->name, tag); + freez(tag); + continue; + } + if (!list_contains_item(csp->tags, tag)) { if (JB_ERR_OK != enlist(csp->tags, tag)) @@ -4067,7 +4076,8 @@ static jb_err server_http(struct client_state *csp, char **header) return JB_ERR_PARSE; } - if (csp->http->status == 206) + if (csp->http->status == 101 || + csp->http->status == 206) { csp->content_type = CT_TABOO; } @@ -4586,7 +4596,11 @@ jb_err get_destination_from_headers(const struct list *headers, struct http_requ return JB_ERR_PARSE; } - p = strdup_or_die(host); + p = string_tolower(host); + if (p == NULL) + { + return JB_ERR_MEMORY; + } chomp(p); q = strdup_or_die(p); @@ -4673,7 +4687,11 @@ jb_err get_destination_from_https_headers(const struct list *headers, struct htt return JB_ERR_PARSE; } - p = strdup_or_die(host); + p = string_tolower(host); + if (p == NULL) + { + return JB_ERR_MEMORY; + } chomp(p); q = strdup_or_die(p); @@ -4834,6 +4852,10 @@ static jb_err handle_conditional_hide_referrer_parameter(char **header, referer[hostlength+17] = '\0'; } referer_url = strstr(referer, "http://"); + if (NULL == referer_url) + { + referer_url = strstr(referer, "https://"); + } if ((NULL == referer_url) || (NULL == strstr(referer_url, host))) { /* Host has changed, Referer is invalid or a https URL. */