Merge topic 'fix-cdash-version-uri'

7dbc1a2 Fix hard-coded CDash URI in version query
This commit is contained in:
Brad King 2010-08-19 13:28:08 -04:00 committed by CMake Topic Stage
commit 9b02aee86e
1 changed files with 7 additions and 3 deletions

View File

@ -410,8 +410,12 @@ std::string cmCTest::GetCDashVersion()
//First query the server. If that fails, fall back to the local setting //First query the server. If that fails, fall back to the local setting
std::string response; std::string response;
std::string url = "http://"; std::string url = "http://";
url += this->GetCTestConfiguration("DropSite") + "/CDash/api/getversion.php"; url += this->GetCTestConfiguration("DropSite");
std::string cdashUri = this->GetCTestConfiguration("DropLocation");
cdashUri = cdashUri.substr(0, cdashUri.find("/submit.php"));
url += cdashUri + "/api/getversion.php";
int res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3); int res = cmCTest::HTTPRequest(url, cmCTest::HTTP_GET, response, "", "", 3);
return res ? this->GetCTestConfiguration("CDashVersion") : response; return res ? this->GetCTestConfiguration("CDashVersion") : response;