httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Trawick" <traw...@gmail.com>
Subject Re: ap_custom_response content type 'text/xml'
Date Thu, 26 Jun 2008 10:56:19 GMT
On Thu, Jun 26, 2008 at 3:33 AM, Kiffin Gish <Kiffin.Gish@tomtom.com> 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.
>
(The ap_custom_response() API is busted and needs to allow (FORCE) the
caller to pass in the content type/charset to associate with the response
text.)

You can pass a URI to ap_custom_response (as on the ErrorDocument directive)
to redirect error requests to a special uri space, and implement a handler
for those which can control the response more fully.

(Hopefully there are some better ideas out there.)

Mime
View raw message