httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ICS.UCI.EDU>
Subject Re: Server-generated content-type?
Date Sat, 29 Mar 1997 05:10:27 GMT
Ken writes:
>    Working on mod_example, the handler of which emits text/plain
>    content, I found I was having trouble getting the Content-type
>    header sent to the client correctly.  No matter what I did, Apache
>    would rewrite this header to "text/html".  I finally stole a
>    workaround from another module and now force *my* setting to be sent
>    by calling send_http_header() at the beginning of the handler
>    routine.

Why don't you just set r->content_type?  The behavior is ancient, as far
as I can tell, but it would be easy to add a check for an existing
Content-Type before setting it to the default_type.

>    I can't find any reference to this behaviour; is the server
>    *supposed* to force "text/html" on all outbound server-generated
>    content? 

Only if no r->content_type and the default type is "text/html".  It should
say that in API.html, but doesn't.


View raw message