Edgewall Software

Ticket #554: util_py.patch

File util_py.patch, 1.8 KB (added by paul.kendall@…, 4 years ago)

mod_python patch to fix this issue

  • httpd-python/lib/python/mod_python/util.py

    RCS file: /home/cvspublic/httpd-python/lib/python/mod_python/util.py,v
    retrieving revision 1.21
    retrieving revision 1.22
    diff -u -r1.21 -r1.22
     
    1515 # 
    1616 # Originally developed by Gregory Trubetskoy. 
    1717 # 
    18  # $Id: util.py,v 1.21 2004/02/16 19:47:27 grisha Exp $ 
     18 # $Id: util.py,v 1.22 2004/04/30 19:26:36 grisha Exp $ 
    1919 
    2020import _apache 
    2121import apache 
     
    224224        found = [] 
    225225        for item in self.list: 
    226226            if item.name == key: 
    227                 if isinstance(item.file, FileType): 
     227                if isinstance(item.file, FileType) or \ 
     228                       isinstance(getattr(item.file, 'file', None), FileType): 
    228229                    found.append(item) 
    229230                else: 
    230231                    found.append(StringField(item.value)) 
     
    268269        """ return the first value received """ 
    269270        for item in self.list: 
    270271            if item.name == key: 
    271                 if isinstance(item.file, FileType): 
     272                if isinstance(item.file, FileType) or \ 
     273                       isinstance(getattr(item.file, 'file', None), FileType): 
    272274                    return item 
    273275                else: 
    274276                    return StringField(item.value) 
     
    281283        found = [] 
    282284        for item in self.list: 
    283285            if item.name == key: 
    284                 if isinstance(item.file, FileType): 
     286                if isinstance(item.file, FileType) or \ 
     287                       isinstance(getattr(item.file, 'file', None), FileType): 
    285288                    found.append(item) 
    286289                else: 
    287290                    found.append(StringField(item.value))