mirror of https://github.com/apache/lucene.git
SOLR-2020: don't send a null mime-type
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1328539 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
728bf1a914
commit
a583705403
|
@ -290,10 +290,14 @@ public class HttpSolrServer extends SolrServer {
|
|||
|
||||
if (isMultipart) {
|
||||
for (ContentStream content : streams) {
|
||||
parts.add(new FormBodyPart(content.getName(),
|
||||
String contentType = content.getContentType();
|
||||
if(contentType==null) {
|
||||
contentType = "application/octet-stream"; // default
|
||||
}
|
||||
parts.add(new FormBodyPart(content.getName(),
|
||||
new InputStreamBody(
|
||||
content.getStream(),
|
||||
content.getContentType(),
|
||||
contentType,
|
||||
content.getName())));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue