Hi, I have a problem with Zope and mime types. I have Zope 2.4.1 running behind Apache web server and the product I use is the DocumentLibrary. Th DL determines the type of document by analyzing the content type. When I upload a Word document from a machine where Word is installed the correct type 'application/msword' is found. But uploading the same file from a PC without a Word installation the 'application/octet-stream' type is determined. Now I am totally confused about content types and mime types. I hope some can answer the following questions: 1. Is this a normal behaviour? 2. How does Zope determine the content / mime type? 3. How does Zope determine the content / mime type when running behind Apache? TIA Frank
[Frank Stephan]
I have a problem with Zope and mime types. I have Zope 2.4.1 running behind Apache web server and the product I use is the DocumentLibrary. Th DL determines the type of document by analyzing the content type. When I upload a Word document from a machine where Word is installed the correct type 'application/msword' is found. But uploading the same
file
from a PC without a Word installation the 'application/octet-stream' type is determined. Now I am totally confused about content types and mime types.
When you upload one of these files, it is presumably through a browser running on that machine, and it would be the browser that determine what MIME type to send. Internet Explorer would look in the registry to find out. I don't know what Netscape or Opera would do. It looks like the registry does not know about Word files until Word has been installed. I can't check this myself because Word is installed on all the Windows computers I have access to. One place the MIME type is located in the registry is: HKEY_CLASSES_ROOT\.doc This is probably the key place that MS products would look for the MIME type. Notice that it is mapped to a file extension, since there is no independent way for Windows to know the type. This is probably the key installed by Word. You probably cannot do anything to make sure that you get this MIME type unless you map it yourself at the server. Cheers, Tom P
participants (2)
-
Frank Stephan -
Thomas B. Passin