commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbre...@wi.rr.com (Jeffrey D. Brekke)
Subject Re: [net] NT FTP Server & DIRSTYLE
Date Mon, 05 Apr 2004 14:27:22 GMT
>>>>> On Mon, 05 Apr 2004 15:40:38 +0200, Mario Ivankovits <mario@ops.co.at>
said:

> Jeffrey D. Brekke wrote:
>> Sounds like an interesting solution.  Are you thinking that we'd
>> have the NT parser, on failure, delagate to the unix parser ( then
>> of course if that fails, give up )?
>> 
> Yes - for sure, but this is something i already suggested last week
> (http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg38905.html)
> but Steven doesnt liked it
> (http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg38906.html)
> - i dont know why.  Maybe my english isnt good enough to explain my
> thoughts and to convince him.

The DIRSTYLE is simple, but doesn't really fit with how our parser
discovery was setup.  Duplicating the Unix parser doesn't seem right.

> To detach it from the unix-parser we could copy the unix-parser to
> an nt-unix-parser. So if the unix-parser changes in the future, this
> might not influence the nt-unix-parser.  But this isnt necassary
> needet. Such a failure should be come up early enough by the unit
> tests.

I understand, but really think delegating to the existing unix parser
would be simpler.

> A general fallback to the unix-parser wasnt in my mind.

> I wanted to implement this behaviour only into the nt-parser - as
> this is the only known ftp-server (for me) which is able to switch
> the dirstyle.

> I thought: "If the nt-server do have such a feature, the nt-parser
> should try to handle this" - and since there is not ftp-client
> instance within the factory and/or parser class to issue the
> "dirstyle" - this has to be done by guessing using regular
> expressions.  Which is also faster.  This also preserves from some
> roundtrips (dirstyle command) with the server.

Yes, I see this now.  I think the NT parser could really be a
composite parser, which would try to first use the DOS RE, otherwise
use the Unix RE.  I may try to explore this, it would be more
realtime, evaluating each listing it recieved.  This would also
provide support for the dirstyle changing on the fly.  I'd need a little
time to explore.

-- 
=====================================================================
Jeffrey D. Brekke                                   jbrekke@wi.rr.com
Wisconsin,  USA                                     brekke@apache.org
                                                    ekkerbj@yahoo.com


---------------------------------------------------------------------
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