You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Doug MacEachern <do...@covalent.net> on 2001/06/15 01:25:48 UTC
Re: sending a response without a Content-Type header
On Mon, 16 Apr 2001, Matthew Darwin wrote:
>
> I'm buiding an HTTP gateway in mod_perl and trying to send back to the
> client exactly what I get from the remote server. The remote server
> doesn't set a Content-Type on the document being returned, so I don't want
> to set one either.
>
> However, Mod_perl (or Apache), doesn't like it when I don't send a
> Content-type and seems to send a default of text/plain regardless. I
> don't want this. I don't want any Content-type at all.
>
> What I have now is sending mod_perl a Content-Type of ''. This sends a
> blank Content-Type to the browser. How can I avoid doing this?
...
> $r->send_http_header;
roll your own version of send_http_header. apache's send_http_header will
always send a content-type, part of being rfc compliant i guess.