core/com.nokia.carbide.cpp.news.reader/src/com/nokia/carbide/cpp/internal/news/reader/gen/FeedInfo/FeedInfoManager.java
--- a/core/com.nokia.carbide.cpp.news.reader/src/com/nokia/carbide/cpp/internal/news/reader/gen/FeedInfo/FeedInfoManager.java Tue Aug 11 14:22:33 2009 -0500
+++ b/core/com.nokia.carbide.cpp.news.reader/src/com/nokia/carbide/cpp/internal/news/reader/gen/FeedInfo/FeedInfoManager.java Tue Aug 11 15:01:16 2009 -0500
@@ -21,10 +21,14 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
+import java.net.InetSocketAddress;
+import java.net.Proxy;
+import java.net.SocketAddress;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
+import org.eclipse.core.net.proxy.IProxyData;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -133,7 +137,20 @@
HttpURLConnection connection = null;
InputStream inputStream = null;
try {
- connection = (HttpURLConnection) fileUrl.openConnection();
+ Proxy proxy = null;
+ IProxyData data = CarbideNewsReaderPlugin.getProxyData(fileUrl);
+ if (data != null) {
+ String host = data.getHost();
+ int port = data.getPort();
+ SocketAddress address = new InetSocketAddress(host, port);
+ proxy = new Proxy(Proxy.Type.HTTP, address);
+ }
+ if (proxy != null) {
+ connection = (HttpURLConnection) fileUrl.openConnection(proxy);
+ }
+ else {
+ connection = (HttpURLConnection) fileUrl.openConnection();
+ }
setRequestHeaders(connection);
connection.setUseCaches(false);
connection.connect();