You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2003/05/10 00:51:37 UTC

Re: Net- Corrupt Files FTP on UNIX

In message <KH...@dhl.com>, "Karen Schaper
" writes:
>	I am not specifying which mode.  Does the FTPClient object have a defau
>lt mode?

RFC 959 says the default transfer mode should be ASCII.  FTPClient conforms
to the standard.  You must explicitly call setFileType(FTP.BINARY_FILE_TYPE);
to request binary transfer mode after logging in to the FTP server.  Enough
people get tripped up by this, I'm afraid we're going to have to change the
default.  But then people may start reporting that their line terminators
aren't being translated ...

daniel




Re: Net- Corrupt Files FTP on UNIX

Posted by Dave Newton <da...@solaraccess.com>.
On Fri, 2003-05-09 at 19:01, Paul Libbrecht wrote:
> Daniel F. Savarese wrote:
> > Enough people get tripped up by this, I'm afraid we're going to have to 
> > change the default. 
> I would expect to find a warning for such a thing at the end of a class 
> documentation for a main client class to be a sufficient warning...

I agree with Paul; a wad of "Hey! It defaults to binary mode!" should be
sufficient. I'd rather it followed the RFC.

Dave



Re: Net- Corrupt Files FTP on UNIX

Posted by Paul Libbrecht <pa...@activemath.org>.

Daniel F. Savarese wrote:
> In message <KH...@dhl.com>, "Karen Schaper
> " writes:
>>	I am not specifying which mode.  Does the FTPClient object have a defau
>>lt mode?
> 
> 
> RFC 959 says the default transfer mode should be ASCII.  FTPClient conforms
> to the standard.  You must explicitly call setFileType(FTP.BINARY_FILE_TYPE);
> to request binary transfer mode after logging in to the FTP server.  Enough
> people get tripped up by this, I'm afraid we're going to have to change the
> default.  But then people may start reporting that their line terminators
> aren't being translated ...

I would expect to find a warning for such a thing at the end of a class 
documentation for a main client class to be a sufficient warning...

Paul