forked from I2P_Developers/i2p.i2p
- Add https support for news fetch
This commit is contained in:
@ -31,6 +31,7 @@ import net.i2p.util.EepGet;
|
|||||||
import net.i2p.util.EepHead;
|
import net.i2p.util.EepHead;
|
||||||
import net.i2p.util.FileUtil;
|
import net.i2p.util.FileUtil;
|
||||||
import net.i2p.util.Log;
|
import net.i2p.util.Log;
|
||||||
|
import net.i2p.util.SSLEepGet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Task to fetch updates to the news.xml, and to keep
|
* Task to fetch updates to the news.xml, and to keep
|
||||||
@ -88,6 +89,9 @@ class NewsFetcher extends UpdateRunner {
|
|||||||
EepGet get;
|
EepGet get;
|
||||||
if (shouldProxy)
|
if (shouldProxy)
|
||||||
get = new EepGet(_context, true, proxyHost, proxyPort, 0, _tempFile.getAbsolutePath(), newsURL, true, null, _lastModified);
|
get = new EepGet(_context, true, proxyHost, proxyPort, 0, _tempFile.getAbsolutePath(), newsURL, true, null, _lastModified);
|
||||||
|
else if ("https".equals(uri.getScheme()))
|
||||||
|
// no constructor w/ last mod check
|
||||||
|
get = new SSLEepGet(_context, _tempFile.getAbsolutePath(), newsURL);
|
||||||
else
|
else
|
||||||
get = new EepGet(_context, false, null, 0, 0, _tempFile.getAbsolutePath(), newsURL, true, null, _lastModified);
|
get = new EepGet(_context, false, null, 0, 0, _tempFile.getAbsolutePath(), newsURL, true, null, _lastModified);
|
||||||
get.addStatusListener(this);
|
get.addStatusListener(this);
|
||||||
|
Reference in New Issue
Block a user