You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2013/02/03 16:05:48 UTC
svn commit: r1441925 - in /commons/proper/net/trunk/src: changes/changes.xml
main/java/org/apache/commons/net/ftp/FTPClient.java
Author: sebb
Date: Sun Feb 3 15:05:48 2013
New Revision: 1441925
URL: http://svn.apache.org/viewvc?rev=1441925&view=rev
Log:
NET-500 Always call FTPClient#setFileType after connection
Modified:
commons/proper/net/trunk/src/changes/changes.xml
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
Modified: commons/proper/net/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/changes/changes.xml?rev=1441925&r1=1441924&r2=1441925&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml (original)
+++ commons/proper/net/trunk/src/changes/changes.xml Sun Feb 3 15:05:48 2013
@@ -64,6 +64,10 @@ The <action> type attribute can be add,u
<body>
<release version="3.3" date="TBA" description="
">
+ <action issue="NET-500" dev="sebb" type="fix">
+ Always call FTPClient#setFileType after connection.
+ Not all servers default to ASCII.
+ </action>
<action issue="NET-465" dev="sebb" type="fix">
FTPClient setSendBufferSize and setReceiveBufferSize on data socket.
The previous fix caused performance problems.
Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java?rev=1441925&r1=1441924&r2=1441925&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java (original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java Sun Feb 3 15:05:48 2013
@@ -1488,6 +1488,11 @@ implements Configurable
* type. After changing it, the new type stays in effect until you change
* it again. The default file type is <code> FTP.ASCII_FILE_TYPE </code>
* if this method is never called.
+ * <br>
+ * The server default is supposed to be ASCII (see RFC 959), however many
+ * ftp servers default to BINARY. <b>To ensure correct operation with all servers,
+ * always specify the appropriate file type after connecting to the server.</b>
+ * <br>
* <p>
* <b>N.B.</b> currently calling any connect method will reset the type to
* FTP.ASCII_FILE_TYPE.
@@ -1521,6 +1526,11 @@ implements Configurable
* be set when you want to change the type. After changing it, the new
* type stays in effect until you change it again. The default file type
* is <code> FTP.ASCII_FILE_TYPE </code> if this method is never called.
+ * <br>
+ * The server default is supposed to be ASCII (see RFC 959), however many
+ * ftp servers default to BINARY. <b>To ensure correct operation with all servers,
+ * always specify the appropriate file type after connecting to the server.</b>
+ * <br>
* The format should be one of the FTP class <code> TEXT_FORMAT </code>
* constants, or if the type is <code> FTP.LOCAL_FILE_TYPE </code>, the
* format should be the byte size for that type. The default format