summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2021-02-15 00:25:59 -0500
committerJay Satiro <raysatiro@yahoo.com>2021-02-15 16:14:34 -0500
commite68ee39f3dbed2849c4e9d02b972218fef9d7881 (patch)
tree1543ba5ba431921399da71e31fda6a93d8659e85
parent723c0e75fa3e74cdad5ad2b3c130f9b974e89ef1 (diff)
downloadcurl-e68ee39f3dbed2849c4e9d02b972218fef9d7881.tar.gz
doh: Fix sharing user's resolve list with DOH handles
- Share the shared object from the user's easy handle with the DOH handles. Prior to this change if the user had set a shared object with shared cached DNS (CURL_LOCK_DATA_DNS) for their easy handle then that wasn't used by any associated DOH handles, since they used the multi's default hostcache. This change means all the handles now use the same hostcache, which is either the shared hostcache from the user created shared object if it exists or if not then the multi's default hostcache. Reported-by: Manuj Bhatia Fixes https://github.com/curl/curl/issues/6589 Closes https://github.com/curl/curl/pull/6607
-rw-r--r--lib/doh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/doh.c b/lib/doh.c
index 2af3a5e4c..cebb4c4bd 100644
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -284,6 +284,7 @@ static CURLcode dohprobe(struct Curl_easy *data,
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
#endif
ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
+ ERROR_CHECK_SETOPT(CURLOPT_SHARE, data->share);
if(data->set.verbose)
ERROR_CHECK_SETOPT(CURLOPT_VERBOSE, 1L);
if(data->set.no_signal)