projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use the '/sponsor' redirect for the link to the sponsor page
[privoxy.git]
/
parsers.c
diff --git
a/parsers.c
b/parsers.c
index
06f1ae8
..
bef3ca9
100644
(file)
--- a/
parsers.c
+++ b/
parsers.c
@@
-1488,7
+1488,7
@@
static jb_err header_tagger(struct client_state *csp, char *header)
if (NULL == joblist)
{
if (NULL == joblist)
{
- log_error(LOG_LEVEL_
RE_FILTER
,
+ log_error(LOG_LEVEL_
TAGGING
,
"Tagger %s has empty joblist. Nothing to do.", b->name);
continue;
}
"Tagger %s has empty joblist. Nothing to do.", b->name);
continue;
}
@@
-1535,11
+1535,20
@@
static jb_err header_tagger(struct client_state *csp, char *header)
* no one would do it intentionally.
*/
freez(tag);
* no one would do it intentionally.
*/
freez(tag);
- log_error(LOG_LEVEL_
INFO
,
+ log_error(LOG_LEVEL_
TAGGING
,
"Tagger \'%s\' created an empty tag. Ignored.", b->name);
continue;
}
"Tagger \'%s\' created an empty tag. Ignored.", b->name);
continue;
}
+ if (list_contains_item(csp->action->multi[ACTION_MULTI_SUPPRESS_TAG], tag))
+ {
+ log_error(LOG_LEVEL_TAGGING,
+ "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))
if (!list_contains_item(csp->tags, tag))
{
if (JB_ERR_OK != enlist(csp->tags, tag))
@@
-1566,7
+1575,7
@@
static jb_err header_tagger(struct client_state *csp, char *header)
action_message = "No action bits update necessary.";
}
action_message = "No action bits update necessary.";
}
- log_error(LOG_LEVEL_
HEADER
,
+ log_error(LOG_LEVEL_
TAGGING
,
"Tagger \'%s\' added tag \'%s\'. %s",
b->name, tag, action_message);
}
"Tagger \'%s\' added tag \'%s\'. %s",
b->name, tag, action_message);
}
@@
-1574,7
+1583,7
@@
static jb_err header_tagger(struct client_state *csp, char *header)
else
{
/* XXX: Is this log-worthy? */
else
{
/* XXX: Is this log-worthy? */
- log_error(LOG_LEVEL_
HEADER
,
+ log_error(LOG_LEVEL_
TAGGING
,
"Tagger \'%s\' didn't add tag \'%s\'. Tag already present",
b->name, tag);
}
"Tagger \'%s\' didn't add tag \'%s\'. Tag already present",
b->name, tag);
}
@@
-4067,7
+4076,8
@@
static jb_err server_http(struct client_state *csp, char **header)
return JB_ERR_PARSE;
}
return JB_ERR_PARSE;
}
- if (csp->http->status == 206)
+ if (csp->http->status == 101 ||
+ csp->http->status == 206)
{
csp->content_type = CT_TABOO;
}
{
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;
}
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);
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;
}
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);
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://");
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. */
if ((NULL == referer_url) || (NULL == strstr(referer_url, host)))
{
/* Host has changed, Referer is invalid or a https URL. */