rendered paste bodyIndex: static.py
===================================================================
--- static.py (revision 14132)
+++ static.py (working copy)
@@ -15,7 +15,6 @@
# Twisted Imports
from twisted.python import filepath
from twisted.python.util import InsensitiveDict
-from twisted.python.runtime import platformType
from zope.interface import implements
dangerousPathError = http.HTTPError(responsecode.NOT_FOUND) #"Invalid request URL."
@@ -140,7 +139,7 @@
self.ignoredExts = list(ignoredExts)
self.children = {}
if processors is not None:
- self.processors = processors
+ self.processors = InsensitiveDict(processors)
if indexNames is not None:
self.indexNames = indexNames
@@ -189,12 +188,7 @@
# Don't run processors on directories - if someone wants their own
# customized directory rendering, subclass File instead.
if fpath.isfile():
- if platformType == "win32":
- # don't want .RPY to be different than .rpy, since that
- # would allow source disclosure.
- processor = InsensitiveDict(self.processors).get(fpath.splitext()[1])
- else:
- processor = self.processors.get(fpath.splitext()[1])
+ processor = self.processors.get(fpath.splitext()[1])
if processor:
return (
processor(fpath.path),