2017-08-31 Fred Gleason <fredg@paravelsystems.com>

* Modified web client components to use a distinctive http USER_AGENT
	string.
This commit is contained in:
Fred Gleason
2017-08-31 12:38:39 -04:00
parent 8d9a2ecadc
commit aef7c2229b
80 changed files with 216 additions and 69 deletions

View File

@@ -47,8 +47,10 @@ int PodcastErrorCallback(CURL *curl,curl_infotype type,char *msg,size_t size,
}
RDPodcast::RDPodcast(unsigned id)
RDPodcast::RDPodcast(RDConfig *config,unsigned id)
{
podcast_config=config;
RDSqlQuery *q;
QString sql;
@@ -314,6 +316,8 @@ bool RDPodcast::removeAudio(RDFeed *feed,QString *err_text,bool log_debug) const
(const char *)feed->purgePassword()),256);
curl_easy_setopt(curl,CURLOPT_USERPWD,userpwd);
curl_easy_setopt(curl,CURLOPT_HTTPAUTH,CURLAUTH_ANY);
curl_easy_setopt(curl,CURLOPT_USERAGENT,
(const char *)podcast_config->userAgent());
if(log_debug) {
curl_easy_setopt(curl,CURLOPT_VERBOSE,1);
curl_easy_setopt(curl,CURLOPT_DEBUGFUNCTION,PodcastErrorCallback);
@@ -412,4 +416,4 @@ void RDPodcast::SetRow(const QString &param,const QDateTime &value,
podcast_id);
q=new RDSqlQuery(sql);
delete q;
}
}