You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by yo...@apache.org on 2011/02/26 00:59:29 UTC

svn commit: r1074753 - in /lucene/dev/branches/branch_3x: ./ lucene/ solr/ solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java

Author: yonik
Date: Fri Feb 25 23:59:28 2011
New Revision: 1074753

URL: http://svn.apache.org/viewvc?rev=1074753&view=rev
Log:
SOLR-2381: remove jetty==CESU8 assumption

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/solr/   (props changed)
    lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java

Modified: lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java?rev=1074753&r1=1074752&r2=1074753&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java (original)
+++ lucene/dev/branches/branch_3x/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java Fri Feb 25 23:59:28 2011
@@ -42,8 +42,9 @@ import org.apache.solr.common.SolrDocume
  * 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)
  * <p>
- * 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)
  * <p>
  * In installations where Solr auto-detects incorrectly, the Solr Administrator should set the
  * "solr.phps.cesu8" system property to either "true" or "false" accordingly.
@@ -55,14 +56,7 @@ public class PHPSerializedResponseWriter
   // 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 {