Commit d1118952 authored by Tres Seaver's avatar Tres Seaver

Handle resource files with .htm extention properly as page template resources.

LP #411837
parent fedd23fa
...@@ -152,6 +152,9 @@ Features Added ...@@ -152,6 +152,9 @@ Features Added
Bugs Fixed Bugs Fixed
++++++++++ ++++++++++
- LP #411837: Handle resource files with ``.htm`` extention properly,
as page template resources.
- LP #435729: Fix indentation of OFSP/help/sequence.py docstring. - LP #435729: Fix indentation of OFSP/help/sequence.py docstring.
- LP #574286: Ensure that mailhosts which share a queue directory do not - LP #574286: Ensure that mailhosts which share a queue directory do not
......
...@@ -133,6 +133,7 @@ class DirectoryResource(Resource, ...@@ -133,6 +133,7 @@ class DirectoryResource(Resource,
'pt': PageTemplateResourceFactory, 'pt': PageTemplateResourceFactory,
'zpt': PageTemplateResourceFactory, 'zpt': PageTemplateResourceFactory,
'html': PageTemplateResourceFactory, 'html': PageTemplateResourceFactory,
'htm': PageTemplateResourceFactory,
} }
default_factory = FileResourceFactory default_factory = FileResourceFactory
......
...@@ -92,6 +92,21 @@ Page templates aren't guaranteed to render, so exclude them from the test: ...@@ -92,6 +92,21 @@ Page templates aren't guaranteed to render, so exclude them from the test:
... response = self.publish(base_url % r, basic='manager:r00t') ... response = self.publish(base_url % r, basic='manager:r00t')
... self.assertEquals(200, response.getStatus()) ... self.assertEquals(200, response.getStatus())
>>> print http(r'''
... GET /test_folder_1_/testoid/++resource++fivetest_resources/resource_subdir/resource.htm HTTP/1.1
... Authorization: Basic manager:r00t
... ''')
HTTP/1.1 200 OK
...
<html>
<head>
</head>
<body>
This .html should not have a base tag automatically
added to the header.
</body>
</html>
<BLANKLINE>
We also can traverse into sub-directories: We also can traverse into sub-directories:
......
<html>
<head>
</head>
<body>
This .html should not have a base tag automatically
added to the header.
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment