[Checkins] SVN: Zope3/branches/3.3/ - Fixed issue 680, html files in a resource directory was interpreted

Lennart Regebro regebro at gmail.com
Thu Aug 17 07:39:07 EDT 2006


Log message for revision 69591:
        - Fixed issue 680, html files in a resource directory was interpreted
          as page templates, which used up processing time and caused 
          HTML-resources that were not valid XHTML to fail.
          
          If you want your resources in a resource directory to be interpreted 
          as pagetemplates they now need to have a .pt or .zpt extension.
  
  

Changed:
  U   Zope3/branches/3.3/doc/CHANGES.txt
  U   Zope3/branches/3.3/src/zope/app/publisher/browser/directoryresource.py
  U   Zope3/branches/3.3/src/zope/app/publisher/browser/tests/test_directoryresource.py
  A   Zope3/branches/3.3/src/zope/app/publisher/browser/tests/testfiles/test.html

-=-
Modified: Zope3/branches/3.3/doc/CHANGES.txt
===================================================================
--- Zope3/branches/3.3/doc/CHANGES.txt	2006-08-17 11:16:48 UTC (rev 69590)
+++ Zope3/branches/3.3/doc/CHANGES.txt	2006-08-17 11:39:03 UTC (rev 69591)
@@ -26,6 +26,13 @@
         conforming to RFC 2617.
 
       - Fixed broken behaviour of Mail Delivery Names vocabulary.
+    
+      - Fixed issue 680, html files in a resource directory was interpreted
+        as page templates, which used up processing time and caused 
+        HTML-resources that were not valid XHTML to fail.
+        
+        If you want your resources in a resource directory to be interpreted 
+        as pagetemplates they now need to have a .pt or .zpt extension.
 
       - Fixed issue 537: zope.conf advertises RecordingHTTP server
         which doesn't ship with the Zope 3 releases.

Modified: Zope3/branches/3.3/src/zope/app/publisher/browser/directoryresource.py
===================================================================
--- Zope3/branches/3.3/src/zope/app/publisher/browser/directoryresource.py	2006-08-17 11:16:48 UTC (rev 69590)
+++ Zope3/branches/3.3/src/zope/app/publisher/browser/directoryresource.py	2006-08-17 11:39:03 UTC (rev 69591)
@@ -58,7 +58,6 @@
         '.jpg':  ImageResourceFactory,
         '.pt':   PageTemplateResourceFactory,
         '.zpt':  PageTemplateResourceFactory,
-        '.html': PageTemplateResourceFactory,
         }
 
     default_factory = FileResourceFactory

Modified: Zope3/branches/3.3/src/zope/app/publisher/browser/tests/test_directoryresource.py
===================================================================
--- Zope3/branches/3.3/src/zope/app/publisher/browser/tests/test_directoryresource.py	2006-08-17 11:16:48 UTC (rev 69590)
+++ Zope3/branches/3.3/src/zope/app/publisher/browser/tests/test_directoryresource.py	2006-08-17 11:39:03 UTC (rev 69591)
@@ -118,6 +118,8 @@
         self.assert_(zapi.isinstance(image, FileResource))
         template = resource['test.pt']
         self.assert_(zapi.isinstance(template, PageTemplateResource))
+        file = resource['test.html']
+        self.assert_(zapi.isinstance(file, FileResource))
         file = resource['test.txt']
         self.assert_(zapi.isinstance(file, FileResource))
         file = resource['png']

Copied: Zope3/branches/3.3/src/zope/app/publisher/browser/tests/testfiles/test.html (from rev 69590, Zope3/trunk/src/zope/app/publisher/browser/tests/testfiles/test.html)



More information about the Checkins mailing list