httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Lewis <>
Subject Re: Determining mimetype of document
Date Fri, 08 Jun 2012 21:16:47 GMT
On 06/08/2012 03:07 PM, Joshua Marantz wrote:
> Hi,
> I'm trying to figure out whether my filter, which currently runs upstream
> of mod_headers, is likely to see the correct mimetype
> in request->content_type.
> In particular, we need to know whether browsers will interpret the content
> as XHTML or HTML, which is determined by the mimetype.  Do people typically
> set the mimetype using mod_headers, or is that typically set using AddType
> or some other mechanism?

It's usually set by the content generator.  However, you have to keep in 
mind that any module may modify that value (any output filter may, too) 
up until the AP_FTYPE_CONTENT_SET (runs after the AP_FTYPE_RESOURCE 
output filters).

Additionally, please keep in mind that Firefox has begun the old I.E. 
hack of sniffing the content and ignoring the Content-Type header if it 
can figure it out, so you will have to be aware that content_type is not 
indicative at any stage of what the browser is going to do.


View raw message