Repository: tika
Updated Branches:
  refs/heads/master b58368f3f -> 98d75f692


TIKA-2081 -- add fileUrl back into tika-server -- fix commandline options not 
to include '-'


Project: http://git-wip-us.apache.org/repos/asf/tika/repo
Commit: http://git-wip-us.apache.org/repos/asf/tika/commit/e9e8d3bf
Tree: http://git-wip-us.apache.org/repos/asf/tika/tree/e9e8d3bf
Diff: http://git-wip-us.apache.org/repos/asf/tika/diff/e9e8d3bf

Branch: refs/heads/master
Commit: e9e8d3bf2b8b802ce01f23eefbe4b181ae252625
Parents: b58368f
Author: tballison <[email protected]>
Authored: Fri Sep 23 14:16:05 2016 -0400
Committer: tballison <[email protected]>
Committed: Fri Sep 23 14:16:05 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/tika/server/TikaServerCli.java    | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tika/blob/e9e8d3bf/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java
----------------------------------------------------------------------
diff --git 
a/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java 
b/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java
index 831a6d3..08b902a 100644
--- a/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java
+++ b/tika-server/src/main/java/org/apache/tika/server/TikaServerCli.java
@@ -86,8 +86,8 @@ public class TikaServerCli {
         options.addOption("l", "log", true, "request URI log level ('debug' or 
'info')");
         options.addOption("s", "includeStack", false, "whether or not to 
return a stack trace\nif there is an exception during 'parse'");
         options.addOption("?", "help", false, "this help message");
-        options.addOption("enable-unsecure-features", false, "this is required 
to enable fileUrl.");
-        options.addOption("enable-fileUrl", false, "allows user to pass in 
fileUrl instead of InputStream.");
+        options.addOption("enableUnsecureFeatures", false, "this is required 
to enable fileUrl.");
+        options.addOption("enableFileUrl", false, "allows user to pass in 
fileUrl instead of InputStream.");
 
         return options;
     }
@@ -175,15 +175,15 @@ public class TikaServerCli {
                         CommonsDigester.parse(line.getOptionValue("digest")));
             }
 
-            if (line.hasOption("enable-fileUrl") &&
-                    !line.hasOption("enable-unsecure-features")) {
+            if (line.hasOption("enableFileUrl") &&
+                    !line.hasOption("enableUnsecureFeatures")) {
                 System.err.println("If you want to enable fileUrl, you must 
also acknowledge the security risks\n"+
-                "by including --enable-unsecure-features.  See 
CVE-2015-3271.");
+                "by including --enableUnsecureFeatures.  See CVE-2015-3271.");
                 System.exit(-1);
             }
             InputStreamFactory inputStreamFactory = null;
-            if (line.hasOption("enable-fileUrl") &&
-                    line.hasOption("enable-unsecure-features")) {
+            if (line.hasOption("enableFileUrl") &&
+                    line.hasOption("enableUnsecureFeatures")) {
                 inputStreamFactory = new URLEnabledInputStreamFactory();
                 System.out.println(FILE_URL_WARNING);
             } else {

Reply via email to