httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian J. France" <>
Subject Re: ap_custom_response content type 'text/xml'
Date Thu, 26 Jun 2008 12:35:52 GMT

On Jun 26, 2008, at 3:33 AM, Kiffin Gish wrote:
> In order to reply with my own xml error, I want to use
> ap_custom_response(r, HTTP_INTERNAL_SERVER_ERROR, xml);
> However, default content type is "text/html". If I try to change it by
> using ap_set_content_type(r, "text/xml"), this has no effect.
> Is there anyone out there who can help me?

Ran into the same thing with apache 1.3.  We have a patch that adds a  
custom hook that is called before headers are sent and we can re-set  
it back to text/xml there (remember this is 1.3).

You could call ap_custom_response, set a flag in r->notes, have a  
output filter in your module that checks r->notes and if the flag set  
it scans for Content-type and resets it to text/xml.


View raw message