Hi I am using Tomcat5.5, Apache2.2 and mod_jk1.2 and a third-part servlet which I can't re-program or configure.
I need to sniff the HTTP "User-Agent" and/or "Accept" fields and change the content-type (currently "text/html;charset=UTF-8") that the servlet returns based on these. using mod_headers and mod_setenvif, I currently have (in my apache2 config) something like: SetEnvIf User-Agent Whatever DETECTED1 SetEnvIf Accept Somethingelse DETECTED2 JkMount /servletname/* ajp13_worker <LocationMatch /servletname/* > Header set Content-Type "text/xml" env=DETECTED1 Header set Content-Type "application/xml" env=DETECTED2 </LocationMatch> Unfortunately, it doesn't work. Specifically, I always get the document served as "Content-Type: text/html;charset=UTF-8" and not "Content-Type: text/xml" as expected. From googling a bit I have learnt that the mod_headers module won't set the Content-Type header, because this one is set internally by apache at a later stage. But I couldn't find a workaround or alternative that does what I want. Help please! And many thanks... Richard --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]