From ee1228ac82eda1ebf9464a8933bcd39b5f37daf0 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Fri, 25 Feb 2011 23:44:59 +0000 Subject: [PATCH] SOLR-2381: remove jetty==CESU8 assumption git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1074750 13f79535-47bb-0310-9956-ffa450edef68 --- .../solr/response/PHPSerializedResponseWriter.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java b/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java index 0149882cb05..5e79bb0ed00 100755 --- a/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java +++ b/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java @@ -43,8 +43,9 @@ import org.apache.solr.common.SolrDocumentList; * must know if the Writers passed to it will result in an output of CESU-8 (UTF-8 w/o support * for large code points outside of the BMP) *

- * Currently Solr assumes that all Jetty servlet containers (detected using the "jetty.home" - * system property) use CESU-8 instead of UTF-8 (verified to the current release of 6.1.20). + * Solr versions before 3.1 assume that all Jetty servlet containers (detected using the "jetty.home" + * system property) use CESU-8 instead of UTF-8 (verified to the current release of 6.1.26). + * Solr 3.1 contains a patched version of Jetty that uses real UTF-8 (SOLR-2381) *

* In installations where Solr auto-detects incorrectly, the Solr Administrator should set the * "solr.phps.cesu8" system property to either "true" or "false" accordingly. @@ -56,14 +57,7 @@ public class PHPSerializedResponseWriter implements QueryResponseWriter { // large characters outside the BMP). boolean CESU8 = false; public void init(NamedList n) { - String cesu8Setting = System.getProperty("solr.phps.cesu8"); - if (cesu8Setting != null) { - CESU8="true".equals(cesu8Setting); - } else { - // guess at the setting. - // Jetty up until 6.1.20 at least (and probably versions after) uses CESU8 - CESU8 = System.getProperty("jetty.home") != null; - } + CESU8 = "true".equals(System.getProperty("solr.phps.cesu8")); } public void write(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) throws IOException {