[ 
https://issues.apache.org/jira/browse/NET-205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Oberhuber updated NET-205:
---------------------------------

    Attachment: net-205-invalidDates.diff.txt

I've observed one problem with this change, that a totally wrong FTP parser now 
easily produces invalid entries when the text that should be a date isn't even 
remotely a date.

For instance, parsing output of a VMS server with the NTFTPEntryParser, results 
in this text being parsed as follows:

{noformat}
Total of 5 files, 470/606 blocks

--> datestr = "Total of"
--> size = 5
--> name = "files, 470/606 blocks"
{noformat}

Attached patch gives up when the time parser doesn't even get past the first 4 
characters - not sure if that's a good idea, but at least it is closer to what 
Commons Net was like in previous releases.

> Allow FTPFile entries to be generated even if date parsing fails
> ----------------------------------------------------------------
>
>                 Key: NET-205
>                 URL: https://issues.apache.org/jira/browse/NET-205
>             Project: Commons Net
>          Issue Type: Improvement
>            Reporter: Sebb
>             Fix For: 1.5, 2.0
>
>         Attachments: AllowUnparseableDates.patch, 
> net-205-invalidDates.diff.txt
>
>
> Most of the FTPEntryParser classes return null if date parsing fails.
> This can cause an otherwise good entry to be ignored, when perhaps the only 
> problem is that the parsing is faulty.
> The suggestion is to allow such entries to be kept, but with a null date.
> This is already done by the EnterpriseUnixFTPEntryParser.
> Patches to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to