BUG: Allow submit and trigger url to contain ?. Fixes Bug #997 - CTest cannot handle URLs which contain a "?"

This commit is contained in:
Andy Cedilnik 2004-07-27 08:49:04 -04:00
parent 1ed700d91f
commit ece8f1a079
1 changed files with 6 additions and 2 deletions

View File

@ -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 )
{