Any IIS 6 Perl CGI gurus out their with their sanity intact
davidp at preshweb.co.uk
Wed Nov 14 14:33:07 GMT 2007
Dave Cross wrote:
> Quoting Bob Browning <bob at textor.com>:
>> I put print "content-type:text/html\n\nhello"; in the top of the file and
>> it came out.
> Why do people do that? You're lying to the browser about the content
> type. You say you're going to send HTML but you actually sent plain
> text. It's not just you, obviously, I see it all over the place.
> Especially in some of the more dubious Perl/CGI books.
> You can use text/plain as a content type you know.
Sometimes text/plain will cause the browser to ask if you want to save
to a file or open it in your chosen text editor, whereas text/html means
it'll always be just displayed by the browser, which is perhaps more
convenient for a quick debugging message?
Of course it's not *right*, but for a quick test like this it might be a
little more convenient.
More information about the london.pm