Changeset 1083 in products for quintagroup.distrpoxy


Ignore:
Timestamp:
Jul 14, 2009 3:50:17 PM (15 years ago)
Author:
koval
Message:

fixed bugs in egg proxy and static app

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.distrpoxy/trunk/quintagroup/distproxy/wsgi.py

    r1082 r1083  
    2626    def __call__(self, environ, start_response): 
    2727        path = environ.get('PATH_INFO', '').strip() 
    28         if path.split('/')[1] == "favicon.ico": 
     28        path_parts = path.split('/') 
     29        if len(path_parts) > 1 and path_parts[1] == "favicon.ico": 
    2930            return HTTPNotFound()(environ, start_response) 
    3031        filename = self.checkCache(path) 
     
    7374        if not os.path.exists(full): 
    7475            if full.endswith('index.html') and not os.path.isfile(full): 
    75                 start_response('200 OK', []) 
     76                start_response('200 OK', [('Content-Type', 'text/html')]) 
    7677                return [self.get_index_html()] 
    7778            return self.not_found(environ, start_response) 
     
    102103        path = self.directory 
    103104        # create sorted lists of directories and files 
    104         names = os.listdir(path) 
     105        names = [i for i in os.listdir(path) if not i.startswith('.')] 
    105106        dirs = [i for i in names if os.path.isdir(os.path.join(path, i))] 
    106107        dirs.sort() 
Note: See TracChangeset for help on using the changeset viewer.