curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

multi interface with hsts cache

From: Przemysław Sobala via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 29 May 2023 23:41:04 +0200

Hello
I've been successfully using curl multi interface with libuv in my service
for 24/7 download requests. Now I want to benefit from caching HSTS
responses to reduce the number of HTTP->HTTPS redirects.
If I understand the documentation correctly, the HSTS cache is applied to
each curl easy handle and it's read and written on each easy handle open
and close action.
I'd like to use the in-memory cache as reading and writing a cache file on
every easy handle is redundant in my opinion and can slow down my service.
1. How can I configure the in-memory cache for easy handles in Multi
Interface? My tests show that setting CURLOPT_HSTS_CTRL option to
CURLHSTS_ENABLE is not enough and only setting the cache file path will
bring the expected result.
2. Is it possible to populate the in-memory cache when my service starts,
operate on this cache (read & write) during download requests, and dump to
file when my service stops, so that it can be populated again on the next
restart?

--
Bez regards
Przemysław Sobala


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-05-29