Re: How can I define filters and actions to block all responses which is larger than 5MB?
Fabian Keil <[email protected]> Fri, 26 Mar 2021 16:59:14 +0100
| Newsgroups | gmane.comp.web.privoxy.user |
|---|---|
| Message-ID | <[email protected]> |
Wen Yue <[email protected]> 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 _______________________________________________ Privoxy-users mailing list [email protected] https://lists.privoxy.org/mailman/listinfo/privoxy-users
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEETzbBfzgWkTZUoehQaRgikYuiNxwFAmBeBNIACgkQaRgikYui Nxx1JA//UMFcrMuJ7GBIdUrIMWGen+cfrqrf8zWEfhg1MG276dw3ciDvVqUuUKiJ TIGtF6K87+g2T2Xi+HSKYQK8oglsj136v/a99ojhRbazcpAnXJvOXiN1pwj9vJUO mzd4yMAthBcjDdQcEVycFCarIf7gWgLKyE6sPuinyuH5caCYS6HqTz3DzAU3Jb14 I7puKQvacw+xRbfGYtZwwtcMmV/DsI9R+ddWH3HeEvZJAWqumdnV0ZIn9CuSIm4C 2qZffClZCoVDFrgzo8CtSGG6629cX0fgPWti0b5x4apH63qy7bfOiRSrRnrzyBDX i8sjOXDQSFxmOVJ5XA2y/Amp4cRDClrkrvBI+k7ZshPm2uExTniXCGfvi3y7gFeh c1fuN8GkahrTUMINkPZ/O7ul02fvrxMWAjeERVPWi++U9I9BdfZT5sOwm3NXdeWo 9dYKfjpk/KpX2Is7ZofQAz5Jk4ZqneCbR1ya99lUVa4xjDnJ/pr7E55TGR/5KtjW GUXA9BS9gFdoVFqs81n1j/JA45PlbVP2Rk++a0tHQrvxzHG5MhpkomTtm9/q3Td+ DIB3CiPfXHLvUkU+6MFY1ncEfu94KoyphtBnC9dQWGpwl9B5sAeBTX0IkzVYdfFw mEjcpF5MWpGGXrrQukedeXd1fViQBMZ2V4cUXIkfD7mBtFLIXoE= =D+Df -----END PGP SIGNATURE-----