2006-02-16 jrandom

* Bugfix to the I2PTunnel web config to properly accept i2cp port settings
    * Initial sucker refactoring to simplify reuse of the html parsing
    * Beginnings of hooks to push imported rss/atom out to remote syndie
      archives automatically (though not enabled currently)
    * Further SSU peer test cleanup
This commit is contained in:
jrandom
2006-02-16 08:24:07 +00:00
committed by zzz
parent 3d76df6af3
commit 79f934fe17
15 changed files with 245 additions and 193 deletions

View File

@ -148,10 +148,18 @@ public class EepGet {
}
public static String suggestName(String url) {
int last = url.lastIndexOf('/');
if ((last < 0) || (url.lastIndexOf('#') > last))
last = url.lastIndexOf('#');
if ((last < 0) || (url.lastIndexOf('?') > last))
last = url.lastIndexOf('?');
if ((last < 0) || (url.lastIndexOf('=') > last))
last = url.lastIndexOf('=');
String name = null;
if (url.lastIndexOf('/') >= 0)
name = sanitize(url.substring(url.lastIndexOf('/')+1));
if (name != null)
if (last >= 0)
name = sanitize(url.substring(last+1));
if ( (name != null) && (name.length() > 0) )
return name;
else
return sanitize(url);