small change

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1029 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
borg-0300 20 years ago
parent 60e869f236
commit 5fb2b017cb

@ -429,13 +429,9 @@ public final class plasmaHTCache {
public File getCachePath(URL url) {
// this.log.logFinest("plasmaHTCache: getCachePath: IN=" + url.toString());
String remotePath = url.getPath();
if (!remotePath.startsWith("/")) remotePath = "/" + remotePath;
if (remotePath.indexOf('#') > 0) {
remotePath.substring(0, remotePath.indexOf('#'));
} else if (remotePath.endsWith("/")) {
remotePath = remotePath + "ndx";
}
remotePath = remotePath.replaceAll("[?&:]", "_"); // yes this is not reversible, but that is not needed
if (remotePath.endsWith("/")) { remotePath = remotePath + "ndx"; }
if (!remotePath.startsWith("/")) { remotePath = "/" + remotePath; }
// remotePath = remotePath.replaceAll("[?&:]", "_"); // yes this is not reversible, but that is not needed
int port = url.getPort();
if (port < 0) {
if (url.getProtocol().equalsIgnoreCase("http")) port = 80;

Loading…
Cancel
Save