Re: Problem with Content-Type
Michael Slater (mikey@iexpress.net.au)
Wed, 15 Jul 1998 08:48:32 +0800 (WST)
Thanks,
I was not sure how to extract the Content-Type, i knew the way i
was doing it was wrong though :)
Michael
On Tue, 14 Jul 1998, Marc Langheinrich wrote:
> >if($res->is_success) {
> > print "Content-Type: text/html\n\n";
> >
> >The above line does not seem to work correctly, as images and other types
> >dont display properly.
>
> Well, that's because images aren't of Content-type "text/html" afterall. :-)
> Try to use the content-type that came in the response:
>
> if($res->is_success) {
> print $res->content_type, "\n\n"; # See HTTP::Message manpage
> print $res->content;
> }
>
> If you don't know the content type of a file, you can also look into
> LWP::MediaTypes...
>
>
> marc
>
>