[lug] CGI Generated PDFs and MS Explorer 5.5 Problems...
George Sexton
gsexton at mhsoftware.com
Thu Mar 29 10:46:43 MST 2001
One possible solution would be to use URL rewriting so that any request for
/sheets/filename.xls
gets passed to
/cgi-bin/yourfile.cgi
I don't know how to do it in PERL. I am doing this with Java servlets. In
servlets you can create an Alias in the Web.xml. The way we are using it is:
/jstore/img/myfile.jpg
gets mapped in Web.xml to:
/jstore/servlet/binViewer
binViewer then uses getRequestURI() to parse off the original file name and
request URL, do a database lookup, and return the file using set content
type. It works really well.
-----Original Message-----
From: lug-admin at lug.boulder.co.us [mailto:lug-admin at lug.boulder.co.us]On
Behalf Of Ryan Kirkpatrick
Sent: 29 March, 2001 6:34 AM
To: lug at lug.boulder.co.us
Subject: Re: [lug] CGI Generated PDFs and MS Explorer 5.5 Problems...
On Wed, 28 Mar 2001, George Sexton wrote:
> One thing that I can tell you from experience is that IE 5.5 ( and I
assume
> lower) looks more intently upon the URL extension than the mime type.
>
> For example:
> Url: http://www.mycompany.com/x/x/file.asp
> that sets the mime type to be application/excel
> will not work. You have to have the file name be file.xls
YUCK! I guess that is M$ for you. :(
> The work-around is to create the file in a directory and re-direct the
browser
> to a URL with the correct extension. Yet another example of MS not
following
> the RFCs.
Yea, that is what I decided I am going to have to do... Only
problem with the solution is one needs some intelligent way of cleaning up
the generated files later. If one gets rid of them too soon you end up
with a race condition between the user request and file delete. If one
does not get rid of them, they pile up pretty quickly and start wasting
disk space. With my application, the generation of the PDFs are associated
with a session, so when the user's session ends, I can just delete all the
generated PDF files then I guess...
Thanks for the tip. TTYL.
---------------------------------------------------------------------------
| "For to me to live is Christ, and to die is gain." |
| --- Philippians 1:21 (KJV) |
---------------------------------------------------------------------------
| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |
---------------------------------------------------------------------------
_______________________________________________
Web Page: http://lug.boulder.co.us
Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
More information about the LUG
mailing list