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.

curl_url_dup does not copy IPv6 zone ID

From: Rutger Broekhoff via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 31 Jul 2023 09:25:07 +0200

Hi all, when recently trying out the libcurl-url API, I came across some
behavior which seems buggy to me: when copying a URL using curl_url_dup,
the zone ID is not copied into the new URL.

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?

A small program to reproduce this behavior is in the attachments. I
would expect its output to be this:

                Original: http://[2a04:4e42:e00::347%25eth0]/
                Parsed: http://[2a04:4e42:e00::347%25eth0]/
                Copy: http://[2a04:4e42:e00::347%25eth0]/

But end up getting the following output:

                Original: http://[2a04:4e42:e00::347%25eth0]/
                Parsed: http://[2a04:4e42:e00::347%25eth0]/
                Copy: http://[2a04:4e42:e00::347]/

curl version used: 8.2.1-1 x86_64 (Arch Linux)

Thanks,
Rutger


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