Your problem is the following line:
> 'content-type' => 'text/plain', # interesting ? #
You already noticed that (from the comment), so you know what the problem is. Here's
something
else you had noted earlier:
> > Problem is all was fine and dandy (more or less) while testing with
> > IE5.5. Then I checked with netscape 4.77 and Konqueror 2.1.1 both
> > of these just display the html!
In other words, this works fine in Internet Explorer but other browsers have problems.
Here's
what's going on:
According to RFC 2616 (http://www.ietf.org/rfc/rfc2616.txt), section 14.17:
The Content-Type entity-header field indicates
the media type of the entity-body sent to the
recipient or, in the case of the HEAD method,
the media type that would have been sent had
the request been a GET.
What this means is that the client software (the browser) should interpret the body of
the
document as the media type specified. For you, Netscape and Konqueror are
interpreting the body
of the document as text/plain, just as they should be.
Microsoft, however, tries a different tactic: they try to second-guess you. Internet
Explorer
will attempt to determine the content-type of the entity-body and render it
accordingly. What
happens as a result is that many developers create code that either doesn't send a
content-type or
sends an incorrect content-type and if you have IE, it works fine. These developers
often assume
that other browsers are just "broken" (which Netscape is, but for different reasons).
As a
result, they continue to develop buggy code and Microsoft "fixes" this (as an extreme
example, I
once accidently sent a .gif image with a content-type of text/html and IE rendered it
just fine
but Netscape didn't).
Frankly, this is a real hassle. I used to program in VBScript in the Netherlands and
many of the
developers were turning out junk applications and telling clients that they were only
allowed to
use Internet Explorer because that took care of their bugs.
You, however, took the time to test this in other browsers and realized the problem.
What you need to do at this point is figure out why the wrong content-type is being
sent. If you
send a text/html content-type, this should fix your problem.
=====
Cheers,
Curtis Poe
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/