Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I am trying to read rss feeds inside our wiki application.
I am using magpierss-0.72 and Snoopy v1.0
I am able to read the HTTP feeds, but I get an error on the HTTPS feeds.
error: "Failed to load RSS feed from HTTPS://…"
I am able to read the HTTPS feed via the browser.
As another test, I edited the wgetrc file and added the proxy I.P. to HTTP_PROXY and HTTPS_PROXY, and when I did a wget from the command line on the server on the HTTPS location, it read just fine.
I edited the Snoopy.class.inc file and added the same proxy I.P. to var $proxy_host. I also set var $proxy_port. And I set var $_isproxy = "true" (although that didn't seem to affect anything either way)
Do you have any ideas how I can get this to work?
Can you paste in the code you're using, the URL you're trying to hit, and any changes you've made to the Snoopy class itself (a diff would work)? Are you trying to access the rss feed through an https proxy?
This is the code I am using in the wiki:
This is what it is displaying:
Failed to load RSS feed from https://sourceforge.net/api/post/index/forum-id/6043/topic-id/4528993/rss!
Failed to load RSS feed from https://www.cia.gov/news-information/your-news/cia-library/RSS.xml!
Failed to load RSS feed from https://www.dia.mil/rss/diarss.xml!
It works fine for HTTP
this is what I modified in /extensions/Rss/magpierss-0.72/extlib/Snoopy.class.inc
var $host = "linipeddev3o.ismc.intelink.gov"; // host name we are connecting to
var $port = 8083; // port we are connecting to
var $proxy_host = "172.16.5.18"; // proxy host to use
var $proxy_port = "80"; // proxy port to use
var $_isproxy = true; // set if using a proxy server
Additionally, in NetworkSpecificSettings.php I added:
##************ Rss Settings ****************
$rssProxyHost = "172.16.5.18";
$rssProxyPort = "80";
but I don't think it is needed.
thank you for taking the time to look into this.
it all works from the command line if I do a wget
I am behind a firewall.
Looks like your proxy server (172.16.5.18) doesn't support https. Can you get the logs from your proxy server, or ask the administrator of your proxy server if it supports proxying to https sites?
It must support https because it works for the wget. I have that server in my .wgetrc file.
Here are the results.
# wget https://www.cia.gov/news-information/your-news/cia-library/RSS.xml
-2011-05-17 15:53:00- https://www.cia.gov/news-information/your-news/cia-library/RSS.xml
Connecting to 172.16.5.18:80… connected.
Proxy request sent, awaiting response… 200 OK
Length: 18537 (18K)
Saving to: `RSS.xml'
100% 18,537 -.-K/s in 0.02s
2011-05-17 15:53:03 (1.10 MB/s) - `RSS.xml' saved
Does Snoopy version 1.0 support https. I read somewhere that it started in Version 2.0
I also saw this regarding snoopy ver. 1.0:
SJM - alpha-grade changes based on the version of Snoopy released with MagpieRSS 0.7
comments to email@example.com
1) If this is PHP 4.3 or greater, and 'openssl' is available,
use the PHP built in SSL support for "https" instead of calling curl externally.
Use of external curl can still be forced by setting $use_curl = true.
2) HTTP Digest Authentication. If you set a username and password, basic auth
will be tried first. If that fails, and the server sends back an
WWW-Authenticate: Digest header, the request will be retried with the appropriate
digest response. Only qop=auth is supported, with MD5 as the algorithm.
I realize that sending basic auth first, and then following up with a digest
challenge-response kind of defeats the purpose in terms of security.
mrock613, good point on the wget test. Unfortunately I don't have a proxy server setup at the moment I can test against. I'll work on bringing one up and seeing if I can reproduce what you're getting and figure out the cause.