altsvc: clone setting in curl_easy_duphandle

The cache content is not duplicated, like other caches, but the setting
and specified file name are.

Test 1908 is extended to verify this somewhat. Since the duplicated
handle gets the same file name, the test unfortunately overwrites the
same file twice (with different contents) which makes it hard to check
automatically.

Closes #5923
This commit is contained in:
Daniel Stenberg 2020-09-05 21:21:26 +02:00
parent 8ca54a03ea
commit f93455eb04
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 49 additions and 10 deletions

View file

@ -54,7 +54,7 @@ UNITTEST_START
return 1;
result = Curl_altsvc_load(asi, arg);
if(result) {
Curl_altsvc_cleanup(asi);
Curl_altsvc_cleanup(&asi);
return result;
}
curl = curl_easy_init();
@ -131,7 +131,7 @@ UNITTEST_START
curl_easy_cleanup(curl);
fail:
Curl_altsvc_cleanup(asi);
Curl_altsvc_cleanup(&asi);
return unitfail;
}
UNITTEST_STOP