You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ry...@apache.org on 2012/04/21 00:41:44 UTC
svn commit: r1328536 -
/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java
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())));
}
}