Forráskód Böngészése

CTest: Don't require 'submit.php?' in submit location

Fixes: #18611
Regina Pfeifer 7 éve
szülő
commit
e1dfe8cee6
1 módosított fájl, 4 hozzáadás és 2 törlés
  1. 4 2
      Source/CTest/cmCTestSubmitHandler.cxx

+ 4 - 2
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::size_type pos = url.find("submit.php?");
-  url = url.substr(0, pos + 10);
+  std::string::size_type pos = url.find('?');
+  if (pos != std::string::npos) {
+    url = url.substr(0, pos);
+  }
   if (!(dropMethod == "http" || dropMethod == "https")) {
     cmCTestLog(this->CTest, ERROR_MESSAGE,
                "Only http and https are supported for CDASH_UPLOAD\n");