diff --git a/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java b/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java index 9dedd8eca..8bb388d87 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/NewsFetcher.java @@ -24,6 +24,7 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener { private Log _log; private boolean _updateAvailable; private long _lastFetch; + private String _lastModified; private static NewsFetcher _instance; //public static final synchronized NewsFetcher getInstance() { return _instance; } public static final synchronized NewsFetcher getInstance(I2PAppContext ctx) { @@ -105,11 +106,12 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener { proxyPort = Integer.parseInt(port); EepGet get = null; if (shouldProxy) - get = new EepGet(_context, proxyHost, proxyPort, 10, TEMP_NEWS_FILE, newsURL); + get = new EepGet(_context, true, proxyHost, proxyPort, 2, TEMP_NEWS_FILE, newsURL, true, null, _lastModified); else - get = new EepGet(_context, 10, TEMP_NEWS_FILE, newsURL); + get = new EepGet(_context, false, null, 0, 0, TEMP_NEWS_FILE, newsURL, true, null, _lastModified); get.addStatusListener(this); - get.fetch(); + if (get.fetch()) + _lastModified = get.getLastModified(); } catch (Throwable t) { _log.error("Error fetching the news", t); } @@ -212,8 +214,8 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener { _log.error("Failed to copy the news file!"); } } else { - if (_log.shouldLog(Log.ERROR)) - _log.error("Transfer complete, but no file?"); + if (_log.shouldLog(Log.WARN)) + _log.warn("Transfer complete, but no file? - probably 304 Not Modified"); } checkForUpdates(); } diff --git a/history.txt b/history.txt index 80351e956..cf203b21f 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,4 @@ -$Id: history.txt,v 1.612 2008-01-07 03:09:44 zzz Exp $ +$Id: history.txt,v 1.613 2008-01-08 21:15:45 zzz Exp $ 2008-01-08 zzz * addressbook: Limit size of subscribed hosts.txt, @@ -7,6 +7,11 @@ $Id: history.txt,v 1.612 2008-01-07 03:09:44 zzz Exp $ enforce size limits even when size not in returned header, don't return old etag or last-modified data, don't call transferFailed listener more than once + * Sign my update signing key + * NewsFetcher: add last-modified support, reduce number of retries + * Error pages: add icon and logo, + clarify 'destination not found' and 'proxy not found' pages + 2008-01-07 zzz * profiles.jsp formatting cleanup diff --git a/installer/resources/ahelper-conflict-header.ht b/installer/resources/ahelper-conflict-header.ht index b05f8029a..3b80e582f 100644 --- a/installer/resources/ahelper-conflict-header.ht +++ b/installer/resources/ahelper-conflict-header.ht @@ -6,6 +6,7 @@ Proxy-Connection: close