commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Cohen <sco...@javactivity.org>
Subject Re: [net] FTP client date parsing: new format
Date Sat, 16 Apr 2005 02:23:12 GMT
No, that's not it at all.  Remember that the new system does not use 
Regexes for date parsing, it uses SimpleDateFormats.  From Mr. Praks' 
descriptions, I am assuming he's now running the 1.3 or earlier 
versions, which do use regexes.

This surprises me because I've had several conversations with him over 
the past month in which the new system was discussed.  Perhaps he forgot 
to specify the date format as "yyyy/MM/dd" in his FTPClientConfig this 
time?  Or perhaps his code is finding an older commons-net.jar than he 
was expecting?

Steve Cohen




Rory Winston wrote:
> Right, the problem with this format is that the date is not composed of three discrete
components (from a regex POV), but two. Basically what we will need to do is expand the regex
to handle thuis - can you give me details of the FTP server operating system and FTP server
software version if you have it please.
> 
> Cheers
> Rory
> 
> "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org> wrote:
> 
> 
>>--------------ms000205030904010307020307
>>Content-Type: text/plain; charset=windows-1257; format=flowed
>>Content-Transfer-Encoding: 7bit
>>
>>
>>Ok, now I've found out what is the issue: the regexp pattern used by 
>>UnixFTPEntryParser assumes too much about the format of the date. In 
>>particular, it assumes that there are spaces inside the date or 
>>something like that. As I'm not much of a regexp expert, I cannot really 
>>pinpoint the problem with the pattern. But I can demonstrate the results 
>>from applying this pattern below.
>>
>>This is the usual case that is parsed OK.
>>*entry*: -rw-r--r--    1 1000     1000           27 Jan 24 11:31 
>>messages.vsp
>>parsed into these variables:
>>    typeStr=-
>>    hardLinkCount=1
>>    usr=1000
>>    grp=1000
>>    filesize=27
>>    datestr=Jan 24 11:31
>>    name=messages.vsp
>>    endtoken=
>>
>>This is the one that has issues. Lucky for me, the parser manages to 
>>"parse" the entries that represent symbolic links, as these entries seem 
>>to have enough spaces required by the regexp pattern. Although 
>>incorrectly, it nicely demonstrates the issue with the parser.
>>*entry*: lrwxrwxrwx   1 neeme neeme    23 2005-03-02 18:06 macros -> 
>>../../../global/macros/
>>parsed into these variables:
>>    typeStr=l
>>    hardLinkCount=1
>>    usr=neeme
>>    grp=neeme
>>    filesize=23
>>    datestr=2005-03-02 18:06 macros
>>    name=->
>>    endtoken= ../../../global/macros/
>>
>>Note that starting from datestr variable, the parsing is f**ked up...
>>
>>How can we solve this issue?
>>Make regexp pattern also configurable? Better suggestions?
>>
>>Rgds,
>>Neeme
>>
>>Neeme Praks wrote:
>>
>>
>>>I cannot give you access as it is inside our corporate firewall.
>>>So I guess I'll try to debug it on my own. :-)
>>>
>>>I'll let you know when I have made some progress with that.
>>>
>>
>>--------------ms000205030904010307020307
>>Content-Type: application/x-pkcs7-signature; name="smime.p7s"
>>Content-Transfer-Encoding: base64
>>Content-Disposition: attachment; filename="smime.p7s"
>>Content-Description: S/MIME Cryptographic Signature
>>
>>MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIII5TCC
>>As0wggI2oAMCAQICAw2VSTANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UE
>>ChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv
>>bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwHhcNMDQxMjA4MjM0NjM5WhcNMDUxMjA4MjM0NjM5
>>WjBCMR8wHQYDVQQDExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMR8wHQYJKoZIhvcNAQkBFhBu
>>ZWVtZUBhcGFjaGUub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyZu8bdSh
>>BOVFe3KQjdsj5+J9Ji5+1+1M3IF5JeC6LKOlcLqralU5mqO25xuqJMLcl6AY9K88RMtv9DyN
>>fUz6AWA8fPYUhV1zO5WPuK4k+/9VzwGMIMUt/U1iVkdE0reW+qRWa6saip3HlFCR0iZCf+4w
>>uMf7cO3yBMbFAvXjVNQoV/ghks39q6qS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w2VSTB6BgsqhkiG9w0BCRACCzFroGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRo
>>YXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBG
>>cmVlbWFpbCBJc3N1aW5nIENBAgMNlUkwDQYJKoZIhvcNAQEBBQAEggEAc6If/+slN+9vNie1
>>AhgFli8Y1AXiFhLfSPDCQ40vEDWvMPQrTZ8qQ8PRGwwur575OOduGOTo3lqZEfg9LhYrDH/6
>>bgvLXTd/lmOID7/1zyIM1xj9193v8LuJS5+ip5dSYkGzIDe+ckToKXDQjHXIzArObyBh9xSm
>>GivpCWnWfwPvDd8IFznVQheRJ0pRG1aWxpY6Fe+egmOkaWwcCsvw1axvzccRNdNODB4aYENo
>>Ej3f/6JW6jSs8nYI3xTE+TMgNG+CUdJQUuGv58SGXwQuNEAzBuoykw/kjenFz6QX/cyTchXu
>>lOIHSP/imI7l7xIRjpnRCjHC2msZFoHNLM7z8wAAAAAAAA==
>>--------------ms000205030904010307020307--
>>
>>
> 
> 
> 
> 
> _________________________________________________________________
> Sign up for eircom broadband now and get a free two month trial.*
> Phone 1850 73 00 73 or visit http://home.eircom.net/broadbandoffer
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message