diff options
Diffstat (limited to 'tests/libtest/lib1908.c')
-rw-r--r-- | tests/libtest/lib1908.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/libtest/lib1908.c b/tests/libtest/lib1908.c index bacbc9710..30e7d8019 100644 --- a/tests/libtest/lib1908.c +++ b/tests/libtest/lib1908.c @@ -39,7 +39,22 @@ int test(char *URL) curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L); curl_easy_setopt(hnd, CURLOPT_ALTSVC, "log/altsvc-1908"); ret = curl_easy_perform(hnd); + + if(!ret) { + /* make a copy and check that this also has alt-svc activated */ + CURL *also = curl_easy_duphandle(hnd); + if(also) { + ret = curl_easy_perform(also); + /* we close the second handle first, which makes it store the alt-svc + file only to get overwritten when the next handle is closed! */ + curl_easy_cleanup(also); + } + } + curl_easy_reset(hnd); + + /* using the same file name for the alt-svc cache, this clobbers the + content just written from the 'also' handle */ curl_easy_cleanup(hnd); } curl_global_cleanup(); |