> Besides using the old version of ATS, which is not supported, your
> config acts slightly oddly. I think it might even be a bug (it
> doesn’t run the rules in the order you’d expect, i.e. it matches the
> second regex first).

OK, I successfully ported ATS 4.2.x branch based on GIT 0c8d513 which contains 
patch TS-2784 (FreeBSD 10 header_rewrite compilation problem) for FreeBSD 10 
using GCC 4.7 intead of native CLANG 3.3, adapting 4.1.2 patches :
header_rewrite rules are well applied and fully working !!!

I went back to ATS 4.1.2 to find that it does not work at all, no rewrite of 
header at all, look at the last message repeated twice (see "condition" in 
source) :

(header_rewrite) activated transaction hook via remap.config: new hook=5
(header_rewrite_dbg) Calling CTOR for Resources (RemapAPI)
(header_rewrite) rri: 0x7fffff7fa0b0
(header_rewrite) Building resource structure for hook (17)
(header_rewrite)       Adding TXN client request header buffers
(header_rewrite)       Adding TXN client request header buffers for remap 
instance
(header_rewrite) returing with status: 0
(header_rewrite_dbg) Calling CTOR for Resources (InkAPI)
(header_rewrite) Building resource structure for hook (5)
(header_rewrite)       Adding TXN client request header buffers
(header_rewrite)       Adding TXN client response header buffers
(header_rewrite) PATH requires remap initialization! Evaluating to false!
(header_rewrite) PATH requires remap initialization! Evaluating to false!

Now, I just hope that 4.2.2 will be released soon and ported to FreeBSD ports !

> > Leif,
> > thanks for the reminder but I don't really have this choice by now.
> > Still trying to use regex_map with header_rewrite plugin with
> > cond %{SEND_RESPONSE_HDR_HOOK}
> > cond %{PATH} "/(avi|mp3|jpg)$/"
> > rm-header Cache-Control
> > add-header Cache-Control max-age=3d
> > cond %{PATH} "/(doc|xls|ppt)$/"
> > rm-header Cache-Control
> > add-header Cache-Control max-age=1d
> 
> 
> The “expected” syntax for this rule is / was e.g.
> 
> 
>       cond %{SEND_RESPONSE_HDR_HOOK}
>       cond %{PATH} /(avi|mp3|jpg)$/
>       rm-header Cache-Control
>       add-header Cache-Control max-age=3d [L]
> 
>       cond %{SEND_RESPONSE_HDR_HOOK}
>       cond %{PATH} /(doc|xls|ppt)$/
>       rm-header Cache-Control
>       add-header Cache-Control max-age=1d [L]
> 
> 
> (note that you shouldn’t have to use “” around the regexes). I’ll
> file a bug on the other issue in a bit, your syntax technically
> works, but ordering seems wrong.

I still need double quote around regexes in 4.1.2. Thanks again for the tip, it 
works in 4.2.2 !

Regards,
Denis

Reply via email to