summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-07-27 12:49:04 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-07-27 12:49:04 (GMT)
commitece8f1a0799e5a0108cce82b5747294353d8b240 (patch)
tree3174f02aabc68b6bebbe97fc08451257f25a8d55
parent1ed700d91f59851a510c7a5fe3b55e141dd493fc (diff)
downloadCMake-ece8f1a0799e5a0108cce82b5747294353d8b240.zip
CMake-ece8f1a0799e5a0108cce82b5747294353d8b240.tar.gz
CMake-ece8f1a0799e5a0108cce82b5747294353d8b240.tar.bz2
BUG: Allow submit and trigger url to contain ?. Fixes Bug #997 - CTest cannot handle URLs which contain a "?"
-rw-r--r--Source/CTest/cmCTestSubmit.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestSubmit.cxx b/Source/CTest/cmCTestSubmit.cxx
index 8f066f3..19a2926 100644
--- a/Source/CTest/cmCTestSubmit.cxx
+++ b/Source/CTest/cmCTestSubmit.cxx
@@ -266,7 +266,9 @@ bool cmCTestSubmit::SubmitUsingHTTP(const cmStdString& localprefix,
ofile.append(hex);
}
}
- cmStdString upload_as = url + "?FileName=" + ofile;
+ cmStdString upload_as
+ = url + ((url.find("?",0) == cmStdString::npos) ? "?" : "&")
+ + "FileName=" + ofile;
struct stat st;
if ( ::stat(local_file.c_str(), &st) )
@@ -383,7 +385,9 @@ bool cmCTestSubmit::TriggerUsingHTTP(const std::vector<cmStdString>& files,
ofile.append(hex);
}
}
- cmStdString turl = url + "?xmlfile=" + ofile;
+ cmStdString turl
+ = url + ((url.find("?",0) == cmStdString::npos) ? "?" : "&")
+ + "xmlfile=" + ofile;
*m_LogFile << "Trigger url: " << turl.c_str() << std::endl;
if ( m_Verbose )
{