diff --git a/core/java/src/net/i2p/util/EepGet.java b/core/java/src/net/i2p/util/EepGet.java index 6c16d329111ea3d0290707a04d31a1c5f4837549..edf490241e3a0a391d37de955260f52b786ec40f 100644 --- a/core/java/src/net/i2p/util/EepGet.java +++ b/core/java/src/net/i2p/util/EepGet.java @@ -304,12 +304,16 @@ public class EepGet { readHeaders(); if (_log.shouldLog(Log.DEBUG)) _log.debug("Headers read completely, reading " + _bytesRemaining); - + + boolean strictSize = (_bytesRemaining >= 0); + int remaining = (int)_bytesRemaining; byte buf[] = new byte[1024]; - while (_keepFetching && remaining > 0) { + while (_keepFetching && ( (remaining > 0) || !strictSize )) { int toRead = buf.length; - int read = _proxyIn.read(buf, 0, (buf.length > remaining ? remaining : buf.length)); + if (strictSize && toRead > remaining) + toRead = remaining; + int read = _proxyIn.read(buf, 0, toRead); if (read == -1) break; _out.write(buf, 0, read); diff --git a/history.txt b/history.txt index 39d12f4d86080c58d65720637718f280f22be3bf..5ca4882478551d5e76f4083b2be47d3e8ad15229 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,8 @@ -$Id: history.txt,v 1.184 2005/04/01 06:28:07 jrandom Exp $ +$Id: history.txt,v 1.185 2005/04/01 08:29:27 jrandom Exp $ + +2005-04-03 jrandom + * EepGet fix for open-ended HTTP fetches (such as the news.xml + feeding the NewsFetcher) 2005-04-01 jrandom * Allow editing I2PTunnel server instances with five digit ports diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index b74d7f7408a50da0cd0bee351ab7afbd3ca76ddd..6e660a41632d9aa713afb4c33d04bd409d3331bb 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -15,9 +15,9 @@ import net.i2p.CoreVersion; * */ public class RouterVersion { - public final static String ID = "$Revision: 1.177 $ $Date: 2005/04/01 06:28:06 $"; + public final static String ID = "$Revision: 1.178 $ $Date: 2005/04/01 08:29:26 $"; public final static String VERSION = "0.5.0.5"; - public final static long BUILD = 2; + public final static long BUILD = 3; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION); System.out.println("Router ID: " + RouterVersion.ID);