[squid-users] Usage of --enable-gnuregex on FreeBSD?
Amos Jeffries
squid3 at treenet.co.nz
Sun Jun 13 02:01:03 UTC 2021
On 13/06/21 12:37 am, Olivier W wrote:
> Hello,
>
> I use Squid on FreeBSD.
> In the past, with Squid 3.5.x and FreeBSD 11.x, I was able to use PCRE
> regexp without any problems.
>
> Now, on FreeBSD 13.0 and Squid 4.14, PCRE regexp don't work out of the
> box: I have to compile Squid with the option "--enable-gnuregex" to
> make it work.
> I found this problem when I migrated from FreeBSD 11.x and Squid 3.5.x
> to FreeBSD 12.1 and Squid 4.9 but I don't know exactly when it
> appeared.
>
> In Squid's configure.ac, it says I shouldn't have to use
> "--enable-gnuregex", or only for some specific cases:
> https://github.com/squid-cache/squid/blob/master/configure.ac#L3525
>
> Without PCRE regexp, I can't use rules like:
> acl example url_regex -i ^http:\/\/www\.example\.com\/.*?\.js
> the problem is the lazy quantifier.
>
> Any idea why it is happening?
PCRE is not an officially supported library with Squid. It builds, but
only "works" when non-backtracking regex features are used.
The type of pattern you have requires backtracking.
> Is there something which could have changed on Squid or FreeBSD which
> could have created this problem?
Insufficient data.
> Should I ask the FreeBSD port maintainer of Squid to compile with this option?
>
No. That old GNU library is deprecated and will be replaced with
std::regex C++ feature in coming versions.
Amos
More information about the squid-users
mailing list