Repair DNS prefetch during cacheScan

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2451 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
hermens 2006-08-24 01:31:08 +00:00
parent e34e07e0a1
commit 0b73f2b132

View File

@ -431,7 +431,21 @@ public final class plasmaHTCache {
int p = s.indexOf("/");
if (p < 0) p = s.indexOf("\\");
if (p < 0) return null;
return s.substring(0, p);
// remove the protokoll
s = s.substring(p + 1);
p = s.indexOf("/");
if (p < 0) p = s.indexOf("\\");
if (p < 0) return null;
String prefix = new String("");
if (s.startsWith("www")) prefix = new String("www.");
// remove the www|other|ip directory
s = s.substring(p + 1);
p = s.indexOf("/");
if (p < 0) p = s.indexOf("\\");
if (p < 0) return null;
int e = s.indexOf("!");
if ((e > 0) && (e < p)) p = e; // strip port
return prefix + s.substring(0, p);
}
public httpHeader getCachedResponse(String urlHash) throws IOException {