[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup -
handlers.py:1.13 zopeschema.xml:1.21
Fred Drake
cvs-admin at zope.org
Thu Oct 30 11:43:36 EST 2003
Update of /cvs-repository/Zope/lib/python/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv1862/lib/python/Zope/Startup
Modified Files:
handlers.py zopeschema.xml
Log Message:
Add a "mime-types" configuration value which names a file giving
additional MIME type to filename extension mappings. The "mime-types"
setting may be given more than once in the configuration file; the
files have the same format at the mime.types file distributed with
Apache.
Not sure if this should be ported to the Zope 2.7 branch.
=== Zope/lib/python/Zope/Startup/handlers.py 1.12 => 1.13 ===
--- Zope/lib/python/Zope/Startup/handlers.py:1.12 Tue Oct 21 10:10:17 2003
+++ Zope/lib/python/Zope/Startup/handlers.py Thu Oct 30 11:43:05 2003
@@ -153,6 +153,11 @@
L.append(d)
Products.__path__[:] = L
+ # Augment the set of MIME types:
+ if config.mime_types:
+ import OFS.content_types
+ OFS.content_types.add_files(config.mime_types)
+
# if no servers are defined, create default http server and ftp server
if not config.servers:
import ZServer.datatypes
=== Zope/lib/python/Zope/Startup/zopeschema.xml 1.20 => 1.21 ===
--- Zope/lib/python/Zope/Startup/zopeschema.xml:1.20 Thu Oct 2 15:09:27 2003
+++ Zope/lib/python/Zope/Startup/zopeschema.xml Thu Oct 30 11:43:05 2003
@@ -230,6 +230,22 @@
<metadefault>$instancehome/var</metadefault>
</key>
+ <multikey name="mime-types" datatype="existing-file">
+ <description>
+ This specifies additional lists of MIME types that should be
+ loaded into Python's "mimetypes" module. The files should have
+ the same form as the mime.types file distributed with the Apache
+ HTTP server.
+
+ Each line describing a MIME type should contain the major/minor
+ type, followed by a space-separated list of file extensions used
+ for files of that type. The extensions must not include the '.'
+ used to separate an extension from the base file name.
+
+ Blank lines and lines beginning with a '#' are ignored.
+ </description>
+ </multikey>
+
<multikey name="products" datatype="existing-directory">
<description>
This specifies additional product directories which are added to
More information about the Zope-Checkins
mailing list