diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-03-08 18:04:59 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-03-08 18:04:59 +0000 |
commit | ed5ff77313c2173fa96547d58aacc672092ecd5b (patch) | |
tree | 8571e4ee421ec92521edfa0df62cedb5830e6cc9 /gtk2_ardour | |
parent | cfacfe025bb1fee1b9e7ec803304791fea669c7f (diff) |
check HTTP status after ping, and use https by default
git-svn-id: svn://localhost/ardour2/branches/3.0@14191 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/pingback.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk2_ardour/pingback.cc b/gtk2_ardour/pingback.cc index 6fd34b14e6..e986b8e260 100644 --- a/gtk2_ardour/pingback.cc +++ b/gtk2_ardour/pingback.cc @@ -92,9 +92,9 @@ _pingback (void *arg) string url; #ifdef __APPLE__ - url = "http://community.ardour.org/pingback/osx/"; + url = "https://community.ardour.org/pingback/osx/"; #else - url = "http://community.ardour.org/pingback/linux/"; + url = "https://community.ardour.org/pingback/linux/"; #endif char* v = curl_easy_escape (c, cm->version.c_str(), cm->version.length()); @@ -130,6 +130,14 @@ _pingback (void *arg) return_str = ""; if (curl_easy_perform (c) == 0) { + int http_status; + + curl_easy_getinfo (c, CURLINFO_RESPONSE_CODE, &http_status); + + if (http_status != 200) { + std::cerr << "Bad HTTP status" << std::endl; + return 0; + } if ( return_str.length() > 140 ) { // like a tweet :) std::cerr << "Announcement string is too long (probably behind a proxy)." << std::endl; |