From 7dbc1a2ebd140461c2478e6fdd54eb919f66c25d Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Wed, 18 Aug 2010 09:58:27 -0400 Subject: [PATCH] Fix hard-coded CDash URI in version query --- Source/cmCTest.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 3a777d59d..d12fde0f8 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -410,10 +410,14 @@ std::string cmCTest::GetCDashVersion() //First query the server. If that fails, fall back to the local setting std::string response; 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); - + return res ? this->GetCTestConfiguration("CDashVersion") : response; #else return this->GetCTestConfiguration("CDashVersion");