Fix SimplePostTool (also bin/post) -filetypes * to work properly in 'web' mode

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1697798 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erik Hatcher 2015-08-26 01:12:25 +00:00
parent 4199c14da7
commit 99c26b08c3
2 changed files with 3 additions and 1 deletions

View File

@ -156,6 +156,8 @@ Bug Fixes
* SOLR-7972: Fix VelocityResponseWriter template encoding issue.
Templates must be UTF-8 encoded. (Erik Hatcher)
* SOLR-7929: SimplePostTool (also bin/post) -filetypes "*" now works properly in 'web' mode (Erik Hatcher)
Optimizations
----------------------

View File

@ -1093,7 +1093,7 @@ public class SimplePostTool {
// Raw content type of form "text/html; encoding=utf-8"
String rawContentType = conn.getContentType();
String type = rawContentType.split(";")[0];
if(typeSupported(type)) {
if(typeSupported(type) || "*".equals(fileTypes)) {
String encoding = conn.getContentEncoding();
InputStream is;
if (encoding != null && encoding.equalsIgnoreCase("gzip")) {