CGI to make PNG image

Mike Fletcher mfletch at tpresence.com
Fri Aug 18 05:55:34 EDT 2000


You see similar results with IE using any registered file extension and any
server CGI system.  For instance, if you have an extension .txt on your CGI
scripts generating VRML, you'll get plain-text, regardless of the mime-type
you sent.  The work-around is to use something like:
http://myurl/myscript.py?normalparam=23&format=.png

As the url for your script, or to save the file to disk and do a redirect.
IE just takes the last few characters to do its negotiation/association.
This was a wrong-headed attempt by someone at Microsoft to be "clever".
Would have been fine had they only done this negotiation _in the absence_ of
a mime-time declaration, but doing it in spite of the correct declaration is
just silly.

Sigh,
Mike

-----Original Message-----
From: Take Sato [mailto:tkssato at yahoo.co.jp]
Sent: Friday, August 18, 2000 2:44 AM
To: python-list at python.org
Subject: Re: CGI to make PNG image
...
2. Curiously,
   MSIE5.0 on WinNT sometimes failed in dealing with PNG images
   returned by CGI script in case the script name is designated as URL.
   While the script is called in img tags in HTML files, it works OK.
...




More information about the Python-list mailing list