You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2021/08/18 17:23:23 UTC
[tika] branch main updated: add trim() to test for fetchkey
starting with 'file:' in UrlFetcher
This is an automated email from the ASF dual-hosted git repository.
tallison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 246ca9e add trim() to test for fetchkey starting with 'file:' in UrlFetcher
246ca9e is described below
commit 246ca9e3171501b619b753d72f5ae02038cd2e01
Author: tallison <ta...@apache.org>
AuthorDate: Wed Aug 18 13:20:53 2021 -0400
add trim() to test for fetchkey starting with 'file:' in UrlFetcher
---
.../src/main/java/org/apache/tika/pipes/fetcher/url/UrlFetcher.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tika-core/src/main/java/org/apache/tika/pipes/fetcher/url/UrlFetcher.java b/tika-core/src/main/java/org/apache/tika/pipes/fetcher/url/UrlFetcher.java
index ec4954f..f415a35 100644
--- a/tika-core/src/main/java/org/apache/tika/pipes/fetcher/url/UrlFetcher.java
+++ b/tika-core/src/main/java/org/apache/tika/pipes/fetcher/url/UrlFetcher.java
@@ -41,7 +41,7 @@ public class UrlFetcher extends AbstractFetcher {
"Please review the life decisions that led you to requesting " +
"a URL with this character in it.");
}
- if (fetchKey.toLowerCase(Locale.US).startsWith("file:")) {
+ if (fetchKey.toLowerCase(Locale.US).trim().startsWith("file:")) {
throw new IllegalArgumentException(
"The UrlFetcher does not fetch from file shares; " +
"please use the FileSystemFetcher");