2005-10-04 jrandom
* Further reduction in unnecessary streaming packets.
This commit is contained in:
@ -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();
|
||||
|
@ -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) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user