I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 49d6f501 authored by jrandom's avatar jrandom Committed by zzz
Browse files

* Properly expand the HTTP response header buffer (thanks shendaras!)

parent 4a830e42
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ class HTTPResponseOutputStream extends FilterOutputStream {
protected ByteArray _headerBuffer;
private boolean _headerWritten;
private byte _buf1[];
private static final int CACHE_SIZE = 4096;
private static final int CACHE_SIZE = 8*1024;
public HTTPResponseOutputStream(OutputStream raw) {
super(raw);
......@@ -86,7 +86,9 @@ class HTTPResponseOutputStream extends FilterOutputStream {
if (_headerBuffer.getValid() + 1 >= _headerBuffer.getData().length) {
int newSize = (int)(_headerBuffer.getData().length * 1.5);
ByteArray newBuf = new ByteArray(new byte[newSize]);
System.arraycopy(_headerBuffer.getData(), 0, newBuf, 0, _headerBuffer.getValid());
System.arraycopy(_headerBuffer.getData(), 0, newBuf.getData(), 0, _headerBuffer.getValid());
newBuf.setValid(_headerBuffer.getValid());
newBuf.setOffset(0);
if (_headerBuffer.getData().length == CACHE_SIZE)
_cache.release(_headerBuffer);
_headerBuffer = newBuf;
......
$Id: history.txt,v 1.164 2005/03/04 21:54:42 jrandom Exp $
$Id: history.txt,v 1.165 2005/03/06 19:07:27 jrandom Exp $
* 2005-03-06 0.5.0.2 released
......@@ -10,6 +10,7 @@ $Id: history.txt,v 1.164 2005/03/04 21:54:42 jrandom Exp $
* Added a startRouter.sh script to new installs which simply calls
"sh i2prouter start". This should make it clear how people should start
I2P.
* Properly expand the HTTP response header buffer (thanks shendaras!)
2005-03-04 jrandom
* Filter HTTP response headers in the eepproxy, forcing Connection: close
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment