This is an automated email from the ASF dual-hosted git repository.

snagel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git


The following commit(s) were added to refs/heads/master by this push:
     new ea9c7ee5d NUTCH-3039 Failure to handle ftp:// URLs
ea9c7ee5d is described below

commit ea9c7ee5d6635405b31b4a1d462cca746478b040
Author: Sebastian Nagel <[email protected]>
AuthorDate: Thu Apr 11 13:28:37 2024 +0200

    NUTCH-3039 Failure to handle ftp:// URLs
    
    Pass ftp:// URLs to the standard JVM URLStreamHandler
---
 src/java/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 bd7e377d0..0916f4c9d 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();

Reply via email to