As the docs say $r->send_http_header is deprecated because it is unneeded
in mp2 ... but $r->content_type must be set.

DefaultType is set by default to text/plain in httpd.conf, so browsers
that strictly apply content_type (eg Opera 7) were showing the content as
HTML source.

I had several handlers that simply called $r->send_http_header so
replacing each occurence with $r->content_type wasn't much of an
improvement in code cleanliness and simplicity, if that's what the goal of
eliminating send_http_headers was in the first place.

Therefore, I changed DefaultType from text/plain to text/html and voila --
I don't have to set $r->content_type after all but rather can just delete
all the $r->send_http_headers calls.

YMMV, of course, if you have other parts of your webserver that do not
supply a content-type :)

- nick

-- 

~~~~~~~~~~~~~~~~~~~~
Nick Tonkin   {|8^)>

Reply via email to