altsvc: keep a copy of the file name to survive handle reset

The alt-svc cache survives a call to curl_easy_reset fine, but the file
name to use for saving the cache was cleared. Now the alt-svc cache has
a copy of the file name to survive handle resets.

Added test 1908 to verify.

Reported-by: Craig Andrews
Fixes #4898
Closes #4902
This commit is contained in:
Daniel Stenberg 2020-02-09 15:28:03 +01:00
parent f8f4a94465
commit 02f8de6516
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 143 additions and 4 deletions

View file

@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@ -33,7 +33,8 @@ default values. This puts back the handle to the same state as it was in when
it was just created with \fIcurl_easy_init(3)\fP.
It does not change the following information kept in the handle: live
connections, the Session ID cache, the DNS cache, the cookies and shares.
connections, the Session ID cache, the DNS cache, the cookies, the shares or
the alt-svc cache.
.SH AVAILABILITY
This function was added in libcurl 7.12.1
.SH RETURN VALUE