Util: Fix corruption of cached ReusableGZIPInputStreams,

caused by calling close() from HTTPResponseOutputStream.Pusher,
but close() rendered the underlying InflaterInputStream unusable.
Broken in -15. Caused failed HTTP fetches and other flakiness.
This commit is contained in:
zzz
2015-05-11 00:08:26 +00:00
parent 7f30f481b2
commit f25d2a3d3f
3 changed files with 20 additions and 1 deletions

View File

@ -168,6 +168,21 @@ public class ResettableGZIPInputStream extends InflaterInputStream {
}
}
/**
* Does NOT call super.close(), as it cannot be reused if we do that.
* Broken before 0.9.20.
* @since 0.9.20
*/
@Override
public void close() throws IOException {
len = 0;
inf.reset();
_complete = false;
_crc32.reset();
_buf1[0] = 0x0;
_extraByteInputStream.close();
}
/**
* Moved from i2ptunnel HTTPResponseOutputStream.InternalGZIPInputStream
* @since 0.8.9

View File

@ -1,4 +1,8 @@
2015-05-11 zzz
* Util: Fix corruption of cached ReusableGZIPInputStreams
2015-05-09 zzz
* i2ptunnel: Improve error handling in UDP tunnels
* Plugins: Add support for custom icons (ticket #1550)
2015-05-08 zzz

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 19;
public final static long BUILD = 20;
/** for example "-test" */
public final static String EXTRA = "-rc";