mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-21 00:00:13 +02:00
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:
parent
e34e07e0a1
commit
0b73f2b132
|
@ -431,7 +431,21 @@ public final class plasmaHTCache {
|
||||||
int p = s.indexOf("/");
|
int p = s.indexOf("/");
|
||||||
if (p < 0) p = s.indexOf("\\");
|
if (p < 0) p = s.indexOf("\\");
|
||||||
if (p < 0) return null;
|
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 {
|
public httpHeader getCachedResponse(String urlHash) throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user