On Mon, 31 Jul 2023, Rutger Broekhoff via curl-library wrote:
I wouldn't expect that this would be intended behavior (the curl_url_dup man
page specifies that all the contents of the CURLU handle are copied, and
does not note any exceptions). Could anyone confirm that this is indeed
(not) intended behaviour?
I can confirm that this is a bug.
Here's a first patch. I will write up a PR and add a test case:
diff --git a/lib/urlapi.c b/lib/urlapi.c
index e0c547605..46635ad01 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -1382,10 +1382,11 @@ CURLU *curl_url_dup(const CURLU *in)
DUP(u, in, host);
DUP(u, in, port);
DUP(u, in, path);
DUP(u, in, query);
DUP(u, in, fragment);
+ DUP(u, in, zoneid);
u->portnum = in->portnum;
}
return u;
fail:
curl_url_cleanup(u);
--
/ daniel.haxx.se
| Commercial curl support up to 24x7 is available!
| Private help, bug fixes, support, ports, new features
| https://curl.se/support.html
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html