cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: RFC2732 support broken

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 17 Aug 2001 07:56:30 +0200 (MET DST)

On 16 Aug 2001, Arkadiusz Miskiewicz wrote:

> I've added EPSV support for rpm recently (patch can be found on rpm-list
> archives) and I can do this in curl, too

We would appriciate it a lot! (Just make sure you have a go at a somewhat
recent source code, preferably the CVS tree, as things have moved slightly in
ftp land.)

> but (after looking into code) I see that almost every network code is
> duplicated. Unfortunately this is very, very ugly :-(

I think the IPv6 support in curl has to be seen from the right angle.

Early this year, I asked Jun-ichiro Itojun Hagino if he would consider
helping me to add IPv6 support. He instantly (we're talking just a few hours)
made a huge patch and sent it back to me. I'm not blaming him, on the
contrary, I don't think I've ever had such a big quality patch provided in
such a small time. We owe him the IPv6 support we have today.

That is about it. I did edit it slightly, but the "patchy" style is still
there. I figure one reason is that not that many people actually use curl for
doing transfers using IPv6. Me included.

> Why networking code is done in this way:
> #ifdef ENABLE_IPV6
> blabla_af_independent;
> #else
> blabla_af_v4_only;
> #endif
> ?

Feel free to improve this. I would appriciate it, and I'm sure other friends
of curl will too.

> I can work on this but first I need to know your opinion about removing
> v4 only code and leaving af-independent one.

I agree with your view on how it should look. One function that works the
same for both v4 and v6 is a lot nicer source wise.

> Also IMO RF1639 support can be removed - this rfc belongs to experimental
> category while RFC2428 is new standard way of FTP support over ipv4 and
> ipv6 and most of ipv6-capable ftp clients/servers supports only this
> rfc..

Do we have any RFC 1639 style stuff? :-)

> > I guess that allowing IPv4 addresses like that won't hurt much, and is quite
> > easily to detect and use. I'll stash that in the TODO file unless you wanna
> > have a go at it?
> Probably removing
>
> #ifndef ENABLE_IPV6
> failf(data, "You haven't enabled IPv6 support");
> return CURLE_URL_MALFORMAT;
> #else
>
> from lib/url.c will be enough.

Yes, as soon as the name resolving functions are made in to a single one that
works both with IPv6 enabled as as well as disabled. (As discussed above.)

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-08-17