Title: User-defined mime.types file
Type: enhancement Stage:
Components: Library (Lib) Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fdrake Nosy List: ajung, fdrake
Priority: normal Keywords:

Created on 2001-07-09 13:35 by ajung, last changed 2001-08-03 21:04 by fdrake. This issue is now closed.

File name Uploaded Description Edit fdrake, 2001-07-24 02:51 Proposed new mimetypes module fdrake, 2001-07-27 14:28 Proposed new mimetypes module (fixed) fdrake, 2001-08-03 20:46 Final version of new mimetypes module
Messages (7)
msg5308 - (view) Author: Andreas Jung (ajung) Date: 2001-07-09 13:35
Zope users sometimes asks to add
additional mime.types entries to Zope. 
Zopes mime-types handling is mostly 
based on In such cases
users should be able to maintain their
own mime.types files. currently tries to look
for mime.types files in 4 hardcoded locations.

It would be more convinient to specify
additional locations e.g. by an env. var
that holds a list of additional locations
or by any other mechanism that allows user-defined

The hardcoded locations also don't work on
msg5309 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2001-07-23 20:07
Logged In: YES 

Sounds like there should be an object which can be configured with a search path at construction time.  Applications could then store an appropriate mime.types file in a location that makes sense for them.

Would this suite your purposes?
msg5310 - (view) Author: Andreas Jung (ajung) Date: 2001-07-23 20:12
Logged In: YES 

A more OO approach would be nice. At least a possibility to add "somehow"
different file locations. I have not special preference for any solution. 

msg5311 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2001-07-24 02:51
Logged In: YES 

I've attached a new version of; something like this should do the trick and be easy to extend as needed.

Comments welcome.
msg5312 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2001-07-27 14:28
Logged In: YES 

OK, I really should update the version here to be the fixed one; sorry about the broken versions!  If there are no objections, I'll check this in soon.
msg5313 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2001-08-03 20:46
Logged In: YES 

Ok, I've revised this again, to be a little cleaner and more consistent internally.  I've attached a copy and will check it in as soon as I'm sure the updated documentation won't break the formatting.
msg5314 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2001-08-03 21:04
Logged In: YES 

Checked in the new version as Lib/ revision 1.15, with documentation in Doc/lib/libmimetypes.tex revision 1.8.
Date User Action Args
2001-07-09 13:35:08ajungcreate