I2PSocketEepGet: Fix i2psnark NPE caused by -6 (ticket #1543)

This commit is contained in:
zzz
2015-04-22 20:34:04 +00:00
parent 238501919b
commit cbe91e3012
3 changed files with 12 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ public class EepGet {
protected List<String> _extraHeaders; protected List<String> _extraHeaders;
protected boolean _keepFetching; protected boolean _keepFetching;
// The proxy or the actual site if not proxied. Warning - null when extended by I2PSocketEepGet
protected Socket _proxy; protected Socket _proxy;
protected OutputStream _proxyOut; protected OutputStream _proxyOut;
protected InputStream _proxyIn; protected InputStream _proxyIn;
@@ -678,7 +679,8 @@ public class EepGet {
else else
timeout.setInactivityTimeout(INACTIVITY_TIMEOUT); timeout.setInactivityTimeout(INACTIVITY_TIMEOUT);
} }
if (!_shouldProxy) { // _proxy is null when extended by I2PSocketEepGet
if (_proxy != null && !_shouldProxy) {
// we only set the soTimeout before the headers if not proxied // we only set the soTimeout before the headers if not proxied
if (_fetchInactivityTimeout > 0) if (_fetchInactivityTimeout > 0)
_proxy.setSoTimeout(_fetchInactivityTimeout); _proxy.setSoTimeout(_fetchInactivityTimeout);
@@ -914,10 +916,12 @@ public class EepGet {
return; return;
case 400: // bad req case 400: // bad req
case 401: // server auth case 401: // server auth
case 402: // payment required
case 403: // bad req case 403: // bad req
case 404: // not found case 404: // not found
case 408: // req timeout case 408: // req timeout
case 409: // bad addr helper case 409: // bad addr helper
case 410: // gone
case 414: // URI too long case 414: // URI too long
case 429: // too many requests case 429: // too many requests
case 431: // headers too long case 431: // headers too long

View File

@@ -1,3 +1,9 @@
2015-04-22 zzz
* i2psnark: Fix deletion of config files, cleanup old ones (ticket #1498)
* I2PSocketEepGet: Fix i2psnark NPE caused by -6 (ticket #1543)
* NTCP: Reduce min send finisher threads to 1
* PortMapper: Status output for /debug
2015-04-21 zzz 2015-04-21 zzz
* i2ptunnel: Log uncaught errors in thread pool * i2ptunnel: Log uncaught errors in thread pool
* Reseed: Disable non-su3 reseeding * Reseed: Disable non-su3 reseeding

View File

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