From ece8f1a0799e5a0108cce82b5747294353d8b240 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Tue, 27 Jul 2004 08:49:04 -0400 Subject: [PATCH] BUG: Allow submit and trigger url to contain ?. Fixes Bug #997 - CTest cannot handle URLs which contain a "?" --- Source/CTest/cmCTestSubmit.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/CTest/cmCTestSubmit.cxx b/Source/CTest/cmCTestSubmit.cxx index 8f066f31f..19a292655 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& 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 ) {