[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev ftp dir listing

From: Gisle Vanem
Subject: Re: lynx-dev ftp dir listing
Date: Tue, 6 Jan 2004 12:11:29 +0100

> This doesn't appear to be the same case as the broken ProFTPD.  I'm
> not sure how to analyze it.

I did this little patch which seems to help:

---   Tue Jan  5 22:27:40 2004
+++ htftp.c     Tue Jan  6 11:13:44 2004
@@ -3195,10 +3195,15 @@
                *cp2 = '\0';
            status = send_cmd_1("PWD");
            if (status == 2 && response_text[5] == '/') {
                status = send_cwd(filename+1);
                if (status == 2) {
                     StrAllocCopy(fn, (filename+1));
+                    type = "D";
+                    isDirectory = YES;
                     if (cp2) {
                        *cp2 = '/';
                        if (fn[strlen(fn)-1] != '/') {

Not sure what the intention is behind that ugly piece of code, but my guess
it tries to detect a CWD != "/~user". So if it expands it must be a dir, right?

It also worked prior the patch if I did ftp://giva:address@hidden/~giva/;type=D
but that should be needed IMHO.

But there's another (unrelated) problem. The comment at top of
htftp.c says "A cache of control connections is kept", but that's
not what I'm seeing. Lynx closes and reconnects for every directory 
visited. From

HTFTP.c: 2916: HTFTP: Closing data socket 16
HTFTP.c: 471:     Rx: 226-Options: -l
HTFTP.c: 471:     Rx: 226 3 matches total
HTFTP.c: 3793: HTFTPLoad: normal end
HTFTP.c: 3797: closing control socket 18

Better seen in Ethereal: ->     FTP Response: 226-Options: -l -> TCP 1391 > ftp [FIN, ACK] Seq=3644834859 
Ack=2734810633 ->     FTP Response: 226 Logout - CPU time spent: 
0.000 seconds.

Why? Is the "226.." confusing Lynx? Don't think so because the code at
bottom of HTFTPLoad() does the NETCLOSE() every time AFAICS.

BTW. I used FTP_PASSIVE:FALSE since that's seems to be a lot faster
with my NAT and most ftp-servers.


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]