[jira] Commented: (NET-273) FEAT response parsing
[ https://issues.apache.org/jira/browse/NET-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008894#comment-13008894 ] Bogdan Drozdowski commented on NET-273: --- Nice solution with the Set. Better than my second idea of Map. It's a good thing you've tested this more than me, because I didn't realize that some features could be included more than once (but with different options). About the UTF: yes, "UTF8" is the default, because this is what is in the RFC. But I added a test for the string "UTF-8" just in case. > FEAT response parsing > - > > Key: NET-273 > URL: https://issues.apache.org/jira/browse/NET-273 > Project: Commons Net > Issue Type: Improvement > Components: FTP >Affects Versions: 2.0 >Reporter: Shikhar Bhushan >Priority: Minor > > Would be nice if response to FEAT could be parsed, and a simple method > provided like client.isSupported(FTPCommand.MDTM) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (NET-273) FEAT response parsing
[ https://issues.apache.org/jira/browse/NET-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008554#comment-13008554 ] Sebb commented on NET-273: -- Weird. The site has stopped sending any SITE entries in the FEAT response. I've not seen the duplication elsewhere. so the original idea looks OK. > FEAT response parsing > - > > Key: NET-273 > URL: https://issues.apache.org/jira/browse/NET-273 > Project: Commons Net > Issue Type: Improvement > Components: FTP >Affects Versions: 2.0 >Reporter: Shikhar Bhushan >Priority: Minor > > Would be nice if response to FEAT could be parsed, and a simple method > provided like client.isSupported(FTPCommand.MDTM) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (NET-273) FEAT response parsing
[ https://issues.apache.org/jira/browse/NET-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008520#comment-13008520 ] Sebb commented on NET-273: -- Testing shows that the FEAT response can contain several entries with the same key, for example: SITE MKDIR SITE RMDIR SITE UTIME SITE SYMLINK REST STREAM SIZE Not yet clear how best to handle that without complicating the user code. > FEAT response parsing > - > > Key: NET-273 > URL: https://issues.apache.org/jira/browse/NET-273 > Project: Commons Net > Issue Type: Improvement > Components: FTP >Affects Versions: 2.0 >Reporter: Shikhar Bhushan >Priority: Minor > > Would be nice if response to FEAT could be parsed, and a simple method > provided like client.isSupported(FTPCommand.MDTM) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (NET-273) FEAT response parsing
[ https://issues.apache.org/jira/browse/NET-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008476#comment-13008476 ] Sebb commented on NET-273: -- I agree that supportsFeature(String) seems best. Not sure it's worth creating a list of the currently known features. Although one could just store the raw strings in an array, the Map approach seems best. The map could be created only on demand, but once created it should probably be cached until disconnection. > FEAT response parsing > - > > Key: NET-273 > URL: https://issues.apache.org/jira/browse/NET-273 > Project: Commons Net > Issue Type: Improvement > Components: FTP >Affects Versions: 2.0 >Reporter: Shikhar Bhushan >Priority: Minor > > Would be nice if response to FEAT could be parsed, and a simple method > provided like client.isSupported(FTPCommand.MDTM) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (NET-273) FEAT response parsing
[ https://issues.apache.org/jira/browse/NET-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13008468#comment-13008468 ] Bogdan Drozdowski commented on NET-273: --- Since new features can be added at any moment, I'd see the tests as client.supportsFeature("something"), with a list of currently-known features in a separate class (FTPFeature.java), so client.supportsFeature(FTPFeature.FOO) could also be used. Not all commands are features and not all feature names are commands, so a separate class would be better. I'd use a java.util.Map to hold the features. The number of entries (keys) in the Map would be the number of features the server reported. The first String in an entry would be the first word on a line from the feature list (which should be the feature's name), the second String would be the feature's options - everything after the feature's name (like for MLST). > FEAT response parsing > - > > Key: NET-273 > URL: https://issues.apache.org/jira/browse/NET-273 > Project: Commons Net > Issue Type: Improvement > Components: FTP >Affects Versions: 2.0 >Reporter: Shikhar Bhushan >Priority: Minor > > Would be nice if response to FEAT could be parsed, and a simple method > provided like client.isSupported(FTPCommand.MDTM) -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (NET-273) FEAT response parsing
[ https://issues.apache.org/jira/browse/NET-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714220#action_12714220 ] Derek Morr commented on NET-273: I agree, this would be very useful. I'm working on a patch to add EPSV/EPRT support for IPv6, and I'll need FEAT support to implement that cleanly. I'm willing to take a stab at writing the FEAT support. How would you prefer to see the features supported? Do you want per-feature methods (client.isFOOSupported()) or a generic method (client.supportesFeature(FTPCommand.FOO)) ? Do you have a preference for how the feature support list is maintained inside FTPClient? > FEAT response parsing > - > > Key: NET-273 > URL: https://issues.apache.org/jira/browse/NET-273 > Project: Commons Net > Issue Type: Improvement >Affects Versions: 2.1 >Reporter: Shikhar Bhushan >Priority: Minor > > Would be nice if response to FEAT could be parsed, and a simple method > provided like client.isSupported(FTPCommand.MDTM) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (NET-273) FEAT response parsing
[ https://issues.apache.org/jira/browse/NET-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699550#action_12699550 ] Rory Winston commented on NET-273: -- Thats a good idea...possbly we could have some sort of capabilities structure that held details of FEAT parsing. Since there are only a small number of possible entries in the FEAT response, it may be better to explicitly enumerate the possiibillities, i.e. client.isMDTMSupported() > FEAT response parsing > - > > Key: NET-273 > URL: https://issues.apache.org/jira/browse/NET-273 > Project: Commons Net > Issue Type: Improvement >Affects Versions: 2.1 >Reporter: Shikhar Bhushan >Priority: Minor > > Would be nice if response to FEAT could be parsed, and a simple method > provided like client.isSupported(FTPCommand.MDTM) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.