From 8477ca2d98da59b4341ff490259b282270d0a1d3 Mon Sep 17 00:00:00 2001 From: Leonardo Rochael Almeida <leonardo@nexedi.com> Date: Sun, 9 May 2010 08:11:46 +0000 Subject: [PATCH] Send Accept-Charset headers to let Zope process non-ascii charsets in Zuite results git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35122 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/tests/runFunctionalTest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/product/ERP5Type/tests/runFunctionalTest.py b/product/ERP5Type/tests/runFunctionalTest.py index f49bccf03a..708b221f1c 100755 --- a/product/ERP5Type/tests/runFunctionalTest.py +++ b/product/ERP5Type/tests/runFunctionalTest.py @@ -130,7 +130,11 @@ class FunctionalTestRunner: self.portal_url = "http://%s:%d/%s" % (self.host, self.port, self.portal_name) def openUrl(self, url): - f = urllib2.urlopen(url) + # Send Accept-Charset headers to activate the UnicodeConflictResolver + # (imitating firefox 3.5.9 here) + headers = { 'Accept-Charset' : 'ISO-8859-1,utf-8;q=0.7,*;q=0.7' } + request = urllib2.Request(url, headers=headers) + f = urllib2.urlopen(request) file_content = f.read() f.close() return file_content -- 2.30.9