comparison roundup/cgi/client.py @ 2656:b386e8811932 maint-0.7

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Mon, 02 Aug 2004 22:42:55 +0000
parents 9e1c4c932323
children 26b20d0b42fa
comparison
equal deleted inserted replaced
2616:eaf74cf96cfa 2656:b386e8811932
1 # $Id: client.py,v 1.176.2.3 2004-07-20 02:10:43 richard Exp $ 1 # $Id: client.py,v 1.176.2.4 2004-08-02 22:42:55 richard Exp $
2 2
3 """WWW request handler (also used in the stand-alone server). 3 """WWW request handler (also used in the stand-alone server).
4 """ 4 """
5 __docformat__ = 'restructuredtext' 5 __docformat__ = 'restructuredtext'
6 6
458 ''' 458 '''
459 # figure the filename - ensure the load doesn't try to poke 459 # figure the filename - ensure the load doesn't try to poke
460 # outside of the static files dir 460 # outside of the static files dir
461 prefix = getattr(self.instance.config, 'STATIC_FILES', 461 prefix = getattr(self.instance.config, 'STATIC_FILES',
462 self.instance.config.TEMPLATES) 462 self.instance.config.TEMPLATES)
463
464 # normalise the prefix and filename for the startswith comparison
465 prefix = os.path.normpath(prefix)
463 filename = os.path.normpath(os.path.join(prefix, file)) 466 filename = os.path.normpath(os.path.join(prefix, file))
464 if not filename.startswith(prefix): 467 if not filename.startswith(prefix):
465 raise NotFound, file 468 raise NotFound, file
466 469
467 # last-modified time 470 # last-modified time

Roundup Issue Tracker: http://roundup-tracker.org/