setopt: return error for bad input to CURLOPT_RTSP_REQUEST

And leave the value untouched. Previously, an unrecognized argument
would reset it to RTSPREQ_NONE (and still return OK).

Closes #15440
This commit is contained in:
Daniel Stenberg 2024-10-29 08:09:32 +01:00
parent 74c7b672d9
commit b7a06dee50
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1261,7 +1261,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
rtspreq = RTSPREQ_RECEIVE;
break;
default:
rtspreq = RTSPREQ_NONE;
return CURLE_BAD_FUNCTION_ARGUMENT;
}
data->set.rtspreq = rtspreq;