#9770 [Com]: FTP login connection with large banners on NT Server 4.0
| From: | pleasedont at thankyou dot com | Date: | Sun, 27 Jun 2004 23:59:46 +0000 |
| Subject: | #9770 [Com]: FTP login connection with large banners on NT Server 4.0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-61410@lists.php.net to get a copy of this message | ||
ID: 9770
Comment by: pleasedont at thankyou dot com
Reported By: ulisses at skyborg dot com
Status: Open
Bug Type: Other
Operating System: Linux
PHP Version: 3.0.17
New Comment:
<A HREF="http://www.1st-art-gallery.com/home_gallery.htm">Thanks!</A>
Previous Comments:
------------------------------------------------------------------------
[2001-03-15 13:07:23] ulisses at skyborg dot com
While connecting with a NT FTP Server 4.0 with a banner message with
several lines the function ftp_login always returns a warning error.
I debug the source code and found a bug on file funcions/ftp.c on
function int ftp_getresp(ftpbuf_t *ftp)
If the function receive a blank line the loop below is aborted
while (1) {
if (!ftp_readline(ftp))
return 0;
if (ftp->inbuf[3] == '-')
continue;
else if (ftp->inbuf[3] != ' ')
return 0;
break;
}
I think I resolved the problem (it works with my application) adding a
line to this loop:
while (1) {
if (!ftp_readline(ftp))
return 0;
if (ftp->inbuf[3] == '-')
continue;
else if (ftp->inbuf[0]==0) continue;
else if (ftp->inbuf[3] != ' ')
return 0;
break;
}
I hope I could help you.
Ulisses Donato
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=9770&edit=1