You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2006/02/15 17:56:59 UTC

Re: [ftp][Fwd: [VFS] FTP Sending LIST while in binary mode]

In message <43...@ops.co.at>, Mario Ivankovits writes:
>Ever heard of this?
>
>> I ran into a problem with a strict FTP server that needs the LIST
>> command to be send while on ascii mode. If it is sent on binary mode,

The RFC states the data transfer for LIST is of type ASCII or EBCDIC.
It's up to the user to change the mode to ASCII before doing the list
because the listing is transferred over the data connection.  So,
yes, the safe thing for VFS to do is to change the mode before
listing a directory.  However, I'm not sure I would say the behavior of
that FTP server is correct.  The RFC does not say the server must not
respond or return an error.  Although, one could say the behavior is
undefined by the RFC, I believe the correct behavior is for the server to
send a binary data stream.  For most intents and purposes (short of CRLF
vs LF issues) it is identical to the ASCII stream, which is in fact what
most FTP server implementors have done.  But that's neither here nor there.
The spec is only unambiguous about the behavior of LIST in ASCII mode :(

daniel

-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-| Sleep and The Traveller |-#-#-#-#-#-#-#-
    s a v a r e s e      # In distant lands, I hear the call of my home.
   software research     # Yet my work is not done.  My journey's just begun.
http://www.savarese.com/ #  -- http://www.sleepandthetraveller.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [ftp][Fwd: [VFS] FTP Sending LIST while in binary mode]

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi!
> In message <43...@ops.co.at>, Mario Ivankovits writes:
>   
>> Ever heard of this?
>>
>>     
>>> I ran into a problem with a strict FTP server that needs the LIST
>>> command to be send while on ascii mode. If it is sent on binary mode,
>>>       
>
> The RFC states the data transfer for LIST is of type ASCII or EBCDIC.
> It's up to the user to change the mode to ASCII before doing the list
> because the listing is transferred over the data connection.  So,
> yes, the safe thing for VFS to do is to change the mode before
> listing a directory.
Sure, I can do this, but shouldnt [net] try to be RFC compliant?
Leaving it to the user to be compliant is odd, isnt it?


Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org