From 4aa65c3bb3677e3d20de110807c53d25385099d1 Mon Sep 17 00:00:00 2001 From: jrandom Date: Tue, 4 Oct 2005 07:36:25 +0000 Subject: [PATCH] 2005-10-04 jrandom * Further reduction in unnecessary streaming packets. --- .../src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java | 8 ++++++-- .../java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java | 4 ++-- history.txt | 5 ++++- router/java/src/net/i2p/router/RouterVersion.java | 4 ++-- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java index b1d308950..91ec63702 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/HTTPResponseOutputStream.java @@ -66,7 +66,7 @@ class HTTPResponseOutputStream extends FilterOutputStream { if (_headerWritten) { out.write(buf, off, len); _dataWritten += len; - out.flush(); + //out.flush(); return; } @@ -82,7 +82,7 @@ class HTTPResponseOutputStream extends FilterOutputStream { // write out the remaining out.write(buf, off+i+1, len-i-1); _dataWritten += len-i-1; - out.flush(); + //out.flush(); } return; } @@ -199,6 +199,10 @@ class HTTPResponseOutputStream extends FilterOutputStream { out.write("\n".getBytes()); // end of the headers } + public void close() throws IOException { + out.close(); + } + protected void beginProcessing() throws IOException { //out.flush(); PipedInputStream pi = new PipedInputStream(); diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java index abccaa553..895d5a57c 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelHTTPServer.java @@ -192,13 +192,13 @@ public class I2PTunnelHTTPServer extends I2PTunnelServer { } if (_log.shouldLog(Log.INFO)) _log.info(_name + ": Done sending: " + total); - _out.flush(); + //_out.flush(); } catch (IOException ioe) { if (_log.shouldLog(Log.DEBUG)) _log.debug("Error sending", ioe); } finally { - if (_in != null) try { _in.close(); } catch (IOException ioe) {} if (_out != null) try { _out.close(); } catch (IOException ioe) {} + if (_in != null) try { _in.close(); } catch (IOException ioe) {} } } } diff --git a/history.txt b/history.txt index a76590435..ce6103e38 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,7 @@ -$Id: history.txt,v 1.279 2005/10/03 19:27:35 ragnarok Exp $ +$Id: history.txt,v 1.280 2005/10/03 21:05:52 jrandom Exp $ + +2005-10-04 jrandom + * Further reduction in unnecessary streaming packets. 2005-10-03 jrandom * Properly reject unroutable IP addresses *cough* diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 8768504ee..02497ad92 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.254 $ $Date: 2005/10/01 14:20:09 $"; + public final static String ID = "$Revision: 1.255 $ $Date: 2005/10/03 21:05:52 $"; public final static String VERSION = "0.6.1.1"; - public final static long BUILD = 1; + public final static long BUILD = 2; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID);