mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-09 23:43:29 +00:00
apply to h3 noah's fix
[HER-1510] meta refresh url from a seed considered as a seed * LinksScoper.java (considerAsSeed) return true any seed with hop type Hop.REFER, which includes meta refreshes; also simplify the code a bit
This commit is contained in:
1 parent
2dec5dfd1a
commit
2c7c07ba64
1 file changed
+2
-11
@@ -254,17 +254,8 @@ public class LinksScoper extends Scoper implements PostProcessor {
|
||||
|
||||
private boolean considerAsSeed(final CrawlURI curi, final Link wref,
|
||||
final boolean redirectsNewSeeds) {
|
||||
// Check if this is a seed with a 301 or 302.
|
||||
if (curi.isSeed()
|
||||
&& (curi.getFetchStatus() == 301 ||
|
||||
curi.getFetchStatus() == 302)
|
||||
&& wref.getHopType() == Hop.REFER) {
|
||||
// Check if redirects from seeds should be treated as seeds.
|
||||
if (redirectsNewSeeds) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return redirectsNewSeeds && curi.isSeed()
|
||||
&& wref.getHopType() == Hop.REFER;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user