[racket] FTP strange behavior

From: Eduardo Bellani (ebellani at gmail.com)
Date: Wed Feb 16 08:46:32 EST 2011

Is that fix available in the new 5.1 distribution? Or should I compile
from source?

Thanks a lot for the fix btw.

On 02/08/2011 04:17 PM, Stephen Chang wrote:
> The ftp.datasus server returns the 125 code when a user tries to get
> something while connected using passive mode, which is what net/ftp
> does. But the code errors because it is only expecting 150 return
> codes from the server. I'm inclined to believe it's a bug with
> net/ftp, since the transfer completes successfully (the file in the
> example code is no longer available but i tried with another site).
> I've checked in a fix allowing the 125 return code, but I'm not
> familiar enough with ftp protocol to know if there are other cases
> that are missing.
> 
> 
> 
> 
> 
> On Mon, Feb 7, 2011 at 2:02 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
>> I can tell you what it means, but I don't know why it would do it...
>>
>> 2011/2/7 Eduardo Bellani <ebellani at gmail.com>:
>>> Hello list
>>>
>>> I am getting an error out of this snippet that I think I should not be
>>> getting:
>>>
>>> (require net/ftp)
>>>
>>>
>>> (define conn (ftp-establish-connection "ftp.datasus.gov.br" 21
>>> "anonymous" ""))
>>>
>>> (ftp-cd conn "siasus/Documentos")
>>>
>>> (ftp-download-file conn "./" "APAC.xls")
>>
>> This establishes a connection on the side to receive the data. There
>> is normally just one per transfer. Maybe the server is sending the
>> message multiple times? And so it is trying to open two? Can you use
>> WireShark to get a transcript of the session?
>>
>> Jay
>>
>>>
>>> (ftp-close-connection conn)
>>>
>>>
>>> the error is
>>> ftp: exected result code 150, got 125 Data connection already open;
>>> Transfer starting.
>>>
>>> My version is 5.0.2/linux
>>>
>>> Could anyone tell me what could be wrong?
>>>
>>> --
>>> Eduardo Bellani
>>>
>>> omnia mutantur, nihil interit.
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://lists.racket-lang.org/listinfo/users
>>>
>>
>>
>>
>> --
>> Jay McCarthy <jay at cs.byu.edu>
>> Assistant Professor / Brigham Young University
>> http://faculty.cs.byu.edu/~jay
>>
>> "The glory of God is Intelligence" - D&C 93
>>
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://lists.racket-lang.org/listinfo/users


-- 
Eduardo Bellani

omnia mutantur, nihil interit.


Posted on the users mailing list.