diff --git a/src/config2setopts.c b/src/config2setopts.c index 4d62e67106..baa4155482 100644 --- a/src/config2setopts.c +++ b/src/config2setopts.c @@ -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);