forked from I2P_Developers/i2p.i2p
UPnP Fix for devices that return base URLs with trailing '/' (ticket #986)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
2012-07-24 zzz
|
||||
* GeoIP: Fix lookups, broken in IPv6 branch
|
||||
* UPnP: main() tweaks for debugging
|
||||
* UPnP:
|
||||
- main() tweaks for debugging
|
||||
- Fix for devices that return base URLs with trailing '/' (ticket #986)
|
||||
|
||||
2012-07-22 zzz
|
||||
* BuildReplyHandler:
|
||||
|
||||
@@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 9;
|
||||
public final static long BUILD = 10;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
||||
@@ -283,6 +283,9 @@ public class Device implements org.cybergarage.http.HTTPRequestListener, SearchL
|
||||
}
|
||||
|
||||
urlString = HTTP.toRelativeURL(urlString);
|
||||
// I2P fix for devices that return a base URL with trailing /
|
||||
if (urlBaseStr.endsWith("/") && urlString.startsWith("/"))
|
||||
urlString = urlString.substring(1);
|
||||
String absUrl = urlBaseStr + urlString;
|
||||
try {
|
||||
URL url = new URL(absUrl);
|
||||
|
||||
Reference in New Issue
Block a user