<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
-----BEGIN PGP SIGNED MESSAGE----- <br>
Hash: SHA256 <br>
<br>
# TAG: url_rewrite_program<br>
# Specify the location of the executable URL rewriter to use.<br>
# Since they can perform almost any function there isn't one
included.<br>
#<br>
# For each requested URL, the rewriter will receive on line with
the format<br>
#<br>
# [channel-ID <SP>] URL [<SP> extras]<NL><br>
#<br>
# See url_rewrite_extras on how to send "extras" with optional
values to<br>
# the helper.<br>
# After processing the request the helper must reply using the
following format:<br>
#<br>
# [channel-ID <SP>] result [<SP> kv-pairs]<br>
#<br>
# The result code can be:<br>
#<br>
# OK status=30N url="..."<br>
# Redirect the URL to the one supplied in 'url='.<br>
# 'status=' is optional and contains the status code to send<br>
# the client in Squids HTTP response. It must be one of the<br>
# HTTP redirect status codes: 301, 302, 303, 307, 308.<br>
# When no status is given Squid will use 302.<br>
#<br>
# OK rewrite-url="..."<br>
# Rewrite the URL to the one supplied in 'rewrite-url='.<br>
# The new URL is fetched directly by Squid and returned to<br>
# the client as the response to its request.<br>
#<br>
# OK<br>
# When neither of url= and rewrite-url= are sent Squid does<br>
# not change the URL.<br>
#<br>
# ERR<br>
# Do not change the URL.<br>
#<br>
# BH<br>
# An internal error occurred in the helper, preventing<br>
# a result being identified. The 'message=' key name is<br>
# reserved for delivering a log message.<br>
#<br>
#<br>
# In addition to the above kv-pairs Squid also understands the
following<br>
# optional kv-pairs received from URL rewriters:<br>
# clt_conn_tag=TAG<br>
# Associates a TAG with the client TCP connection.<br>
# The TAG is treated as a regular annotation but persists
across<br>
# future requests on the client connection rather than just
the<br>
# current request. A helper may update the TAG during
subsequent<br>
# requests be returning a new kv-pair.<br>
#<br>
# When using the concurrency= option the protocol is changed by<br>
# introducing a query channel tag in front of the
request/response.<br>
# The query channel tag is a number between 0 and concurrency-1.<br>
# This value must be echoed back unchanged to Squid as the first
part<br>
# of the response relating to its request.<br>
#<br>
# WARNING: URL re-writing ability should be avoided whenever
possible.<br>
# Use the URL redirect form of response instead.<br>
#<br>
# Re-write creates a difference in the state held by the client<br>
# and server. Possibly causing confusion when the server response<br>
# contains snippets of its view state. Embeded URLs, response<br>
# and content Location headers, etc. are not re-written by this<br>
# interface.<br>
#<br>
# By default, a URL rewriter is not used.<br>
#Default:<br>
# none<br>
<br>
<br>
26.02.16 21:20, Karl-Philipp Richter пишет:<br>
<span style="white-space: pre;">> Hi,<br>
> I noticed that `jesred` when used as `url_rewrite_program`
program of<br>
> `squid` 4.0.4 with `jesred.rules`<br>
><br>
> regex
^<a class="moz-txt-link-freetext" href="http://(de.archive.ubuntu.com/ubuntu/(dists">http://(de.archive.ubuntu.com/ubuntu/(dists</a>|pool)/.*)$<br>
> <a class="moz-txt-link-freetext" href="http://192.168.178.20:3142/\1">http://192.168.178.20:3142/\1</a><br>
> regex
^<a class="moz-txt-link-freetext" href="http://(security.ubuntu.com/ubuntu/(dists">http://(security.ubuntu.com/ubuntu/(dists</a>|pool)/.*)$<br>
> <a class="moz-txt-link-freetext" href="http://192.168.178.20:3142/\1">http://192.168.178.20:3142/\1</a><br>
> regex ^<a class="moz-txt-link-freetext" href="http://(extras.ubuntu.com/ubuntu/(dists">http://(extras.ubuntu.com/ubuntu/(dists</a>|pool)/.*)$<br>
> <a class="moz-txt-link-freetext" href="http://192.168.178.20:3142/\1">http://192.168.178.20:3142/\1</a><br>
> regex
^<a class="moz-txt-link-freetext" href="http://(archive.canonical.com/ubuntu/(dists">http://(archive.canonical.com/ubuntu/(dists</a>|pool)/.*)$<br>
> <a class="moz-txt-link-freetext" href="http://192.168.178.20:3142/\1">http://192.168.178.20:3142/\1</a><br>
><br>
> regex ^<a class="moz-txt-link-freetext" href="http://(packages.medibuntu.org/(dists">http://(packages.medibuntu.org/(dists</a>|pool)/.*)$<br>
> <a class="moz-txt-link-freetext" href="http://192.168.178.20:3142/\1">http://192.168.178.20:3142/\1</a><br>
> regex<br>
>
^<a class="moz-txt-link-freetext" href="http://(ppa.launchpad.net/chromium-daily/stable/ubuntu/(dists">http://(ppa.launchpad.net/chromium-daily/stable/ubuntu/(dists</a>|pool)/.*)$
<a class="moz-txt-link-freetext" href="http://192.168.178.20:3142/\1">http://192.168.178.20:3142/\1</a><br>
> regex
^<a class="moz-txt-link-freetext" href="http://(http://deb.opera.com/opera/(dists">http://(http://deb.opera.com/opera/(dists</a>|pool)/.*)$<br>
> <a class="moz-txt-link-freetext" href="http://192.168.178.20:3142/\1">http://192.168.178.20:3142/\1</a><br>
><br>
> and an instance of `apt-cacher-ng` running on
`192.168.178.20:3142`<br>
> (according to `netstat`) causes a lot of entries like<br>
><br>
> 1456494043|E|481|192.168.178.20|403 Forbidden file type
or location:<br>
>
/security.ubuntu.com/ubuntu/dists/wily-proposed/main/binary-i386/Packages.gz192.168.179.2/192.168.179.2-GET<br>
><br>
> I'd like to get some feedback whether this might be due to a
change in<br>
> 4.x communication with `url_rewrite_program` and which is the<br>
> recommended program to use for `url_rewrite_program`.<br>
><br>
> -Kalle<br>
><br>
><br>
><br>
> _______________________________________________<br>
> squid-users mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a><br>
> <a class="moz-txt-link-freetext" href="http://lists.squid-cache.org/listinfo/squid-users">http://lists.squid-cache.org/listinfo/squid-users</a></span><br>
<br>
-----BEGIN PGP SIGNATURE-----
<br>
Version: GnuPG v2
<br>
<br>
iQEcBAEBCAAGBQJW0G9xAAoJENNXIZxhPexGQ18H/j/UiZskgyo7/BGbgaME5Wt2
<br>
vlk1zxqeETUEeeQOJBysGL5Ocjrr58v+uE98pYWjc9RMFIScRwS7ApGrl83ane83
<br>
oSy1V2nG6KdVcn73oK2jUO69Vi0KiunhWTBnWBDfRHH/HmYCPMIaWdqImPkQB8Mx
<br>
vKKmWDMAEl/ZmUaSQ+Wdu9Z+9tgrD/yKCOzeZ9RyPCeOujpWC07ODxo826IXx+6z
<br>
/DIYXYsbQU0lK8GolcxQUmJMh0vkmTsb9Ym/04dhrNDyQ/egfgmNwBxPM7RnDW+r
<br>
AHPMtWloR/LXie3bc38BNFGYXWBiBc0a55Uz0ndV6zTZ6jBvE3kFpUdWJGt5yO8=
<br>
=9T6M
<br>
-----END PGP SIGNATURE-----
<br>
<br>
</body>
</html>