lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1328536 - /lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java
Date Fri, 20 Apr 2012 22:41:44 GMT
Author: ryan
Date: Fri Apr 20 22:41:43 2012
New Revision: 1328536

URL: http://svn.apache.org/viewvc?rev=1328536&view=rev
Log:
SOLR-2020: fix FormBodyPart - The 2nd param is the contentType, not the name

Modified:
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java?rev=1328536&r1=1328535&r2=1328536&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java
(original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java
Fri Apr 20 22:41:43 2012
@@ -290,7 +290,11 @@ public class HttpSolrServer extends Solr
 
               if (isMultipart) {
                 for (ContentStream content : streams) {
-                   parts.add(new FormBodyPart(content.getName(), new InputStreamBody(content.getStream(),
content.getName())));
+                   parts.add(new FormBodyPart(content.getName(), 
+                       new InputStreamBody(
+                           content.getStream(), 
+                           content.getContentType(), 
+                           content.getName())));
                 }
               }
               



Mime
View raw message