From ea9c7ee5d6635405b31b4a1d462cca746478b040 Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Thu, 11 Apr 2024 13:28:37 +0200 Subject: [PATCH] NUTCH-3039 Failure to handle ftp:// URLs Pass ftp:// URLs to the standard JVM URLStreamHandler --- .../org/apache/nutch/plugin/URLStreamHandlerFactory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/nutch/plugin/URLStreamHandlerFactory.java b/src/java/org/apache/nutch/plugin/URLStreamHandlerFactory.java index bd7e377d0f..0916f4c9db 100644 --- a/src/java/org/apache/nutch/plugin/URLStreamHandlerFactory.java +++ b/src/java/org/apache/nutch/plugin/URLStreamHandlerFactory.java @@ -72,9 +72,13 @@ public class URLStreamHandlerFactory * Protocols covered by standard JVM URL handlers. These protocols must not be * handled by Nutch plugins, in order to avoid that basic actions (eg. loading * of classes and configuration files) break. + * + * Also the "ftp" protocol is included: it's usually supported by the standard + * JVM URL handler and Nutch does not yet provide a dedicated URL stream + * handler. */ public static final String[] SYSTEM_PROTOCOLS = { // - "http", "https", "file", "jar" }; + "http", "https", "file", "jar", "ftp" }; static { instance = new URLStreamHandlerFactory();