Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-2763: Extracting update request handler throws exception and returns 400 when zero-length file posted using multipart form post

Jan Høydahl301309823022
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 528a18df18f..33c0e8d9b99 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -353,6 +353,9 @@ Bug Fixes
* SOLR-2772: Fixed Date parsing/formatting of years 0001-1000 (hossman)
+* SOLR-2763: Extracting update request handler throws exception and returns 400
+ when zero-length file posted using multipart form post (janhoy)
+
Other Changes
----------------------
diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java b/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
index c61fc10b464..a046633c03d 100644
--- a/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
+++ b/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
@@ -352,8 +352,8 @@ class MultipartRequestParser implements SolrRequestParser
item.getFieldName(),
item.getString(), params.getMap() );
}
- // Only add it if it actually has something...
- else if( item.getSize() > 0 ) {
+ // Add the stream
+ else {
streams.add( new FileItemContentStream( item ) );
}
}