On Mon, 4 Dec 2000 08:20:36 +0100 (CET), Bernie <[EMAIL PROTECTED]>
wrote:
> Glenn wrote:
>> As you can see... they have the server set to send .PNG as text/html
>> WRONG, WRONG, WRONG !!! <VBG>
> Hmm... they were correct in Netscape 3.04G (AFAICT), that is the mime-type
> was correct. Netscape 3.x on the other hand can't view PNGs ;-)
The reason why you were able to see them in NS 3.04g is that NS does
not rely upon only content-type.
NS uses a combination of 3 methods.
1) content-type
2) file extension
3) file header
If 1) fails to view the file correctly, 2) is used
If 2) still fails to view it correctly, 3) is used
If 3) still fails to view it correctly, the "torn picture icon" is
displayed.
This is why NS can correctly view PNGs sent with content-type: text/html
It can also correctly view PNGs sent with .JPG extension.
We can "simulate" the switching from 1) to 2) by altering mime.cfg
If we change
text/html HTM
so that it reads:
text/html PNG>BMP|$epng2bmp.exe -s -o $2 $1
http://disvr.cjb.net/dos/drdos.png will now get converted to BMP
Since I have seen many, many sites that are sending incorrect
content-type.....
(even http://arachne.cz/ is sending text/plain for any file extension
not listed in the server setup)
IMO, the only way we are going to "fix" this problem is by completly
eliminating content-type from consideration and always use the file
extension. (just like we do for local files now)
file/.png PNG>BMP|$epng2bmp.exe -s -o $2 $1
Should be used for both local and remote files.
However, this would not fix the problem of JPEGs with .PNG extension. :(
(or GIFs with .JPG or BMPs with .GIF etc, etc, etc...)
The only way to fix *that* problem is to use NS method 3)
(read the file header info)
--
Glenn
(your friendly neighborhood compu-nerd)
http://arachne.cz/
http://www.delorie.com/listserv/mime/
http://freedos-32.sourceforge.net/