Author: sebb
Date: Tue Apr 5 21:54:24 2011
New Revision: 1089258
URL: http://svn.apache.org/viewvc?rev=1089258&view=rev
Log:
NET-401 FTP class uses BufferedReader for control channel, which does not
follow the standard.
Changed reader to CRLFLineReader.
Modified:
commons/proper/net/trunk/src/changes/changes.xml
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTP.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=1089258&r1=1089257&r2=1089258&view=diff
==============================================================================
--- commons/proper/net/trunk/src/changes/changes.xml (original)
+++ commons/proper/net/trunk/src/changes/changes.xml Tue Apr 5 21:54:24 2011
@@ -67,6 +67,10 @@ This release is binary-compatible with 2
- ftp.FTPSClient ctors no longer throw NoSuchAlgorithmException
All users are recommended to upgrade.
">
+ <action issue="NET-401" dev="sebb" type="fix">
+ FTP class uses BufferedReader for control channel, which does not
follow the standard.
+ Changed reader to CRLFLineReader.
+ </action>
<action issue="NET-331" dev="sebb" type="update">
AS400 file timestamp format is wrong. Workround exists.
</action>
Modified:
commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTP.java
URL:
http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTP.java?rev=1089258&r1=1089257&r2=1089258&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTP.java
(original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/ftp/FTP.java
Tue Apr 5 21:54:24 2011
@@ -31,6 +31,7 @@ import java.util.ArrayList;
import org.apache.commons.net.MalformedServerReplyException;
import org.apache.commons.net.ProtocolCommandSupport;
import org.apache.commons.net.SocketClient;
+import org.apache.commons.net.io.CRLFLineReader;
/***
* FTP provides the basic the functionality necessary to implement your
@@ -369,7 +370,7 @@ public class FTP extends SocketClient
{
super._connectAction_(); // sets up _input_ and _output_
_controlInput_ =
- new BufferedReader(new InputStreamReader(_input_,
getControlEncoding()));
+ new CRLFLineReader(new InputStreamReader(_input_,
getControlEncoding()));
_controlOutput_ =
new BufferedWriter(new OutputStreamWriter(_output_,
getControlEncoding()));
if (connectTimeout > 0) { // NET-385