[Zope] Wrong <base href=""> for .HTM file in LocalFS

Loren Stafford lstafford@morphics.com
Thu, 26 Apr 2001 14:05:49 -0700


I can't believe that no one encountered this before.

LocalFS simply was not making case-insensitive lookups into its file type
table.

I fixed it by making the following change to LocalFS.py

WAS:

def _get_content_type(ext, _type_map):
    try: return _type_map[ext]
    except KeyError: return (None, None)

CHANGED TO:

def _get_content_type(ext, _type_map):
    try: return _type_map[string.lower(ext)]
    except KeyError: return (None, None)

Thanks, Evan and Dieter, for your tips.

-- Loren