forked from I2P_Developers/i2p.i2p
* 2004-12-01 0.4.2.2 released
2004-12-01 jrandom * Fixed a stupid typo that inadvertantly allowed persistent HTTP connections to work (thanks duck!) * Make sure we override the inactivity timeout too
This commit is contained in:
@ -147,15 +147,20 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
|
||||
|
||||
private static final int DEFAULT_READ_TIMEOUT = 60*1000;
|
||||
|
||||
|
||||
/**
|
||||
* create the default options (using the default timeout, etc)
|
||||
*
|
||||
*/
|
||||
protected I2PSocketOptions getDefaultOptions() {
|
||||
I2PSocketOptions opts = super.getDefaultOptions();
|
||||
Properties defaultOpts = getTunnel().getClientOptions();
|
||||
if (!defaultOpts.contains(I2PSocketOptions.PROP_READ_TIMEOUT))
|
||||
opts.setReadTimeout(DEFAULT_READ_TIMEOUT);
|
||||
defaultOpts.setProperty(I2PSocketOptions.PROP_READ_TIMEOUT, ""+DEFAULT_READ_TIMEOUT);
|
||||
if (!defaultOpts.contains("i2p.streaming.inactivityTimeout"))
|
||||
defaultOpts.setProperty("i2p.streaming.inactivityTimeout", ""+DEFAULT_READ_TIMEOUT);
|
||||
I2PSocketOptions opts = sockMgr.buildOptions(defaultOpts);
|
||||
if (!defaultOpts.containsKey(I2PSocketOptions.PROP_CONNECT_TIMEOUT))
|
||||
opts.setConnectTimeout(DEFAULT_CONNECT_TIMEOUT);
|
||||
return opts;
|
||||
}
|
||||
|
||||
@ -164,14 +169,18 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
|
||||
*
|
||||
*/
|
||||
protected I2PSocketOptions getDefaultOptions(Properties overrides) {
|
||||
I2PSocketOptions opts = super.getDefaultOptions(overrides);
|
||||
Properties defaultOpts = getTunnel().getClientOptions();
|
||||
defaultOpts.putAll(overrides);
|
||||
if (!defaultOpts.containsKey(I2PSocketOptions.PROP_READ_TIMEOUT))
|
||||
opts.setConnectTimeout(DEFAULT_READ_TIMEOUT);
|
||||
if (!defaultOpts.contains(I2PSocketOptions.PROP_READ_TIMEOUT))
|
||||
defaultOpts.setProperty(I2PSocketOptions.PROP_READ_TIMEOUT, ""+DEFAULT_READ_TIMEOUT);
|
||||
if (!defaultOpts.contains("i2p.streaming.inactivityTimeout"))
|
||||
defaultOpts.setProperty("i2p.streaming.inactivityTimeout", ""+DEFAULT_READ_TIMEOUT);
|
||||
I2PSocketOptions opts = sockMgr.buildOptions(defaultOpts);
|
||||
if (!defaultOpts.containsKey(I2PSocketOptions.PROP_CONNECT_TIMEOUT))
|
||||
opts.setConnectTimeout(DEFAULT_CONNECT_TIMEOUT);
|
||||
return opts;
|
||||
}
|
||||
|
||||
|
||||
private static long __requestId = 0;
|
||||
protected void clientConnectionRun(Socket s) {
|
||||
OutputStream out = null;
|
||||
@ -348,7 +357,7 @@ public class I2PTunnelHTTPClient extends I2PTunnelClientBase implements Runnable
|
||||
}
|
||||
|
||||
if (line.length() == 0) {
|
||||
newRequest.append("User-Agent: MYOB/6.66 (AN/ON)");
|
||||
newRequest.append("User-Agent: MYOB/6.66 (AN/ON)\r\n");
|
||||
newRequest.append("Connection: close\r\n\r\n");
|
||||
break;
|
||||
} else {
|
||||
|
@ -1,4 +1,11 @@
|
||||
$Id: history.txt,v 1.90 2004/11/30 18:41:52 jrandom Exp $
|
||||
$Id: history.txt,v 1.91 2004/12/01 17:31:56 jrandom Exp $
|
||||
|
||||
* 2004-12-01 0.4.2.2 released
|
||||
|
||||
2004-12-01 jrandom
|
||||
* Fixed a stupid typo that inadvertantly allowed persistent HTTP
|
||||
connections to work (thanks duck!)
|
||||
* Make sure we override the inactivity timeout too
|
||||
|
||||
* 2004-12-01 0.4.2.1 released
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<info>
|
||||
<appname>i2p</appname>
|
||||
<appversion>0.4.2.1</appversion>
|
||||
<appversion>0.4.2.2</appversion>
|
||||
<authors>
|
||||
<author name="I2P" email="support@i2p.net"/>
|
||||
</authors>
|
||||
|
@ -15,8 +15,8 @@ import net.i2p.CoreVersion;
|
||||
*
|
||||
*/
|
||||
public class RouterVersion {
|
||||
public final static String ID = "$Revision: 1.95 $ $Date: 2004/11/30 18:41:51 $";
|
||||
public final static String VERSION = "0.4.2.1";
|
||||
public final static String ID = "$Revision: 1.96 $ $Date: 2004/12/01 17:31:56 $";
|
||||
public final static String VERSION = "0.4.2.2";
|
||||
public final static long BUILD = 0;
|
||||
public static void main(String args[]) {
|
||||
System.out.println("I2P Router version: " + VERSION);
|
||||
|
Reference in New Issue
Block a user