[Privoxy-users] "add-header" doesn't replace exist value

Fabian Keil fk at fabiankeil.de
Mon Jul 11 17:06:06 UTC 2016


Unknown <arkmail0 at riseup.net> wrote:

> http://www.privoxy.org/user-manual/actions-file.html#ACTIONS 8.5.1. add-header
> 
> I added "+add-header{DNT: 1}" to my action file.
> Firefox(with buildin DNT =1): result -> HTTP_DNT ?	"1, 1"
> Other Browser(doens't have DNT support): result: HTTP_DNT ?	"1"
> 
> I'm expecting HTTP_DNT ?	"1", not "1, 1".
> So how can I let Privoxy to set DNT to 1, not adding 1 to exist value?

You can use the crunch-client-header action to remove all existing
DNT headers before setting a new one:
https://www.privoxy.org/user-manual/actions-file.html#CRUNCH-CLIENT-HEADER

You can also create a client-header-tagger to tag requests that already
have a DNT header and then use the tag to disable the add-header
action (or enable the add-header action only for those requests that
have not been tagged).

Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-users/attachments/20160711/11b28e9f/attachment.bin>


More information about the Privoxy-users mailing list