|
|
@ -109,13 +109,9 @@ public class URL {
|
|
|
|
if (relPath == null) throw new MalformedURLException("relPath is null");
|
|
|
|
if (relPath == null) throw new MalformedURLException("relPath is null");
|
|
|
|
int p = relPath.indexOf(':');
|
|
|
|
int p = relPath.indexOf(':');
|
|
|
|
String relprotocol = (p < 0) ? null : relPath.substring(0, p).toLowerCase();
|
|
|
|
String relprotocol = (p < 0) ? null : relPath.substring(0, p).toLowerCase();
|
|
|
|
if (relprotocol != null) {
|
|
|
|
if (relprotocol != null && "http.https.ftp.mailto".indexOf(relprotocol) >= 0) {
|
|
|
|
if ("http.https.ftp.mailto".indexOf(relprotocol) >= 0) {
|
|
|
|
|
|
|
|
parseURLString(relPath);
|
|
|
|
parseURLString(relPath);
|
|
|
|
} else {
|
|
|
|
} else if (relprotocol == null || relprotocol.equals("javascript")) {
|
|
|
|
throw new MalformedURLException("unknown protocol: " + relprotocol);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.protocol = baseURL.protocol;
|
|
|
|
this.protocol = baseURL.protocol;
|
|
|
|
this.host = baseURL.host;
|
|
|
|
this.host = baseURL.host;
|
|
|
|
this.port = baseURL.port;
|
|
|
|
this.port = baseURL.port;
|
|
|
@ -149,6 +145,8 @@ public class URL {
|
|
|
|
identRef();
|
|
|
|
identRef();
|
|
|
|
identQuest();
|
|
|
|
identQuest();
|
|
|
|
escape();
|
|
|
|
escape();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
throw new MalformedURLException("unknown protocol: " + relprotocol);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -525,7 +523,9 @@ public class URL {
|
|
|
|
new String[]{"http://www.anomic.de/home", "news:de.test"},
|
|
|
|
new String[]{"http://www.anomic.de/home", "news:de.test"},
|
|
|
|
new String[]{"http://www.anomic.de/home", "ftp://ftp.anomic.de/src"},
|
|
|
|
new String[]{"http://www.anomic.de/home", "ftp://ftp.anomic.de/src"},
|
|
|
|
new String[]{null, "ftp://ftp.delegate.org/"},
|
|
|
|
new String[]{null, "ftp://ftp.delegate.org/"},
|
|
|
|
new String[]{"http://www.anomic.de/home", "ftp://ftp.delegate.org/"}
|
|
|
|
new String[]{"http://www.anomic.de/home", "ftp://ftp.delegate.org/"},
|
|
|
|
|
|
|
|
new String[]{"http://www.anomic.de","mailto:yacy@weltherrschaft.org"},
|
|
|
|
|
|
|
|
new String[]{"http://www.anomic.de","javascipt:temp"}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
String environment, url;
|
|
|
|
String environment, url;
|
|
|
|
de.anomic.net.URL aURL = null;
|
|
|
|
de.anomic.net.URL aURL = null;
|
|
|
|