Skip to content
Snippets Groups Projects
Commit ce661c43 authored by Zack Galbreath's avatar Zack Galbreath Committed by Brad King
Browse files

ctest: Restore support for http redirects during Submit step

After CDash PR 1519 introduced HTTP status codes greater than 200 for
various error cases, CMake commit b7c871f7 (ctest: Update ctest_submit
for CDash behavior change, 2023-07-24, v3.27.1~3^2) modified CTest's
submit handler to check the status returned by CDash and throw an error
when this status is not equal to 200.

That change had the unintended side effect of causing CTest submissions
to fail when uploading results to a URL that returns a redirect status
code (3xx).  Fix this by configuring cURL to follow the redirect.  The
status cURL reports to CTest is now 200 instead of 3xx when CDash is
located behind a redirect.

Fixes: #25159
parent 091005fa
No related branches found
No related tags found
No related merge requests found
......@@ -308,6 +308,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
// specify target
::curl_easy_setopt(curl, CURLOPT_URL, upload_as.c_str());
// follow redirects
::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
// CURLAUTH_BASIC is default, and here we allow additional methods,
// including more secure ones
::curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment