merge
authorFlorent <florent@secondweb.fr>
Tue, 28 Jul 2009 17:36:30 +0200
changeset 2553 1abdcb4199af
parent 2530 3cd117ecc3a8 (current diff)
parent 2552 1ea2f2ff5dca (diff)
child 2554 3b6a6d2f9d7e
merge
--- 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,