<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="MSHTML 6.00.2800.1491" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=798262507-19062006><FONT face=Arial
size=2>Thanks for all the suggestions, guys, but it looks like it's a browser
bug. This makes interesting reading, for those who care
enough:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=798262507-19062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=798262507-19062006><FONT face=Arial
size=2><A
href="http://ppewww.ph.gla.ac.uk/~flavell/www/content-type.html">http://ppewww.ph.gla.ac.uk/~flavell/www/content-type.html</A></FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left>
<DIV><FONT face=Arial
size=2>Regards,<BR>
Leigh</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Leigh Sharpe<BR>Network Systems Engineer<BR>Pacific
Wireless<BR>Ph 9584 8966<BR>Mob 0408 009 502<BR>email <A
title=mailto:lsharpe@pacificwireless.com.au
href="blocked::mailto:lsharpe@pacificwireless.com.au">lsharpe@pacificwireless.com.au</A><BR>web
<A title=http://www.pacificwireless.com.au/
href="blocked::http://www.pacificwireless.com.au/">www.pacificwireless.com.au</A></FONT></DIV></DIV>
<DIV> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Leigh Sharpe <BR><B>Sent:</B> Monday, June
19, 2006 4:50 PM<BR><B>To:</B> melbourne-pm<BR><B>Subject:</B> [Melbourne-pm]
Delivering PDFs via CGI<BR></FONT><BR></DIV>
<DIV></DIV>
<P>
<DIV><SPAN class=858284006-19062006><FONT face=Arial size=2>Hi
All,</FONT></SPAN></DIV>
<DIV><SPAN class=858284006-19062006><FONT face=Arial size=2> Is it just me
or has this list been really quiet recently?</FONT></SPAN></DIV>
<DIV><SPAN class=858284006-19062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=858284006-19062006><FONT face=Arial size=2>Can anybody tell me
how to output PDF files to a browser properly? Specifically, I'm having trouble
getting Internet Explorer to recognise them as PDFs.</FONT></SPAN></DIV>
<DIV><SPAN class=858284006-19062006><FONT face=Arial size=2>This, for
example:</FONT></SPAN></DIV>
<DIV><SPAN class=858284006-19062006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial size=2> #!c:\perl\bin\perl.exe<BR> use
warnings;<BR> use strict;<BR> my
$filename="c:\\temp\\mypdf.pdf";<BR> my $data;<BR> print
"content-type:application/pdf\n\n";<BR> open (PDFFILE,"<$filename") or
die "$!\n";<BR> binmode PDFFILE;<BR> binmode STDOUT;<BR> my $size
= -s "$filename";<BR> read PDFFILE,$data,$size || die"$!\n";<BR> close
PDFFILE;<BR> print $data;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=858284006-19062006>Works perfectly when
accessed using Mozilla. Using IE, I just get a screen full of garbage.
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=858284006-19062006></SPAN></FONT><FONT
face=Arial size=2><SPAN class=858284006-19062006></SPAN></FONT><FONT face=Arial
size=2><SPAN class=858284006-19062006>If I use a URL that ends in ".pdf", it
works. eg, instead of <A
href="http://localhost/cgi-bin/mime.cgi">http://localhost/cgi-bin/mime.cgi</A>,
use <A
href="http://localhost/cgi-bin/mime.cgi?fred.pdf">http://localhost/cgi-bin/mime.cgi?fred.pdf</A>.
All works fine.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=858284006-19062006>Is this a bug
in my browser, or am I overlooking something here?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=858284006-19062006>I find the same
problem with MS-Word documents. I need to have a paramater which ends
in ".doc" in order to have IE open a word doc
automatically.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=858284006-19062006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left>
<DIV><FONT face=Arial
size=2>Regards,<BR>
Leigh</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Leigh Sharpe<BR>Network Systems Engineer<BR>Pacific
Wireless<BR>Ph 9584 8966<BR>Mob 0408 009 502<BR>email <A
title=mailto:lsharpe@pacificwireless.com.au
href="blocked::mailto:lsharpe@pacificwireless.com.au">lsharpe@pacificwireless.com.au</A><BR>web
<A title=http://www.pacificwireless.com.au/
href="blocked::http://www.pacificwireless.com.au/">www.pacificwireless.com.au</A></FONT></DIV></DIV>
<DIV> </DIV>
<P></P></BODY></HTML>