> -----Original Message-----
> From: Paul Kulchenko [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 30, 2001 2:53 AM
> To: Stas Bekman
> Cc: [EMAIL PROTECTED]
> Subject: Re: [Problem] Can't return Content-type with SERVER_ERROR
> 

[snip]

> 
> it's the same as to use err_headers_out as far as I understand. What
> is the general procedure to generate custom content-type along with
> SERVER_ERROR?
> 
> sub handler {
>   ...
>   $r->content_type('text/xml; charset=utf-8');
>   $r->custom_response($self->response->code,
>                       $self->response->content);
>   $self->response->code;
> }
> 
> doesn't work if '$self->response->code' is 500. mod_perl overrides my
> content-type with text/html.
> 

your procedure is correct.  well, except that you can't do what you want :)

take a look at http_protocol.c - 

'r->content_type = "text/html; charset=iso-8859-1";' is hardcoded in
ap_send_error_response(), so it's an apache thing and not a mod_perl
thing...

HTH

--Geoff
 

Reply via email to