curl-library
Re: cURL 'make test' fails on OpenBSD on PASV
Date: Mon, 10 Sep 2001 09:13:48 +0200 (MET DST)
On Sat, 8 Sep 2001, Heikki Korpela wrote:
> cURL requests using PASV, including a PASV LIST to localhost, work just
> fine. Make test however fails on PASV LIST. (All tests before that one
> report success.)
This failed in the 7.8.1 release too, didn't it? It looks as if this could be
a problem in the perl test ftp server. What perl version was this?
> > LIST
> IN: LIST
>
> Breakpoint 1, Curl_GetFTPResponse (sockfd=5,
> buf=0x395e8 "200 I modify TYPE as you wanted\r\n0,1,34,218)\n\n | | _ \\| |", conn=0x38400, ftpcode=0xdfbfb294)
> at /usr/ports/net/curl/w-curl-7.9-pre3/curl-7.9-pre3/lib/ftp.c:222
> 222 switch (select (sockfd+1, &readfd, NULL, NULL, &interval)) {
> (gdb) c
> Continuing.
> < 150 here comes a directory
> * Getting file with size: -1
> % Total % Received % Xferd Average Speed Time Curr.
> Dload Upload Total Current Left Speed
>
> 100 623 0 623 0 0 89 0 --:--:-- 0:00:06 --:--:-- 0
> Breakpoint 1, Curl_GetFTPResponse (sockfd=5,
> buf=0x395e8 "total 20\r\ndrwxr-xr-x 8 98 98", ' ' <repeats 11 times>, "512 Oct 22 13:06 .\r\ndrwxr-xr-x 8 98 98", ' ' <repeats 11 times>, "512 Oct 22 13:06 ..\r\ndrwxr-xr-x 2 98 98", ' ' <repeats 11 times>, "512 May 2 1996 .NeXT\r\n-r--r--r-- 1"..., conn=0x38400, ftpcode=0xdfbfd4f4)
> at /usr/ports/net/curl/w-curl-7.9-pre3/curl-7.9-pre3/lib/ftp.c:222
This really surprises me. When the LIST command has been sent, the 150 line
is a reply back. When that has been sent, libcurl should not call the
Curl_GetFTPResponse() function anymore and the 'ls' output should certainly
not be readable there as this seems to indicate.
It seems as if the directory is sent to the wrong socket by the server.
> 222 switch (select (sockfd+1, &readfd, NULL, NULL, &interval)) {
> (gdb) s
> 228 error = SELECT_TIMEOUT;
This is in the Curl_GetFTPResponse() function.
> (gdb) data OK protocol OK
Doesn't the script detect any problem?
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2001-09-10