--- a/web/request.py Tue Jul 28 16:33:59 2009 +0200
+++ b/web/request.py Tue Jul 28 17:36:30 2009 +0200
@@ -709,7 +709,7 @@
return True
def html_content_type(self):
- if self.xhtml_browser():
+ if not self.vreg.config['force-html-content-type'] and self.xhtml_browser():
return 'application/xhtml+xml'
return 'text/html'
--- a/web/webconfig.py Tue Jul 28 16:33:59 2009 +0200
+++ b/web/webconfig.py Tue Jul 28 17:36:30 2009 +0200
@@ -145,6 +145,13 @@
'sessions. Default to 2 min.',
'group': 'web', 'inputlevel': 2,
}),
+ ('force-html-content-type',
+ {'type' : 'yn',
+ 'default': False,
+ 'help': 'force text/html content type for your html pages instead of cubicweb user-agent based'\
+ 'deduction of an appropriate content type',
+ 'group': 'web', 'inputlevel': 2,
+ }),
('embed-allowed',
{'type' : 'regexp',
'default': None,