Fix cookie support for RSS feeds (closes #119)

This commit is contained in:
Christophe Dumez
2012-10-07 17:25:17 +03:00
parent 7bfd0e058b
commit 90a2021948
5 changed files with 26 additions and 13 deletions

View File

@@ -94,6 +94,12 @@ void RssFeed::loadItemsFromDisk() {
}
}
QList<QNetworkCookie> RssFeed::feedCookies() const
{
QString feed_hostname = QUrl::fromEncoded(m_url.toUtf8()).host();
return RssSettings().getHostNameQNetworkCookies(feed_hostname);
}
void RssFeed::refresh() {
if (m_loading) {
qWarning() << Q_FUNC_INFO << "Feed" << this->displayName() << "is already being refreshed, ignoring request";
@@ -101,7 +107,7 @@ void RssFeed::refresh() {
}
m_loading = true;
// Download the RSS again
m_manager->rssDownloader()->downloadUrl(m_url);
m_manager->rssDownloader()->downloadUrl(m_url, feedCookies());
}
void RssFeed::removeAllSettings() {