[Checkins] SVN: zc.resourcelibrary/trunk/ fixed the check for HTML
and XML content to allow content type parameters
Thomas Lotze
tl at gocept.com
Tue Dec 4 16:36:12 EST 2007
Log message for revision 82127:
fixed the check for HTML and XML content to allow content type parameters
Changed:
U zc.resourcelibrary/trunk/CHANGES.txt
U zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py
-=-
Modified: zc.resourcelibrary/trunk/CHANGES.txt
===================================================================
--- zc.resourcelibrary/trunk/CHANGES.txt 2007-12-04 20:50:17 UTC (rev 82126)
+++ zc.resourcelibrary/trunk/CHANGES.txt 2007-12-04 21:36:12 UTC (rev 82127)
@@ -2,6 +2,11 @@
CHANGES
=======
+0.6.2 (2007-12-04)
+------------------
+
+- fixed the check for HTML and XML content to allow content type parameters
+
0.6.1 (2007-11-03)
------------------
Modified: zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py
===================================================================
--- zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py 2007-12-04 20:50:17 UTC (rev 82126)
+++ zc.resourcelibrary/trunk/src/zc/resourcelibrary/publication.py 2007-12-04 21:36:12 UTC (rev 82127)
@@ -71,7 +71,9 @@
if isHTML(body):
content_type = 'text/html'
- if content_type == 'text/html' or content_type == 'text/xml':
+ # check the content type disregarding parameters, whitespace and case
+ if content_type.split(';', 1)[0].strip().lower() in (
+ 'text/html', 'text/xml'):
#act on HTML and XML content only!
self.resource_libraries = self._addDependencies(self.resource_libraries)
More information about the Checkins
mailing list