- fix for bad url conversion in bookmarks when using smb urls

- fix for localhost hosts in solr schema host handling
pull/1/head
orbiter 12 years ago
parent e80dfeca23
commit a4a780b871

@ -513,7 +513,7 @@ public class BookmarksDB {
}
public Bookmark(final String url) throws MalformedURLException {
this(new DigestURI((!url.toLowerCase().startsWith("http://") && !url.toLowerCase().startsWith("https://")) ? "http://" + url : url));
this(new DigestURI((url.indexOf("://") < 0) ? "http://" + url : url));
}
public Bookmark(final Map<String, String> map) throws MalformedURLException {

@ -333,7 +333,7 @@ public class SolrConfiguration extends ConfigurationSet implements Serializable
String host = null;
if ((host = digestURI.getHost()) != null) {
String dnc = Domains.getDNC(host);
String subdomOrga = host.substring(0, host.length() - dnc.length() - 1);
String subdomOrga = host.length() - dnc.length() <= 0 ? "" : host.substring(0, host.length() - dnc.length() - 1);
int p = subdomOrga.lastIndexOf('.');
String subdom = (p < 0) ? "" : subdomOrga.substring(0, p);
String orga = (p < 0) ? subdomOrga : subdomOrga.substring(p + 1);

Loading…
Cancel
Save