[Privoxy-users] How can I define filters and actions to block all responses which is larger than 5MB?
Fabian Keil
fk at fabiankeil.de
Fri Mar 26 15:59:14 UTC 2021
Wen Yue <miles.wy.1 at gmail.com> wrote on 2021-03-26:
> As the title says, how can I define such filters and actions?
>
> Maybe the really hard part is how to describe 'larger than 5MB' using
> pure regular expression.
> I tried to tag out all responses larger than 5MB using a pair of filter
> and server-header-tagger action, but the regular expression in the
> filter definition is awkward.
Note that the tagging approach is not only awkward but also
fails if the response is chunk-encoded in which cases there
is no Content-Length header to use.
> Is there any better way?
Unfortunately there currently isn't.
You're not the first one interested in this so I've added:
| Add a directive to reject responses whose size is above a certain limit.
to the TODO list (not yet pushed to git master).
By the way, I got a request for approval from Mailman for
another message from you but did not see it in the queue
when I approved the message I'm replying to now.
Did you instruct Mailman to delete it?
If not, please send it again.
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-users/attachments/20210326/300b2a72/attachment.bin>
More information about the Privoxy-users
mailing list