Re: [PATCH] Allow tagging requests with server address and/or port

Fabian Keil <[email protected]> Mon, 25 Apr 2016 18:16:56 +0200
Newsgroups gmane.comp.web.privoxy.devel
Message-ID <[email protected]>
--===============6387839019688298761==
Content-Type: multipart/signed; micalg=pgp-sha256;
	boundary="Sig_/_C96BiYf6GgHbcXJXGtwhFA";
	protocol="application/pgp-signature"

--Sig_/_C96BiYf6GgHbcXJXGtwhFA
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

[email protected] wrote:

> Please find attached (in-line and as attachment) a patch which allows to
> tag a client's request with the port and/or the ip-address of the privoxy
> server which handles the request.
>=20
> Example use case:
>=20
> privoxy listens on two addresses, e.g. localhost:8118 and localhost:9119.
> By tagging the request with
>=20
> This is for example useful to distinguish request made through different
> hosts/ports.

Thanks a lot for the patch.

I agree that something like this would be useful but think it
could be simplified by using a single listen-address variable
that allows to tag the request with address and port together.

Instead of creating a text representation of the listen-address
for each connection, it seems preferable to do it once after
binding to the socket and simply look it up later on.

Variables should be declared at the beginning of the block
in which they are used.

> While we are at it. I propose adding CLIENT-HEADER-TAGGER for all
> 'special' substitutions ($origin, $url, $host, $path), not only for
> $origin.

For variables that can contain special characters this is currently
blocked by TODO list item #118:

118) There should be "escaped" dynamic variables that are guaranteed
     not to break filters.

Fabian

--Sig_/_C96BiYf6GgHbcXJXGtwhFA
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXHkL5AAoJEGkYIpGLojccpJcP/2poeNvLJCGiUTfrBTAWR0eD
KgbuuzVEn0OKjmTOZ9DZRHtfMCNbLMhxAcqV5XavhrjZe8xWpoYFjOfcXNm48fNC
6edZ+z8RE6PKjjyzYojWLQz4VR/6elw6Le0Kj6g2YiMS0/QjP9X8szr5ODj7nAZx
SMIB94nM4LEt5F58hfCJMO0TJ6CTAwIP2migkUxAv7RdyrY8lav1uuEkVfcj6r2H
bUT9wV2G/tVcXBTP96fcTQRBQLEAkktVimLKCewn4eujePk+Aqn+uyYOssHPxp5A
4PbneQEwPMwUz6/IBbh3ZGSKXdy0GpaLM33n1uACKZS1lPmB6bN8H2lYLOOk0NKW
JQ9Zs1agJaxa4XL/7QQ//XpxjH50VeW8KbvLeQgG8xGPdc+0zUQ5TcHCtNSV7o4I
I4AoUndY8O9wnDD/SH5IMyiAfKM0A3e6zwbF7W9+A8r1hkgiADew5g3he2pyM35U
ZYsx3G5u7Bejl2VUymhjaB0+AXqD+dsTTI80aOPjf13i+ZzPManye71tf2aAVlHP
Cvmf7QbfQmz0ZSGjN5EMTtMpV9X+HwE84eBi+oTr7NlDp4S1LjiurdupJNYLVcfk
pe0r0/h6qAMGdO+aN9++XO0XYhekdusPs9EeFKBBC3Eb2r+cdbkw8fOfWlksPbSk
9Gg+VoChTAtrpVZtZsvg
=pUta
-----END PGP SIGNATURE-----

--Sig_/_C96BiYf6GgHbcXJXGtwhFA--


--===============6387839019688298761==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
--===============6387839019688298761==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Ijbswa-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ijbswa-developers

--===============6387839019688298761==--