Changeset 1083 in products for quintagroup.distrpoxy
- Timestamp:
- Jul 14, 2009 3:50:17 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.distrpoxy/trunk/quintagroup/distproxy/wsgi.py
r1082 r1083 26 26 def __call__(self, environ, start_response): 27 27 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": 29 30 return HTTPNotFound()(environ, start_response) 30 31 filename = self.checkCache(path) … … 73 74 if not os.path.exists(full): 74 75 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')]) 76 77 return [self.get_index_html()] 77 78 return self.not_found(environ, start_response) … … 102 103 path = self.directory 103 104 # 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('.')] 105 106 dirs = [i for i in names if os.path.isdir(os.path.join(path, i))] 106 107 dirs.sort()
Note: See TracChangeset
for help on using the changeset viewer.