From 30130982302238244d1381e726571076c4014ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Tue, 20 Sep 2011 13:38:01 +0000 Subject: [PATCH] SOLR-2763: Extracting update request handler throws exception and returns 400 when zero-length file posted using multipart form post git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1173139 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ .../src/java/org/apache/solr/servlet/SolrRequestParsers.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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 ) ); } }