On 05/04/00, ""Soren Andersen" <[EMAIL PROTECTED]>" wrote:
> Please be tolerant of this OT question and extensive OT reply ... there IS some Perl 
>in here.

On 05/03/00, ""Ranga Nathan" <[EMAIL PROTECTED]>" wrote:
> My web site is running on Apache/BSD and I would like to know how I can
> serve PNG files. When I try to view PNG files from my site in IE, it prompts
> me to download QuickTime. Currently I have converted all my PNG images to
> GIF. ...I was just wondering if there is a way to actually view PNG files in
> the browser....hmmm

Glad you asked! Thanks so much for supporting PNG by USING them! 
{snip} [ sorry if there's a readability problem with wrapping in my reply 
]

{snip}
Try this Perl one liner (I promised some Perl and here is a start) to test 
for server rectitude on MIME type):
==== NO WRAPPING WHATSOEVER ======
perl -MLWP -M"HTTP::Request" -e "$ua=LWP::UserAgent->new; $r=new 
HTTP::Request('HEAD','http://SOMESERVER.TOPDOMAIN/PATH/TO/SOMEIMAGE.png');$rs=$ua->request($r);print
 
\"\n\". $r->as_string(). ' '.$rs->message .\"\n\"; 
@hdrs=%{($rs->headers)};$d=0;while($d<=$#hdrs){print \"$hdrs[$d++]: 
$hdrs[$d++]\n\"};"

==== FIX WRAPPING ON ABOVE LINES! ===

[^ABOVE: sorry, it might be confusing that there was an arbitrary 
"/cgi-bin/" in the path to the PNG image filename specification in the code 
above. Wanted to make it clear now.]

 HTH,
      soren andersen

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to