curl-library
Re: cURL 'make test' fails on OpenBSD on PASV
Date: Mon, 10 Sep 2001 23:13:32 +0300
Daniel Stenberg wrote on "Re: cURL 'make test' fails on OpenBSD on PASV":
> To make sure that the ftp server is working correctly for you, try running it
> stand-alone and use your ftp client to issue the 'LIST' ('dir' in a solaris
> ftp client makes it). Oh, right, enable passive mode first (might be -p, my
> crappy old solaris version has no such option):
(Most ftp clients default to -p now. Actually some clients don't apparently
even HAVE the active mode any more, e.g. RedHat default 'ftp(1)' client.)
> % perl ftpserver.pl &
> % ftp -p localhost 8921
% ftp -p localhost 8921
Connected to localhost.
220- _ _ ____ _
220- ___| | | | _ \| |
220- / __| | | | |_) | |
220- | (__| |_| | _ <| |___
220 \___|\___/|_| \_\_____|
331 We are happy you popped in!
230 Welcome you silly person
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
500 EPSV not OK in state: loggedin!
227 Entering Passive Mode (127,0,0,1,34,218)
150 here comes a directory
total 20
drwxr-xr-x 8 98 98 512 Oct 22 13:06 .
drwxr-xr-x 8 98 98 512 Oct 22 13:06 ..
drwxr-xr-x 2 98 98 512 May 2 1996 .NeXT
-r--r--r-- 1 0 1 35 Jul 16 1996 README
lrwxrwxrwx 1 0 1 7 Dec 9 1999 bin -> usr/bin
dr-xr-xr-x 2 0 1 512 Oct 1 1997 dev
drwxrwxrwx 2 98 98 512 May 29 16:04 download.html
dr-xr-xr-x 2 0 1 512 Nov 30 1995 etc
drwxrwxrwx 2 98 1 512 Oct 30 14:33 pub
dr-xr-xr-x 5 0 1 512 Oct 1 1997 usr
226 ASCII transfer complete
(Login skipped, I use ~/.netrc. Want to add ftp(1) reference to the
man page, BTW? :-) Free/Net/OpenBSDs documents .netrc on ftp(1),
and at least OpenBSD has no individual netrc manpage.)
> If it does work with the ordinary ftp client, the output from 'curl -v
> ftp://localhost:8921/' would be very interesting to see.
% curl --show-error --verbose --list --max-time 20 --connect-timeout 10 ftp://localhost:8921/
< 220- _ _ ____ _
< 220- ___| | | | _ \| |
< 220- / __| | | | |_) | |
< 220- | (__| |_| | _ <| |___
< 220 \___|\___/|_| \_\_____|
> USER anonymous
< 331 We are happy you popped in!
> PASS curl_by_daniel_at_haxx.se
< 230 Welcome you silly person
* We have successfully logged in
> PWD
< 257 "/nowhere/anywhere" is current directory
* Entry path is '/nowhere/anywhere'
* Connected to localhost (127.0.0.1)
> PASV
< 227 Entering Passive Mode (127,0,0,1,34,218)
* Connecting to localhost (127.0.0.1) port 8922
* Connected the data stream!
> TYPE A
< 200 I modify TYPE as you wanted
> NLST
< 150 here comes a directory
* Getting file with size: -1
file
with space
fake
..
..
funny
README
* Connection (#0) left alive
* Closing live connection (#0)
[heikki@ip212-226-147-201|22:47:40|~] curl --show-error --verbose --list ftp://localhost:8921/
< 220- _ _ ____ _
< 220- ___| | | | _ \| |
< 220- / __| | | | |_) | |
< 220- | (__| |_| | _ <| |___
< 220 \___|\___/|_| \_\_____|
> USER anonymous
< 331 We are happy you popped in!
> PASS curl_by_daniel_at_haxx.se
< 230 Welcome you silly person
* We have successfully logged in
> PWD
< 257 "/nowhere/anywhere" is current directory
* Entry path is '/nowhere/anywhere'
* Connected to localhost (127.0.0.1)
> PASV
< 227 Entering Passive Mode (127,0,0,1,34,218)
* Connecting to localhost (127.0.0.1) port 8922
* Connected the data stream!
> TYPE A
< 200 I modify TYPE as you wanted
> NLST
< 150 here comes a directory
* Getting file with size: -1
file
with space
fake
..
..
funny
README
[hangs for at least 20 minutes]
Received on 2001-09-10