I am trying to implement a bit of logic to change the Content-Type of the
response, but part of the logic requires knowing the User-agent, which is in the
request.
Example:
sub vcl_deliver {
if (req.http.User-Agent ~ "MSIE 6"
&& resp.http.Content-Type ~ "application/xhtml+xml") {
set resp.http.Content-Type = "text/html";
}
deliver;
}
Result:
Variable 'req.http.User-Agent' not accessible in method 'vcl_deliver'
I haven't found any documentation stating what variables are available in which
functions, but so far I haven't been able to figure out any way of doing this
short of messing with the hash and having unnecessary duplicates in the cache.
Any suggestions?
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc