Re: [ftp][Fwd: [VFS] FTP Sending LIST while in binary mode]
In message [EMAIL PROTECTED], 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ftp][Fwd: [VFS] FTP Sending LIST while in binary mode]
In message [EMAIL PROTECTED], Mario Ivankovits writes: 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? The original intent of commons-net was to provide low-level access to IETF protocols. That meant providing primitive operations only, although some high level functionality made it's way in out of necessity. I'm not going to stand in the way of changing listFiles (although I guess it would now be initiateListParsing) to switch modes as necessary, but the original intent was for higher level tools like VFS to use the low level primitives to provide higher level functions (like recursive retrieves and such). At any rate, I don't have a strong opinion and if most folks think it makes more sense for FTPClient to take care of the detail, then let's do that. What do others think? The trend seems to have been to want commons-net (at least the ftp package) to handle more stuff automatically and hide the details. 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ftp][Fwd: [VFS] FTP Sending LIST while in binary mode]
--- Daniel F. Savarese [EMAIL PROTECTED] wrote: [SNIP] any rate, I don't have a strong opinion and if most folks think it makes more sense for FTPClient to take care of the detail, then let's do that. What do others think? The trend seems to have been to want commons-net (at least the ftp package) to handle more stuff automatically and hide the details. As an interested observer, I tend to agree that if there is no conceivable use for binary list results, [net] may as well adapt automagically. $0.02 -Matt daniel __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]