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
commit 5b3cf0e2028aed576d080be70fc9028796616b94 Author: Sebastian Nagel <[email protected]> AuthorDate: Tue Dec 5 11:49:44 2017 +0100 NUTCH-2451 protocol-ftp to resolve relative URL when following redirects - return empty protocol output instead of throwing exception if relative redirect URL fails to resolve - format source code - complete LOG message --- .../protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Ftp.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Ftp.java b/src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Ftp.java index ae73941..eeba776 100644 --- a/src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Ftp.java +++ b/src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Ftp.java @@ -147,10 +147,9 @@ public class Ftp implements Protocol { String loc = response.getHeader("Location"); try { u = new URL(u, loc); - } - catch(MalformedURLException mue) { + } catch (MalformedURLException mue) { LOG.error("Could not create redirectURL for {} with {}", url, loc); - throw mue; + return new ProtocolOutput(null, new ProtocolStatus(mue)); } redirects++; @@ -162,7 +161,8 @@ public class Ftp implements Protocol { } } } catch (Exception e) { - LOG.error("Could not get protocol output for {}", url, e); + LOG.error("Could not get protocol output for {}: {}", url, + e.getMessage()); return new ProtocolOutput(null, new ProtocolStatus(e)); } } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
