This commit is contained in:
zzz
2014-05-25 19:23:04 +00:00
parent ef96c88719
commit c28f707f55
3 changed files with 8 additions and 8 deletions

View File

@@ -78,12 +78,6 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
"Your browser is misconfigured. Do not use the proxy to access the router console or other localhost destinations.<BR>")
.getBytes();
final static byte[] SUCCESS_RESPONSE =
("HTTP/1.1 200 Connection Established\r\n"+
"Proxy-agent: I2P\r\n"+
"\r\n")
.getBytes();
/**
* @throws IllegalArgumentException if the I2PTunnel does not contain
* valid config to contact the router

View File

@@ -966,7 +966,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
byte[] response;
if (method.toUpperCase(Locale.US).equals("CONNECT")) {
data = null;
response = I2PTunnelConnectClient.SUCCESS_RESPONSE;
response = SUCCESS_RESPONSE;
} else {
data = newRequest.toString().getBytes("ISO-8859-1");
response = null;
@@ -1099,7 +1099,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelHTTPClientBase implements Runn
response = null;
} else {
data = null;
response = I2PTunnelConnectClient.SUCCESS_RESPONSE;
response = SUCCESS_RESPONSE;
}
Thread t = new I2PTunnelRunner(s, i2ps, sockLock, data, response, mySockets, onTimeout);
t.start();

View File

@@ -93,6 +93,12 @@ public abstract class I2PTunnelHTTPClientBase extends I2PTunnelClientBase implem
"be temporarily offline. You may want to <b>retry</b>. " +
"Could not find the following Destination:<BR><BR><div>").getBytes();
protected final static byte[] SUCCESS_RESPONSE =
("HTTP/1.1 200 Connection Established\r\n"+
"Proxy-agent: I2P\r\n"+
"\r\n")
.getBytes();
private final byte[] _proxyNonce;
private final ConcurrentHashMap<String, NonceInfo> _nonces;
private final AtomicInteger _nonceCleanCounter = new AtomicInteger();