[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 74/178: duphandle: make sure CURLOPT_RESOLVE is dup
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 74/178: duphandle: make sure CURLOPT_RESOLVE is duplicated fine too |
Date: |
Wed, 23 May 2018 12:25:09 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 2b126cd7083ddf1308ebc447cabd1983b16a99fa
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Apr 12 13:09:04 2018 +0200
duphandle: make sure CURLOPT_RESOLVE is duplicated fine too
Verified in test 1502 now
Fixes #2485
Closes #2486
Reported-by: Ernst Sjöstrand
---
lib/easy.c | 3 +++
tests/libtest/lib1502.c | 12 +++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/lib/easy.c b/lib/easy.c
index c99758617..6b914353d 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -892,6 +892,9 @@ static CURLcode dupset(struct Curl_easy *dst, struct
Curl_easy *src)
/* Duplicate mime data. */
result = Curl_mime_duppart(&dst->set.mimepost, &src->set.mimepost);
+ if(src->set.resolve)
+ dst->change.resolve = dst->set.resolve;
+
return result;
}
diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c
index 6f253c7ec..5b75e2f2a 100644
--- a/tests/libtest/lib1502.c
+++ b/tests/libtest/lib1502.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -40,6 +40,7 @@
int test(char *URL)
{
CURL *easy = NULL;
+ CURL *dup;
CURLM *multi = NULL;
int still_running;
int res = 0;
@@ -72,6 +73,15 @@ int test(char *URL)
easy_setopt(easy, CURLOPT_HEADER, 1L);
easy_setopt(easy, CURLOPT_RESOLVE, dns_cache_list);
+ dup = curl_easy_duphandle(easy);
+ if(dup) {
+ curl_easy_cleanup(easy);
+ easy = dup;
+ }
+ else {
+ return CURLE_OUT_OF_MEMORY;
+ }
+
multi_init(multi);
multi_add_handle(multi, easy);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 150/178: vtls: fix missing commas, (continued)
- [GNUnet-SVN] [gnurl] 150/178: vtls: fix missing commas, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 153/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 160/178: cookies: do not take cookie name as a parameter, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 166/178: tests: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 171/178: http2: use the correct function pointer typedef, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 167/178: ntlm: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 77/178: system.h: Add sparcv8plus to oracle/sunpro 32-bit detection, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 80/178: test1148: tolerate progress updates better, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 65/178: test1136: fix cookie order after commit c990eadd1277, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 84/178: schannel: add client certificate authentication, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 74/178: duphandle: make sure CURLOPT_RESOLVE is duplicated fine too,
gnunet <=
- [GNUnet-SVN] [gnurl] 66/178: winbuild: updated the documentation, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 79/178: ssh: show libSSH2 error code when closing fails, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 92/178: detect_proxy: only show proxy use if it had contents, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 82/178: configure: keep LD_LIBRARY_PATH changes local, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 96/178: http2: avoid strstr() on data not zero terminated, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 93/178: ftplistparser: keep state between invokes, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 112/178: examples/http2-upload: expand buffer to avoid silly warning, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 104/178: http2: convert an assert to run-time check, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 97/178: http2: clear the "drain counter" when a stream is closed, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 102/178: CURLOPT_SSLCERT.3: improve WinSSL-specific usage info, gnunet, 2018/05/23