> Regardless of the failed attempts to change status,
>
> my $l = length($xml_data);
> $obj->apache_handle->set_content_length($l);
> $obj->apache_handle->content_type('text/xml');
> $obj->apache_handle->print($xml_data);
> return Apache::HTTP_MULTI_STATUS;
>
> would always return status 200.
besides the answer that joe gave, it looks like mod_dav itself follows this
logic
$r->status(Apache::HTTP_MULTI_STATUS);
$r->content_type('text/xml');
...
return Apache::DONE;
which I guess makes it the sole exception for setting $r->status, which is
something that you're generally not supposed to do.
>
> Tried to work around this by outputting the XML using
>
> $r->custom_response(Apache::HTTP_MULTI_STATUS,$xml_data);
>
> which returned the XML data with the correct 207
> response, but in this case the
>
> $r->content_type('text/xml');
>
> was ignored and the server reported the xml data as
> 'text/html'.
that's an apache thing, not a mod_perl thing. as in 1.3, ErrorDocuments in
2.0 are hard-coded to content-type 'text/html' (see ap_send_error_response
in http_protocol.c). it's come up before and I find it rather limiting and
strange, so it's probably something that would be worth looking into.
--Geoff
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html