BUGFIX for my last commit

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1306 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
borg-0300 19 years ago
parent 537a819824
commit 9d8dca750e

@ -521,7 +521,7 @@ public final class plasmaHTCache {
public File getCachePath(URL url) { public File getCachePath(URL url) {
// this.log.logFinest("plasmaHTCache: getCachePath: IN=" + url.toString()); // this.log.logFinest("plasmaHTCache: getCachePath: IN=" + url.toString());
String path = url.getPath(); String path = url.getPath();
String query = url.getQuery().replaceAll("[\"\\/:*?<>|]", "_"); // yes this is not reversible, but that is not needed (really?) String query = url.getQuery();
if (!path.startsWith("/")) { path = "/" + path; } if (!path.startsWith("/")) { path = "/" + path; }
if (path.endsWith("/") && query == null) { path = path + "ndx"; } if (path.endsWith("/") && query == null) { path = path + "ndx"; }
@ -531,8 +531,9 @@ public final class plasmaHTCache {
path = matcher.replaceAll("/!!/"); path = matcher.replaceAll("/!!/");
matcher.reset(path); matcher.reset(path);
} }
if (query != null) { path = path.concat("_").concat(query); } if (query != null) {
path = path.concat("_").concat(query.replaceAll("[\"\\/:*?<>|]", "_")); // yes this is not reversible, but that is not needed
}
// only set NO default ports // only set NO default ports
int port = url.getPort(); int port = url.getPort();
String protocol = url.getProtocol(); String protocol = url.getProtocol();

Loading…
Cancel
Save