4 Dec
2007
4 Dec
'07
1:54 p.m.
I found some behaviour of zc.resourcelib which I'm not sure is intended that way: The lib takes care to apply only to HTML and XML content, so it tests whether the content type (if set) is among text/html and text/xml: if content_type == 'text/html' or content_type == 'text/xml': ... However, it does so by exact comparison, so it would apply to "text/html" but not "text/html; charset=utf-8". Wouldn't a check like if content_type.split(';', 1)[0] in ('text/html', 'text/xml'): ... be more appropriate? -- Thomas