[ 
https://issues.apache.org/jira/browse/NET-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17455322#comment-17455322
 ] 

Dmytro Sylaiev commented on NET-707:
------------------------------------

Hi [~ggregory] 

the systemType value in FTPClient::createParser is  OS/400 is the remote 
operating system. The TCP/IP version is "V6R1M0".

 

Linux native bash ftp client works well with fileName with spaces:

 

 
{noformat}
ftp> passive
Passive mode on.
ftp> cd /home
250-NAMEFMT set to 1.
250 "/home" is current directory.
ftp> ls
227 Entering Passive Mode (192,168,244,186,34,255).
125 List started.
NOTMYUSER           29550 10/12/08 18:33:53 *STMF      
AUD_DET_081210_183341_A1_Fichier_demandeurs.pdf
NOTMYUSER           13950 10/12/08 18:56:51 *STMF      AUD
MYUSER              3 06/12/21 18:31:29 *STMF      file with space.txt
250 List completed.
ftp> syst
215  OS/400 is the remote operating system. The TCP/IP version is 
"V6R1M0".{noformat}
 

 

 

> FTPClient::listFiles() doesn't include files with spaces for AS400
> ------------------------------------------------------------------
>
>                 Key: NET-707
>                 URL: https://issues.apache.org/jira/browse/NET-707
>             Project: Commons Net
>          Issue Type: Bug
>         Environment: AS400 ftp server
>            Reporter: Dmytro Sylaiev
>            Priority: Major
>
> For the FTP server on AS400 I got the different response size for 
> FTPClient::listFiles() and FTPClient::listNames() (first one doesn't include 
> file with spaces)
>  
> TheOS400FTPEntryParser pattern is 
> {noformat}
> private static final String REGEX =
>     "(\\S+)\\s+"                  // user
>     + "(?:(\\d+)\\s+)?"           // size, empty for members
>     + "(?:(\\S+)\\s+(\\S+)\\s+)?" // date stuff, empty for members
>     + "(\\*STMF|\\*DIR|\\*FILE|\\*MEM)\\s+"  // *STMF/*DIR/*FILE/*MEM
>     + "(?:(\\S+)\\s*)?";          // file name, missing, when CWD is a 
> *FILE{noformat}
> and the server response for LIST command
> {noformat}
> MYUSER 3 06/12/21 18:31:29 *STMF file with space.txt {noformat}
> doesn't match that regex.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to