]> git.pld-linux.org Git - packages/lftp.git/blob - lftp-rfc2732.patch
- "FTP" unification
[packages/lftp.git] / lftp-rfc2732.patch
1 On Mon, Nov 20, 2000 at 12:51:34PM +0100, Arkadiusz Miskiewicz wrote:
2 > Hi,
3 >
4 > lftp doesn't follow rfc2732:
5 >
6 > [root@arm /root]# LANG=C lftp ftp://[3ffe:8010:34:17::1:1]/pub
7 > lftp: [3ffe:8010:34:17::1:1]: Unknown host
8
9 Is this patch good enough?
10
11 Index: url.cc
12 ===================================================================
13 RCS file: /home/lav/cvsroot/lftp/src/url.cc,v
14 retrieving revision 1.16
15 diff -u -r1.16 url.cc
16 --- url.cc      2000/09/29 07:51:22     1.16
17 +++ url.cc      2000/11/20 13:11:57
18 @@ -144,8 +144,24 @@
19     // extract host name/password
20     scan=base;
21     host=base;
22 -   while(*scan && *scan!=':')
23 -      scan++;
24 +   if(*scan=='[') // RFC2732 [ipv6]
25 +   {
26 +      while(*scan && *scan!=']')
27 +        scan++;
28 +      if(*scan==']')
29 +      {
30 +        *scan++=0;
31 +        host++;
32 +      }
33 +      else
34 +        scan=base;
35 +   }
36 +
37 +   if(scan==base)
38 +   {
39 +      while(*scan && *scan!=':')
40 +        scan++;
41 +   }
42
43     if(*scan==':') // port found
44     {
45
46 --
47    Alexander.                      | never mind that noise you heard  
This page took 0.200544 seconds and 3 git commands to generate.