file posting mime type not matching

0 views
Skip to first unread message

QC

unread,
Mar 27, 2009, 7:42:16 AM3/27/09
to cherrypy-devel
Posting a zip file from a web form gives a different mime type using
the cherrypy file type versus mimetype.types_map. Although, both are
valid types, they really should be the same to ease comparison.
Example:

def postfile(self,*args,**params):
import mimetypes
myfile=params['myfile']
print mimetypes.types_map['.zip']
print myfile.type

result:

application/zip
application/x-zip-compressed

CP 3.1.1, Python 2.5

And, yes, one can add the CP type to mimetypes, but one should not
have to do this: CP should match the standard implementation in
mimetypes out of the box, always.
Reply all
Reply to author
Forward
0 new messages