cURL / Mailing Lists / curl-library / Single Mail


Re: URL parser: IPv6 zone identifiers [PATCH v2]

From: Daniel Stenberg <>
Date: Sat, 15 Mar 2014 23:04:35 +0100 (CET)

On Sat, 15 Mar 2014, Till Maas wrote:

Thanks a lot for your contribution!

> I adjusted parseurlandfillconn() and parse_proxy() from lib/url.c to
> properly handle non-numeric zone identifiers at least on Linux. I did not
> write test cases since I do not know how to properly invoke the respective
> functions (i.e. how to setup a SessionHandle), but I tested it successfully
> with some IPv6 URLs. I am not a C guru, therefore the patch can probably be
> improved.

1 - you overcomplicate things by sending a single change in 10 patches, many
     that even change previous commits in the series. I think it makes sense
     to have this in a single squashed patch.

2 - I edited non-C89 compliant code

3 - I simplified it by removing the strcspn() and strstr() calls to both use
     strchr() instead.

4 - I fixed a warning about variable 'scope' shadowing previous declarations

(but I don't have/know any scoped IPv6 addresses to try so I'm not 100% sure I
didn't break anything)

With these fixes I only have one concern left:

The use of if_nametoindex() to just depend on the existance of <net/if.h>. I
think we need to properly have configure actually check for that function and
not assume that a header file alone is enough to tell us that function exists.


List admin:

Received on 2014-03-15