forked from I2P_Developers/i2p.i2p
single-char indexof()
This commit is contained in:
@ -432,8 +432,8 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
|
|||||||
// Deprecated
|
// Deprecated
|
||||||
// /eepproxy/foo.i2p/bar/baz.html
|
// /eepproxy/foo.i2p/bar/baz.html
|
||||||
String subRequest = request.substring("/eepproxy/".length());
|
String subRequest = request.substring("/eepproxy/".length());
|
||||||
if(subRequest.indexOf("/") == -1) {
|
if(subRequest.indexOf('/') == -1) {
|
||||||
subRequest += "/";
|
subRequest += '/';
|
||||||
}
|
}
|
||||||
request = "http://" + subRequest;
|
request = "http://" + subRequest;
|
||||||
/****
|
/****
|
||||||
@ -537,10 +537,10 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
|
|||||||
} else if(hostLowerCase.equals("i2p")) {
|
} else if(hostLowerCase.equals("i2p")) {
|
||||||
// pull the b64 _dest out of the first path element
|
// pull the b64 _dest out of the first path element
|
||||||
String oldPath = requestURI.getPath().substring(1);
|
String oldPath = requestURI.getPath().substring(1);
|
||||||
int slash = oldPath.indexOf("/");
|
int slash = oldPath.indexOf('/');
|
||||||
if(slash < 0) {
|
if(slash < 0) {
|
||||||
slash = oldPath.length();
|
slash = oldPath.length();
|
||||||
oldPath += "/";
|
oldPath += '/';
|
||||||
}
|
}
|
||||||
String _dest = oldPath.substring(0, slash);
|
String _dest = oldPath.substring(0, slash);
|
||||||
if(slash >= 516 && !_dest.contains(".")) {
|
if(slash >= 516 && !_dest.contains(".")) {
|
||||||
|
Reference in New Issue
Block a user