You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2011/02/03 18:43:22 UTC
svn commit: r1066891 - in /lucene/dev/branches/branch_3x: ./ lucene/ solr/
solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
Author: uschindler
Date: Thu Feb 3 17:43:22 2011
New Revision: 1066891
URL: http://svn.apache.org/viewvc?rev=1066891&view=rev
Log:
Fix issue in CommonsHttpSolrServer where a Reader is copied to an OutputStream using default encoding
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/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
Modified: lucene/dev/branches/branch_3x/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java?rev=1066891&r1=1066890&r2=1066891&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java (original)
+++ lucene/dev/branches/branch_3x/solr/src/solrj/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java Thu Feb 3 17:43:22 2011
@@ -20,7 +20,6 @@ package org.apache.solr.client.solrj.imp
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.io.Reader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.*;
@@ -335,11 +334,11 @@ public class CommonsHttpSolrServer exten
@Override
protected void sendData(OutputStream out)
throws IOException {
- Reader reader = c.getReader();
+ InputStream in = c.getStream();
try {
- IOUtils.copy(reader, out);
+ IOUtils.copy(in, out);
} finally {
- reader.close();
+ in.close();
}
}
});