diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java index da713ae49c520b6933bf941f8463beb83be0593e..9e74f5fe4169e536559928d0f6d9688180d3d0a4 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPClient.java @@ -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 { diff --git a/history.txt b/history.txt index 86fce2247e0b0453eb9961eda1033d1c024f09d1..b3352233e5001c80f6399fa7dbc76d6fead83264 100644 --- a/history.txt +++ b/history.txt @@ -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 diff --git a/installer/install.xml b/installer/install.xml index 4ecb5d67904e2616e2113c72d12c4cccaf65d4f6..8fa21dfb0a5cc2f9761904ba48fa3b249079a6d4 100644 --- a/installer/install.xml +++ b/installer/install.xml @@ -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> diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index e2173aa8be9bdd4c802e3dd0f8ca19ac706f9b35..6228f95e50f32ac4547c83bffc5fa7fab4cafa6c 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -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);