This is the start of the second longest line. Presumable reason, the limit on the length of the line, approximately no more than a million characters.
Thank you!
I can't reproduce this on ElectroBSD with Privoxy 3.0.29 built from git and pcre 8.44.
Using Privoxy-Filter-Test I get:
--- /home/fk/privoxy/privoxy-filter-test/original-419505773651511744-file-fetched.html Fri Sep 11 15:01:16 2020
+++ /home/fk/privoxy/privoxy-filter-test/filtered-419505773651511744-file-fetched.html Fri Sep 11 15:03:22 2020
@@ -1,2 +1,2 @@
/! For license information please see context_static_adb.js.LICENSE.txt /
-window.Ya.jFOeuwNbwdA.RumLogging=100*Math.random()[...].Rum.sendTimeMark("60.2335.1428")}}();
\ No newline at end of file
+//clr 1
\ No newline at end of file
As the response is rather large I had to increase the buffer-limit to 4096 which is already the default.
Which operating system and pcre version do you use?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With a recent Privoxy version you can also look for error messages like:
2021-12-21 15:17:36.474 800b75c00 Error: Skipped filter 'banners-by-size' after job number 1: (pcre:) Match limit reached (-8)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, I am fleshing out the question. For the page www.google.com/search?q=... I apply a filter (example):
s@(html>)@$1<!-- comment -->@sig
This filter does not work. I was prompted that there may be a limit on the string and another additional filter was proposed, like this:
s@(<\/[a-z]+?>)[\r\n]?@\n$1@g
I put it above the one described. And everything works. What could be the reason? Privoxy 3.0.33, I haven't seen any error messages like Error: Skipped filter ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The first filter, when alone, really works. But I actually have different filters. For example, these are:
s@(html>)@$1<!-- comment -->@sig #We leave this one, because it does not work in this case#Ineedthesefilterstoworks@(<div\s+class=['"][\w\d]{5,7}['"]><a\s+href=['"].*['"]).*,event\)['"]>@<!--clr new tab-->$1 target="_blank" rel="noopener noreferrer">@igUs@(<div\s+class=['"][\w\d]{5,7}['"]><a\s+href=['"].*['"])\s+data-jsarwt.*>@<!--clr new tab-->$1 target="_blank" rel="noopener noreferrer">@igUs@(<a\s+(class=)?)("([\w\d]{3,6}|[\w\d]{5,6}\s[\w\d]{5,6})"\s+)?(href=['"]/search\?.+(?=(pnnext)))>@<!--clr new tab 2-->$1$2$3$4$5 target="_blank" rel="noopener noreferrer">@igUs@(<a\s+class=['"]fl['"]\s+href=['"]https?[^>]*)@<!--clr new tab 3-->$1 target="_blank" rel="noopener noreferrer"@igs@(<a\s+class=['"]JWaTvb\sFx4vi['"]\s+href="https?[^>]*)@<!--clr new tab 4-->$1 target="_blank"@igU
I am sorry, the error you indicated does occur. 2021-12-27 23:01:31.524 7f5c335f0700 Error: Skipped filter 'google.com' after job number 2: (pcre:) Match limit reached (-8)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I compiled Privoxy with the "Add pcre2 support" patch. When filtering on www.google.com, the log shows the message: "Error: Skipped filter 'google.com' after job number 9: match limit exceeded (-47)".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I compiled Privoxy with the "Add pcre2
support"
patch. When filtering on www.google.com, the log shows the message: "Error:
Skipped filter 'google.com' after job number 9: match limit exceeded
(-47)".
There is no 'google.com' filter shipped with Privoxy - you'll have to
show your filter before we can help debug it.
It would also be nice to know what operating system you're using..
Lee
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK. I removed one filter, the error is almost the same: "Skipped filter 'google.com' after job number 8: match limit exceeded (-47)"
My filters so far :
If I use the latest snapshot, then the problem is not observed. In a recent post I use the "Add pcre2 support" patch from 2023.07.11. Looks like I'm wrong again...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Privoxy itself does not limit the line length for filters but relies on pcre which can be compiled with a match limit.
Unfortunately from reading your request I don't completely understand what you are trying to do and what isn't working.
Can you please clarify?
The link loads the file (javascript), then it is cleaned by the filter from my first message, since it works to serve ads.
Last edit: withoutname 2020-09-03
I can't reproduce this on ElectroBSD with Privoxy 3.0.29 built from git and pcre 8.44.
Using Privoxy-Filter-Test I get:
--- /home/fk/privoxy/privoxy-filter-test/original-419505773651511744-file-fetched.html Fri Sep 11 15:01:16 2020
+++ /home/fk/privoxy/privoxy-filter-test/filtered-419505773651511744-file-fetched.html Fri Sep 11 15:03:22 2020
@@ -1,2 +1,2 @@
/! For license information please see context_static_adb.js.LICENSE.txt /
-window.Ya.jFOeuwNbwdA.RumLogging=100*Math.random()[...].Rum.sendTimeMark("60.2335.1428")}}();
\ No newline at end of file
+//clr 1
\ No newline at end of file
As the response is rather large I had to increase the buffer-limit to 4096 which is already the default.
Which operating system and pcre version do you use?
Privoxy 3.0.28, Ubuntu Server 20.04 LTS, buffer-limit 16384.
Can you reproduce the problem with filter debugging enabled ("debug 64") and provide a log excerpt?
The filter that should have worked:
Actions:
The log excerpt only seems to show server-header filters.
Is it incomplete or is the filter not applied?
Can you see it in the final results when you check it with:
http://config.privoxy.org/show-url-info
?
How can I know if there is a limitation in pcre?
On 12/20/21, withoutname s18573f@users.sourceforge.net wrote:
https://www.pcre.org/original/doc/html/pcrelimits.html
https://www.pcre.org/original/doc/html/pcrestack.html
Lee
With a recent Privoxy version you can also look for error messages like:
2021-12-21 15:17:36.474 800b75c00 Error: Skipped filter 'banners-by-size' after job number 1: (pcre:) Match limit reached (-8)
Okay, I am fleshing out the question. For the page www.google.com/search?q=... I apply a filter (example):
This filter does not work. I was prompted that there may be a limit on the string and another additional filter was proposed, like this:
I put it above the one described. And everything works. What could be the reason? Privoxy 3.0.33, I haven't seen any error messages like Error: Skipped filter ...
The first pcrs command works for me as expected.
Please provide a log excerpt with the debug settings documented at:
https://www.privoxy.org/user-manual/contact.html
The first filter, when alone, really works. But I actually have different filters. For example, these are:
I am sorry, the error you indicated does occur.
2021-12-27 23:01:31.524 7f5c335f0700 Error: Skipped filter 'google.com' after job number 2: (pcre:) Match limit reached (-8)I compiled Privoxy with the "Add pcre2 support" patch. When filtering on www.google.com, the log shows the message: "Error: Skipped filter 'google.com' after job number 9: match limit exceeded (-47)".
On 7/25/23, withoutname s18573f@users.sourceforge.net wrote:
There is no 'google.com' filter shipped with Privoxy - you'll have to
show your filter before we can help debug it.
It would also be nice to know what operating system you're using..
Lee
OK. I removed one filter, the error is almost the same: "Skipped filter 'google.com' after job number 8: match limit exceeded (-47)"
My filters so far :
os archlinux.
Last edit: withoutname 2023-07-26
If I use the latest snapshot, then the problem is not observed. In a recent post I use the "Add pcre2 support" patch from 2023.07.11. Looks like I'm wrong again...
I'm not sure I understand you correctly.
Are you saying you saw the issue with pcre1 but not with pcre2?
The problem was when I used only this one patch for Privoxy 3.0.34. But according to the latest snapshots, there is no problem.
Great. Thanks for the confirmation.