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

@ -8,7 +8,7 @@ CURLINFO_EFFECTIVE_URL
# Server-side
<reply>
<data nocheck="yes">
HTTP/1.1 200 OK
HTTP/1.1 200 OK swsbounce
Date: Thu, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
Content-Type: text/html
@ -17,6 +17,15 @@ Content-Length: 0
alt-svc: h2="3dbbdetxoyw4nsp6c3cc456oj2ays6s43ezxzsfxxri3h5xqd.example:443"; ma=315360000; persist=1
</data>
# This is the second response
<data1 nocheck="yes">
HTTP/1.1 200 OK
Connection: close
Content-Length: 0
alt-svc: h2="second.example:443"; ma=315360000;
</data1>
</reply>
# Client-side
@ -56,6 +65,10 @@ GET /1908 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
GET /1908 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
</protocol>
<stripfile>
# strip out the (dynamic) expire date from the file so that the rest