On 4/25/12 7:57 AM, Jorge Román Novalbos wrote:
Finally I have decided to compile the entire trafficserver code and i have
the plugin compiled.
But I don't understand very well how it works…
I need to change the Cache-Control "no-cache" by Cache-Control "max-age=xxx".
Anybody knows how to do it?? I have looking the way but there is very
little documentation about this issue.
Hmmm, heh, yeah, that's a problem, the "=" operator in the plugin would fail
with the max-age=xxx. Maybe something like this would work:
[READ_RESPONSE_HDR]
Cache-Control
Cache-Control +max-age=123+
Slightly sub-optimal, but effectively the same as Cache-Control
=max-age=123= (which won't work). You would use this in a remap.config, like
map http://example.com http://real.example.com @plugin=header_filter.so
@pparam=/some/path/to/your.conf
Also, you have to activate header_filter.so in plugin.config, otherwise, it
won't work for non-remap "hooks". This ought to be documented in the README?
-- Leif