You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "s (Created) (JIRA)" <ji...@apache.org> on 2012/02/03 10:47:54 UTC

[jira] [Created] (NET-440) library throws an exception in case the SYST command is not known or the result is not known by the implementation

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

        

[jira] [Commented] (NET-440) library throws an exception in case the SYST command is not known or the result is not known by the implementation

Posted by "s (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201240#comment-13201240 ] 

s commented on NET-440:
-----------------------

That only works if known you the type of the server in advance. We use the library to connect to a lot of different FTP servers where the type of server is not known in advance. (And by server I mean devices in the field, with some unknown OS and FTP server which can be up to 20 years old). 

When it can not auto detect (for whatever reason), I'd say try some default formatting. You can always fail afterwards when parsing does not succeed?
                
> 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

        

[jira] [Commented] (NET-440) library throws an exception in case the SYST command is not known or the result is not known by the implementation

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Resolved] (NET-440) library throws an exception in case the SYST command is not known or the result is not known by the implementation

Posted by "Sebb (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/NET-440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved NET-440.
----------------------

       Resolution: Fixed
    Fix Version/s: 3.1

Added check for system property "org.apache.commons.net.ftp.systemType.default" if SYST commmand 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
>             Fix For: 3.1
>
>
> 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

        

[jira] [Commented] (NET-440) library throws an exception in case the SYST command is not known or the result is not known by the implementation

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13199876#comment-13199876 ] 

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

The work-round is to not use auto-detect, but to specify the server type.

I'm not sure it's a good idea to default to any particular OS if the 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

        

[jira] [Commented] (NET-440) library throws an exception in case the SYST command is not known or the result is not known by the implementation

Posted by "Stef (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/NET-440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202237#comment-13202237 ] 

Stef commented on NET-440:
--------------------------

Thanks!
                
> 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: Stef
>            Priority: Minor
>             Fix For: 3.1
>
>
> 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