forked from I2P_Developers/i2p.i2p
2005-03-04 jrandom
* Filter HTTP response headers in the eepproxy, forcing Connection: close
so that broken (/malicious) webservers can't allow persistent
connections. All HTTP compliant browsers should now always close the
socket.
* Enabled the GZIPInputStream's cache (they were'nt cached before)
* Make sure our first send is always a SYN (duh)
* Workaround for some buggy compilers
This commit is contained in:
@@ -238,8 +238,8 @@ public class OrderedProperties extends Properties {
|
||||
|
||||
public int compareTo(Object o) {
|
||||
if (o == null) return -1;
|
||||
if (o instanceof StringMapEntry) return ((String) getKey()).compareTo(((StringMapEntry) o).getKey());
|
||||
if (o instanceof String) return ((String) getKey()).compareTo(o);
|
||||
if (o instanceof StringMapEntry) return ((String) getKey()).compareTo((String)((StringMapEntry) o).getKey());
|
||||
if (o instanceof String) return ((String) getKey()).compareTo((String)o);
|
||||
return -2;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.i2p.data.DataHelper;
|
||||
*
|
||||
*/
|
||||
public class ReusableGZIPInputStream extends ResettableGZIPInputStream {
|
||||
private static ArrayList _available = new ArrayList(16);
|
||||
private static ArrayList _available = new ArrayList(8);
|
||||
/**
|
||||
* Pull a cached instance
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ public class ReusableGZIPInputStream extends ResettableGZIPInputStream {
|
||||
*/
|
||||
public static void release(ReusableGZIPInputStream released) {
|
||||
synchronized (_available) {
|
||||
if (_available.size() < 16)
|
||||
if (_available.size() < 8)
|
||||
_available.add(released);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user