On 20/10/2025 17:12, Dmitry Melekhov wrote:
Hello!
It is declared as feature now, from 7.2 change log:
|- Bug 5504: Document that Squid discards invalid rewrite-url|
18.10.2025 03:32, Matthias Fischer пишет:
Hi,
I have a similar problem here after upgrading from squid 6.14 to 7.2 for
testing purposes.
'squid -k parse' shows no errors, the same config seems to start without
any errors. But redirecting produces errors. Looking in 'cache_log' I found:
***SNIP***
...
2025/10/18 01:07:34 kid1| ERROR: URL-rewrite produces invalid request:
CONNECT
http://[ROUTER_IP_DELETED]:81/redirect.cgi?category=custom_advertising&url=content-loader.com:443&ip=[HOST_IP_DELETED]
HTTP/1.1
current master transaction: master53
2025/10/18 01:07:34 kid1| ERROR: URL-rewrite produces invalid request:
CONNECT http://[ROUTER_IP_DELETED]:81/images/urlfilter/1x1.gif HTTP/1.1
current master transaction: master53
...
Aha. The helper is being asked to re-write the URI of a CONNECT request.
One needs to understand that CONNECT requests use authority-form URIs,
not URLs. So telling Squid to re-write the URI as a URL will not work.
So I have the same question. Does 'anyone' has an idea what is happening
here and how to solve it?
There are two ways to fix this:
1) change the helper so that it handles CONNECT requests properly.
a) produces a valid URI ("OK hostname:port") for the CONNECT to use.
b) responds with "ERR" to skip the re-write on CONNECTs
2) do not send CONNECT requests through the helper.
url_rewrite_access deny CONNECT
HTH
Amos
_______________________________________________
squid-users mailing list
[email protected]
https://lists.squid-cache.org/listinfo/squid-users