CTest: CDash "Submission successful" always reported for http redirects
I'm submitting XML files using ctest -D ExperimentalSubmit
to a CDash server that has a 302 redirection from http to https. When I specify the http URL in my ctest configuration, the response that is parsed by cmCTestSubmitHandler::ParseResponse
is the redirection response, e.g.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://REDACTED">here</a>.</p>
</body></html>
This response does not get categorized as an error (i.e. it reports "Submission successful"), because it doesn't include the string ERROR
in its text, even if specifying the https URL explicitly reports an expected error, e.g. if I have specified an invalid project:
<cdash version="2.6.0">
<status>ERROR</status>
<message>Not a valid project.</message>
</cdash>
This is the response that I'd expect ctest to parse, regardless of whether or not the request has been redirected.
I can envision two potential fixes to this issue, but I'm not sure if they are appropriate without more expertise in the CMake codebase.
- If none of
<cdash
,ERROR
, orWARNING
are detected bycmCTestSubmitHandler::ParseResponse
in the response, could it fall back to reporting some kind of "unknown error"? - Does/should the call to
curl
follow redirects?
Please let me know if I can provide any information to clarify this issue. I'm using CMake 3.17.3 and CDash 2.6.