You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Aditya <ad...@grot.org> on 2002/12/26 05:27:53 UTC

apache2 output filter, mod_jk and JSP content type

I'm trying to apply a Apache2 output filter (mod-xslt) on JSPs, served by
mod_jk, based on the JSP content MIME Type using the Apache
AddOutputFilterByType directive.

However, it looks like Apache2 decides the content type of a file when the
request comes in rather than from the response headers. This causes the Output
Filter not to be applied when the Content Type is overridden explictly in the
headers of a JSP using:

  <%@ page contentType="text/xml" %>

The note at:

  http://httpd.apache.org/docs-2.0/mod/core.html#addoutputfilterbytype

seems to suggest that. It also notes that "The by-type output filters are
never applied on proxy requests." -- would mod_jk served files qualify as
"proxy requests"?

It sounds like an Apache output filter "bug/feature" but perhaps I'm
misunderstanding how it should work? Is that the way it's supposed to work?

Thanks,
Adi

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: apache2 output filter, mod_jk and JSP content type

Posted by Aditya <ad...@grot.org>.
In case anyone is wondering, I've found the fix for this based on:

  http://article.gmane.org/gmane.comp.apache.devel/7922
  http://article.gmane.org/gmane.comp.apache.devel/7928

There was a small missing Apache API call in mod_jk that has been
implemented in mod_jk (I just used the latest HEAD from CVS) by Henri
Gomez and it all works.

Thanks,
Adi

> On Wed, 25 Dec 2002 20:27:53 -0800, Aditya <ad...@grot.org> said:
> I'm trying to apply a Apache2 output filter (mod-xslt) on JSPs,
> served by mod_jk, based on the JSP content MIME Type using the
> Apache AddOutputFilterByType directive.

> However, it looks like Apache2 decides the content type of a file
> when the request comes in rather than from the response
> headers. This causes the Output Filter not to be applied when the
> Content Type is overridden explictly in the headers of a JSP using:

>   <%@ page contentType="text/xml" %>

> The note at:

>
> http://httpd.apache.org/docs-2.0/mod/core.html#addoutputfilterbytype

> seems to suggest that. It also notes that "The by-type output
> filters are never applied on proxy requests." -- would mod_jk served
> files qualify as "proxy requests"?

> It sounds like an Apache output filter "bug/feature" but perhaps I'm
> misunderstanding how it should work? Is that the way it's supposed
> to work?

> Thanks, Adi

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>