Re: using mod_jk: how to set content-type

2007-06-22 Thread Richard Kaye
Yes, I understood Johnny's point about other uses for a filter even though it was somewhat off-topic. He is quite right about what I am trying to do. I've looked at it and can write a filter and get this going to solve my particular problem. I can't yet see how to write a reasonably powerful

using mod_jk: how to set content-type

2007-06-21 Thread Richard Kaye
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

Re: using mod_jk: how to set content-type

2007-06-21 Thread Rainer Jung
I had a similar problem with mod_prox and mod_headers for Apache httpd 2.2 today, and I would expect, that changing the headers with mod_header does not work. I see no easy way (but maybe others out there). You could hack ajp_unmarshal_response() in common/jk_ajp_common.c. Alternative:

Re: using mod_jk: how to set content-type

2007-06-21 Thread Johnny Kewl
, pretent to be XML. Very easy I think. - Original Message - From: Richard Kaye [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, June 21, 2007 5:04 PM Subject: using mod_jk: how to set content-type Hi I am using Tomcat5.5, Apache2.2 and mod_jk1.2 and a third

Re: using mod_jk: how to set content-type

2007-06-21 Thread Richard Kaye
Thanks for the quick reply, Rainer. Yes a servlet filter makes sense, though not as easy as a one-liner httpd directive. I guess my immediate response is surprise that (since this must be a common problem with so many poorly written web-clients doing content-negotiation so badly out in the

Re: using mod_jk: how to set content-type

2007-06-21 Thread Gregor Schneider
Had a smiliar problem here. When using mod_jk, apache does not touch the headers created by Tomcat. Solution: I wrote a filter that changed the headers after returning from Tomcat and installed this filter into Tomcat. Servlets and filtering (Servlet-Spec 2.3):

Re: using mod_jk: how to set content-type

2007-06-21 Thread Johnny Kewl
throw it out. If you use a filter you can even fix that, ie make sure its perfect XML. - Original Message - From: Richard Kaye [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Thursday, June 21, 2007 5:04 PM Subject: using mod_jk: how to set content-type Hi

Re: using mod_jk: how to set content-type

2007-06-21 Thread Gregor Schneider
On 6/21/07, Johnny Kewl [EMAIL PROTECTED] wrote: You know I just had another thought yes it happens sometimes. Wrong. It does ALWAYS happen: Apache httpd (2.x) in conjunction with mod_jk does not touch any headers passed from mod_jk, thus there's no possibility to change them, not with

Re: using mod_jk: how to set content-type

2007-06-21 Thread Johnny Kewl
- Original Message - From: Gregor Schneider [EMAIL PROTECTED] On 6/21/07, Johnny Kewl [EMAIL PROTECTED] wrote: You know I just had another thought yes it happens sometimes. Wrong. It does ALWAYS happen: Ha ha... no its my warped sense of humor... sometimes I have thoughts...