# HG changeset patch # User Florent # Date 1248795390 -7200 # Node ID 1abdcb4199af3dcc671fa05c542f338c1d3dc2dd # Parent 3cd117ecc3a8c5a82db80686892c463a8bc0ed01# Parent 1ea2f2ff5dcae8c3796b02f7fe7e7c41d9c8bd76 merge diff -r 3cd117ecc3a8 -r 1abdcb4199af web/request.py --- 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' diff -r 3cd117ecc3a8 -r 1abdcb4199af web/webconfig.py --- 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,