fixup error check

This commit is contained in:
Daniel Stenberg 2026-07-27 10:49:56 +02:00
parent 70140f41f3
commit 05a9370a32
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -949,11 +949,13 @@ static CURLcode credentials_and_headers_setopts(struct OperationConfig *config,
my_setopt_bitmask(curl, CURLOPT_HTTPAUTH, config->authtype);
result = my_setopt_slist(curl, CURLOPT_HTTPHEADER, config->headers);
if(result) {
if(result == CURLE_BAD_FUNCTION_ARGUMENT) {
errorf("Illegal CRL/LF in --header data");
config->synthetic_error = TRUE;
return result;
}
if(setopt_bad(result))
return result;
if(proto_http || proto_rtsp) {
MY_SETOPT_STR(curl, CURLOPT_REFERER, config->referer);