|
|
|
@ -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;
|
|
|
|
|