hsts: duplicate live HSTS data in curl_easy_duphandle

Verified by test 1922

Closes #21809
This commit is contained in:
A Johnston 2026-06-01 14:52:23 -07:00 committed by Daniel Stenberg
parent 4ead4285a6
commit 084ceb6601
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
8 changed files with 244 additions and 2 deletions

View file

@ -42,7 +42,9 @@ SSL sessions and no cookies. It also does not inherit any share object states
or options (created as if CURLOPT_SHARE(3) was set to NULL).
If the source handle has HSTS or alt-svc enabled, the duplicate gets data read
data from the main filename to populate the cache.
from the main filename to populate the cache. For HSTS, any entries learned at
runtime (E.g. `Strict-Transport-Security` response headers) are also copied to
the duplicate handle.
In multi-threaded programs, this function must be called in a synchronous way,
the input handle may not be in use when cloned.