|
|
|
@ -216,7 +216,13 @@ public class MultiProtocolURL implements Serializable, Comparable<MultiProtocolU
|
|
|
|
|
if (!this.protocol.equals("file") && url.substring(p + 1, p + 3).equals("//")) {
|
|
|
|
|
// identify host, userInfo and file for http and ftp protocol
|
|
|
|
|
int q = url.indexOf('/', p + 3);
|
|
|
|
|
if (q < 0) q = url.indexOf("?", p + 3); // check for www.test.com?searchpart
|
|
|
|
|
if (q < 0) { // check for www.test.com?searchpart
|
|
|
|
|
q = url.indexOf("?", p + 3);
|
|
|
|
|
} else { // check that '/' was not in searchpart (example http://test.com?data=1/2/3)
|
|
|
|
|
if (url.lastIndexOf("?",q) >= 0) {
|
|
|
|
|
q = url.lastIndexOf("?",q);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int r;
|
|
|
|
|
if (q < 0) {
|
|
|
|
|
if ((r = url.indexOf('@', p + 3)) < 0) {
|
|
|
|
|