Comment 6 for bug 487998

Revision history for this message
Andrew P. Ho (aho) wrote :

Here is a solution applied to
lib/python2.6/site-packages/zope.contenttype-3.4.2-py2.6.egg/zope/contenttype/__init__.py

*** Please incorporate into next Zope 2 release ***
--------
   # at least the maximum length of any tags we look for
    iMAXLEN=14
    if len(s) < iMAXLEN: return 'text/plain'
    i = 0

# here is the fix starting line 39
    try:
        while s[i] in string.whitespace:
         i += 1
    except IndexError:
         i=i-1