[
https://issues.apache.org/jira/browse/NUTCH-2365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16294078#comment-16294078
]
ASF GitHub Bot commented on NUTCH-2365:
---------------------------------------
sebastian-nagel opened a new pull request #264: NUTCH-2365 Fetcher to respect
db.ignore.external.links.mode for redirects
URL: https://github.com/apache/nutch/pull/264
- restructure method handleRedirects: result of URL filters is checked early
- simplify debug logging calls
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> HTTP Redirects to SubDomains don't get crawled
> ----------------------------------------------
>
> Key: NUTCH-2365
> URL: https://issues.apache.org/jira/browse/NUTCH-2365
> Project: Nutch
> Issue Type: Bug
> Components: fetcher
> Affects Versions: 1.12
> Environment: Fedora 25
> Reporter: Sriram Nookala
> Fix For: 1.14
>
>
> Crawling a domain http://www.mercenarytrader.com which redirects to
> https://members.mercenarytrader.com which doesn't get followed by Nutch even
> though 'db.ignore.external.links' is set to 'true' and
> 'db.ignore.external.links.mode' is set to 'byDomain'.
> The bug is in FetcherThread where the comparison is by host and not by
> domain
> String origHost = new URL(urlString).getHost().toLowerCase();
> > String newHost = new URL(newUrl).getHost().toLowerCase();
> > if (ignoreExternalLinks) {
> > if (!origHost.equals(newHost)) {
> > if (LOG.isDebugEnabled()) {
> > LOG.debug(" - ignoring redirect " + redirType + " from "
> > + urlString + " to " + newUrl
> > + " because external links are ignored");
> > }
> > return null;
> > }
> > }
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)