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

Sebb commented on NET-440:
--------------------------

If the property "org.apache.commons.net.ftp.systemType" is defined, the code 
will use that as the system type, instead of relying on the return from SYST.

If the SYST returns a value, but the value is not currently recognised, then 
you can create a property file "/systemType.properties" which maps system types 
to the parser type or parser class.

Using the wrong parser won't necessarily cause a parse failure - it may just 
return incorrect results, which is why I don't think it is safe to have a 
built-in default.

However, it would be possible to have an optional default system type which is 
used if the SYST command fails.
                
> library throws an exception in case the SYST command is not known or the 
> result is not known by the implementation
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: NET-440
>                 URL: https://issues.apache.org/jira/browse/NET-440
>             Project: Commons Net
>          Issue Type: Bug
>          Components: FTP
>    Affects Versions: 3.0.1
>            Reporter: s
>            Priority: Minor
>
> The FTP client uses the SYST command to determine the list output.
> This can fail in two ways:
> - a ParserInitializationException in case the response of the server is not 
> known by apache.
> - When the response to SYST command is 502 command unknown (the command is 
> optional after all - http://www.ietf.org/rfc/rfc959.txt) the client throws an 
> IOException.
> Can't it just default to UNIX for these type of ftp servers?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to