projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tools/url-pattern-translator.pl: Detect a couple of pattern prefixes case-insensitively
[privoxy.git]
/
filters.c
diff --git
a/filters.c
b/filters.c
index
d29d422
..
b490353
100644
(file)
--- a/
filters.c
+++ b/
filters.c
@@
-4,7
+4,7
@@
*
* Purpose : Declares functions to parse/crunch headers and pages.
*
*
* Purpose : Declares functions to parse/crunch headers and pages.
*
- * Copyright : Written by and Copyright (C) 2001-20
16
the
+ * Copyright : Written by and Copyright (C) 2001-20
20
the
* Privoxy team. https://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
* Privoxy team. https://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
@@
-206,7
+206,7
@@
static int match_sockaddr(const struct sockaddr_storage *network,
return 0;
}
return 0;
}
- /* TODO: Optimize by checking by words insted of octets */
+ /* TODO: Optimize by checking by words inste
a
d of octets */
for (i = 0; (i < addr_len) && netmask_addr[i]; i++)
{
if ((network_addr[i] & netmask_addr[i]) !=
for (i = 0; (i < addr_len) && netmask_addr[i]; i++)
{
if ((network_addr[i] & netmask_addr[i]) !=
@@
-505,7
+505,7
@@
int acl_addr(const char *aspec, struct access_control_addr *aca)
*
* Description : Check to see if CONNECT requests to the destination
* port of this request are forbidden. The check is
*
* Description : Check to see if CONNECT requests to the destination
* port of this request are forbidden. The check is
- * independen
d
of the actual request method.
+ * independen
t
of the actual request method.
*
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
*
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
@@
-2166,7
+2166,11
@@
static jb_err prepare_for_filtering(struct client_state *csp)
* If the body has a supported transfer-encoding,
* decompress it, adjusting size and iob->eod.
*/
* If the body has a supported transfer-encoding,
* decompress it, adjusting size and iob->eod.
*/
- if (csp->content_type & (CT_GZIP|CT_DEFLATE))
+ if ((csp->content_type & (CT_GZIP|CT_DEFLATE))
+#ifdef FEATURE_BROTLI
+ || (csp->content_type & CT_BROTLI)
+#endif
+ )
{
if (0 == csp->iob->eod - csp->iob->cur)
{
{
if (0 == csp->iob->eod - csp->iob->cur)
{
@@
-2184,11
+2188,14
@@
static jb_err prepare_for_filtering(struct client_state *csp)
else
{
/*
else
{
/*
- * Unset
CT_GZIP and CT_DEFLATE to remember not
- *
to
modify the Content-Encoding header later.
+ * Unset
content types to remember not to
+ * modify the Content-Encoding header later.
*/
csp->content_type &= ~CT_GZIP;
csp->content_type &= ~CT_DEFLATE;
*/
csp->content_type &= ~CT_GZIP;
csp->content_type &= ~CT_DEFLATE;
+#ifdef FEATURE_BROTLI
+ csp->content_type &= ~CT_BROTLI;
+#endif
}
}
#endif
}
}
#endif
@@
-2300,7
+2307,7
@@
void get_url_actions(struct client_state *csp, struct http_request *http)
struct url_actions *b;
int i;
struct url_actions *b;
int i;
-#ifdef FEATURE_HTTPS_
FILTERING
+#ifdef FEATURE_HTTPS_
INSPECTION
if (!csp->http->client_ssl)
#endif
{
if (!csp->http->client_ssl)
#endif
{