------------------------------------------------------------ revno: 13241 revision-id: squid3@treenet.co.nz-20140120012040-9ak10rxsvq99gk9o parent: squid3@treenet.co.nz-20140120011158-045rb824w35p1y7w committer: Amos Jeffries branch nick: trunk timestamp: Mon 2014-01-20 14:20:40 +1300 message: Set error page Content-Type character set to UTF-8 This fixes issues with some user agents displaying non-English / ASCII error page translations. Our translation system uses and produces UTF-8 templates for the langpack content. It also encourages UTF-8 usage in third-party error pages. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140120012040-9ak10rxsvq99gk9o # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 68f7845cf02efd8cd82c404550595f56b463af10 # timestamp: 2014-01-20 01:53:55 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140120011158-\ # 045rb824w35p1y7w # # Begin patch === modified file 'src/errorpage.cc' --- src/errorpage.cc 2014-01-13 21:03:45 +0000 +++ src/errorpage.cc 2014-01-20 01:20:40 +0000 @@ -1166,7 +1166,7 @@ status = Http::scTemporaryRedirect; } - rep->setHeaders(status, NULL, "text/html", 0, 0, -1); + rep->setHeaders(status, NULL, "text/html;charset=utf-8", 0, 0, -1); if (request) { MemBuf redirect_location; @@ -1178,7 +1178,7 @@ httpHeaderPutStrf(&rep->header, HDR_X_SQUID_ERROR, "%d %s", httpStatus, "Access Denied"); } else { MemBuf *content = BuildContent(); - rep->setHeaders(httpStatus, NULL, "text/html", content->contentSize(), 0, -1); + rep->setHeaders(httpStatus, NULL, "text/html;charset=utf-8", content->contentSize(), 0, -1); /* * include some information for downstream caches. Implicit * replaceable content. This isn't quite sufficient. xerrno is not