commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clark Stuth <ClarkSt...@carfax.com>
Subject [NET] - FtpClient.getStatus(path) does not seem to be working as documented.
Date Mon, 06 Jun 2016 14:53:11 GMT
We think we've identified a mis-documented feature with FTPClient in
commons-net, specifically the getStatus() methods. According to the FTP
protocol, STAT should return server status information. However,
according to the FTPClient documentation
(https://github.com/apache/commons-net/blob/trunk/src/main/java/org/apache/commons/net/ftp/FTPClient.java#L3510),
the STAT command is used to retrieve remote file listings. As a result,
we are running into an issue with how Spring Framework Integration is
using the FtpClient.getStatus(path) command.

From our own testing it does not appear that the FTP Server's stat()
command returns a different result when presented with a pathname or
not.  The STAT command primarily seems to return server and connection
status information, not file information.

The following two examples will show the FTP Server Output when
presented with the STAT command against no path, a file that exists, and
an invalid path (file does not exist).
OpenVMS Implementation:
https://raw.githubusercontent.com/clarkstuth/spring-ftp-template-spike/master/status_command_OpenVMS.txt

PureFTPD Implementation:
https://raw.githubusercontent.com/clarkstuth/spring-ftp-template-spike/master/status_command_PureFTPD.txt


Is it possible we are misinterpreting what this stat command should be
doing?  It appears the FTP protocol functions differently than how this
method is documented.

If the functionality of the STAT command is vendor dependent, would it
be possible to update the documentation to include this?

Thanks,
Clark Stuth, Sean Lally
Carfax Software

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Mime
View raw message