mirror of
https://github.com/curl/curl.git
synced 2026-04-14 21:31:42 +03:00
altsvc: move logic from setopt into Curl_altsvc_ctrl()
To keep it all in one place. Closes #20247
This commit is contained in:
parent
219245a616
commit
2725d3cb85
3 changed files with 13 additions and 14 deletions
11
lib/setopt.c
11
lib/setopt.c
|
|
@ -1261,16 +1261,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
|
|||
#endif /* !CURL_DISABLE_HSTS */
|
||||
#ifndef CURL_DISABLE_ALTSVC
|
||||
case CURLOPT_ALTSVC_CTRL:
|
||||
if(!arg) {
|
||||
DEBUGF(infof(data, "bad CURLOPT_ALTSVC_CTRL input"));
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
}
|
||||
if(!data->asi) {
|
||||
data->asi = Curl_altsvc_init();
|
||||
if(!data->asi)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
return Curl_altsvc_ctrl(data->asi, arg);
|
||||
return Curl_altsvc_ctrl(data, arg);
|
||||
#endif /* !CURL_DISABLE_ALTSVC */
|
||||
#ifndef CURL_DISABLE_WEBSOCKETS
|
||||
case CURLOPT_WS_OPTIONS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue