All pastes #17493 Raw Edit

Untitled

public text v1 · immutable
#17493 ·published 2005-07-11 23:17 UTC
rendered paste body
Index: 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),