cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: RFC2732 support broken

From: Arkadiusz Miskiewicz <misiek_at_pld.ORG.PL>
Date: 14 Aug 2001 23:49:40 +0200

Daniel Stenberg <daniel_at_haxx.se> writes:

> > curl doesn't support rfc2723.
>
> No, and I don't think it should:
>
> RFC2723: "SRL: A Language for Describing Traffic Flows and Specifying Actions
> for Flow Groups"
>
> RFC2732 however: "Format for Literal IPv6 Addresses in URL's"
Hehe ;) Typo...

> > [misiek_at_arm src]$ curl ftp://[::1]
> > curl: (6) Couldn't resolve host '[::1]'
> >
> I must admit I can't see the error. Cam you please enlighten me?
,,::1'' is perfectly valid IP (v6) address and there is nothing to
resolve... It should connect instead and for example give me:

[misiek@arm misiek]$ curl -v ftp://ipv6-localhost
< 220 Server ready.
> USER anonymous
< 331 Anonymous login ok, send your complete email address as your password.
> PASS curl_by_daniel_at_haxx.se
< 230-
< 230- Witaj anonymous (UNKNOWN@::1) na ftp://misie.k.pl/.
< 230-
< 230 Anonymous access granted, restrictions apply.
* We have successfully logged in
> PWD
< 257 "/" is current directory.
* Entry path is '/'
* Connected to ipv6-localhost (::1)
> PASV
< 425 PASV over IPv6? Find a real FTP client.
curl: (13) Odd return code after PASV
* Closing live connection (#0)
[misiek_at_arm misiek]$ host -t AAAA ipv6-localhost
ipv6-localhost. has AAAA address ::1
[misiek_at_arm misiek]$
(there is _only_ AAAA record for ipv6-localhost)

Well just found another bug :-) Over IPv6 we can only use EPSV and
EPRT (rfc2428) while over IPv4 we can use EPSV, PASV, EPRT and PORT.

> > ps. also IMO curl should support ipv4 addresses inside brackets, too
> > (even if compiled without ipv6 support).
>
> The RFC clearly states that the brackets are reserved and used for IPv6
> addresses only. AFAICT, supporting IPv4 addresses that way wouldn't be to
> follow RFC2732.
>
> Or am I wrong?
You have right but let us think practicaly. Users using curl is some
shell scripts will be able to do just:

curl protocol://[${IPADDRESS}]/blabla

and this won't depend on address familly while if we are rfc2732
strict then we should do something like:

if (echo "${IPADDRESS}" | grep -q ":"); then
        curl protocol://[${IPADDRESS}]/blabla ...
else
        curl protocol://${IPADDRESS}/blabla ...
fi

Being very strict with rfc isn't always best thing (tm).

> Daniel Stenberg -- curl dude -- http://curl.haxx.se/

-- 
 Arkadiusz Mi¶kiewicz, AM2-6BONE, 1024/3DB19BBD
 IPv6 ready PLD Linux at http://www.pld.org.pl/
My jsme Borg. Odpor je marný, budete asimilováni
Received on 2001-08-15

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET