[cl-curl-devel] usage help
Liam M. Healy
lnp at healy.washington.dc.us
Fri Dec 23 02:50:51 UTC 2005
Richard,
I've not ever tried cl-curl with ftp, so I can't provide a successful
example. The commands you use look reasonable to me. It seems to be
getting gibberish after setting the path, but I don't know why. The
debugging step that comes to mind is to try the C interface to
libcurl, and see what makes a successful connection to the ftp server.
Then we can try to trace it back to the CL interface and maybe that
will give us a clue.
Liam
>>>>> "Richard" == Richard Ray <rray at mstc.state.ms.us> writes:
Richard> I'm trying to understand how to use curl with sbcl 0.9.7.
Richard> The only thing I've managed to get so far is a listing.
Richard> (curl:with-connection-returning-string (:reassure t)
Richard> (curl:set-option :url "ftp://user-name:password@192.168.0.1")
Richard> (curl:set-option :verbose t)
Richard> (curl:set-option :ftplistonly nil)
Richard> (curl:perform)
Richard> (pprint (curl:return-string))
Richard> I tried
Richard> (curl:with-connection-returning-string (:reassure t)
Richard> (curl:set-option :url "ftp://user-name:password@192.168.0.1")
Richard> (curl:set-option :verbose t)
Richard> (curl:set-option :quote "CWD")
Richard> (curl:perform)
Richard> and I get
Richard> * About to connect() to 192.168.0.1 port 21
Richard> * Trying 192.168.0.1... * connected
Richard> * Connected to 192.168.0.1 (192.168.0.1) port 21
Richard> < 220 (vsFTPd 2.0.1)
>> USER user-name
Richard> < 331 Please specify the password.
>> PASS password
Richard> < 230 Login successful.
Richard> * We have successfully logged in
>> PWD
Richard> < 257 "/home/user-name"
Richard> * Entry path is '/home/user-name'
>> ]u}]VHe=
Richard> < 500 Unknown command.
Richard> * QUOT string not accepted: ]u}]VHe=
Richard> * Connection #0 to host 192.168.0.1 left intact
Richard> debugger invoked on a SIMPLE-ERROR in thread
Richard> #<THREAD "initial thread" {A91C3A9}>:
Richard> CURL error 21 (FTP-QUOTE-ERROR)
Richard> Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
Richard> restarts (invokable by number or by possibly-abbreviated name):
Richard> 0: [ABORT] Exit debugger, returning to top level.
Richard> (CURL::RETURN-ERROR-CHECK 21)
Richard> 0]
Richard> Can someone provide examples of other commands such as mkd, pwd, cwd and
Richard> transfering files using ftp?
Richard> Thanks
Richard> Richard
Richard> _______________________________________________
Richard> cl-curl-devel mailing list
Richard> cl-curl-devel at common-lisp.net
Richard> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-curl-devel
More information about the Cl-curl-devel
mailing list