summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestSubmitHandler.cxx
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2018-11-20 15:29:08 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2018-11-20 20:23:59 (GMT)
commit36bbd07a765820ddbcaef3db4e2a78d95910f5e1 (patch)
tree7c91563fb9a8e6ee0f5185c10421d2ea0cea0a83 /Source/CTest/cmCTestSubmitHandler.cxx
parente1dfe8cee619be2db2dcccfae5381376d336c6a3 (diff)
downloadCMake-36bbd07a765820ddbcaef3db4e2a78d95910f5e1.zip
CMake-36bbd07a765820ddbcaef3db4e2a78d95910f5e1.tar.gz
CMake-36bbd07a765820ddbcaef3db4e2a78d95910f5e1.tar.bz2
CDashUpload: Use the query part of the submit url as field
Diffstat (limited to 'Source/CTest/cmCTestSubmitHandler.cxx')
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index d57b55e..061c8ef 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -1084,8 +1084,10 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
std::string dropMethod;
std::string url;
this->ConstructCDashURL(dropMethod, url);
+ std::string fields;
std::string::size_type pos = url.find('?');
if (pos != std::string::npos) {
+ fields = url.substr(pos + 1);
url = url.substr(0, pos);
}
if (!(dropMethod == "http" || dropMethod == "https")) {
@@ -1135,8 +1137,6 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
const char* subproject = cm->GetState()->GetGlobalProperty("SubProject");
// TODO: Encode values for a URL instead of trusting caller.
std::ostringstream str;
- str << "project="
- << curl.Escape(this->CTest->GetCTestConfiguration("ProjectName")) << "&";
if (subproject) {
str << "subproject=" << curl.Escape(subproject) << "&";
}
@@ -1154,7 +1154,10 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
<< "endtime=" << timeNow << "&"
<< "datafilesmd5[0]=" << md5sum << "&"
<< "type=" << curl.Escape(typeString);
- std::string fields = str.str();
+ if (!fields.empty()) {
+ fields += '&';
+ }
+ fields += str.str();
cmCTestOptionalLog(this->CTest, DEBUG,
"fields: " << fields << "\nurl:" << url
<< "\nfile: " << file << "\n",