X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=parsers.c;h=d2ef046a0205c1cfb912a5b566ad8bea3dc725f8;hb=c79d5a23e325b6408801445794b8ca5885105e65;hp=2b3a34f8c11c267887b900fee95549fd216d8095;hpb=4bd83c31c0f7b8c464b5dbdb9bb69640bba295ae;p=privoxy.git diff --git a/parsers.c b/parsers.c index 2b3a34f8..d2ef046a 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)) @@ -3570,8 +3579,8 @@ static jb_err client_if_modified_since(struct client_state *csp, char **header) } else { - log_error(LOG_LEVEL_ERROR, "Random range is 0. Assuming time transformation test.", - *header); + log_error(LOG_LEVEL_ERROR, + "Random range is 0. Assuming time transformation test."); } tm += rtime * (negative_range ? -1 : 1); timeptr = privoxy_gmtime_r(&tm, &gmt); @@ -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; } @@ -4497,7 +4507,7 @@ static jb_err parse_header_time(const char *header_time, time_t *result) if (*result != result2) { log_error(LOG_LEVEL_ERROR, "strftime() and strptime() disagree. " - "Format: '%s'. In: '%s', out: '%s'. %d != %d. Rejecting.", + "Format: '%s'. In: '%s', out: '%s'. %ld != %ld. Rejecting.", time_formats[i], header_time, recreated_date, *result, result2); continue; } @@ -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);