cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: OS400 ftp server related problem

From: Patrick Monnerat <Patrick.Monnerat_at_datasphere.ch>
Date: Mon, 10 Aug 2009 18:03:12 +0200

 
Michael Wood wrote:
> Daniel Stenberg wrote:
>> I figure a sensible thing to send would be SYST.
>> The downside with this approach is that libcurl would send an extra
>> command for each new control connection and perhaps most importantly:

>> I found references on the web that claim: "Often times FTP servers
>> block this information or allow the administrator specify what the
response should be."
>> which thus would render the results useless and we'd be back on
square
>> one again...

> I'm not sure it would be useless. I think it's unlikely that FTP
servers on other operating systems would pretend to be running on OS400.

Many thanks for these informations. I can write a patch that does:

PWD -->
<-- 257 "QGPL" is current library.

If the initial directory character is not a '/', then
        SYST -->
        <-- 215 OS/400 is the remote operating system. The TCP/IP
version is "V5R4M0".

        If the string contains " OS/400 ", then
                SITE NAMEFMT 1 -->
                <-- 250 Now using naming format "1".
                PWD -->
                <-- 257 "/QSYS.LIB/QGPL.LIB" is current library.

This will not add any protocol overhead for servers that are not on
OS/400, or that start in name format 1 mode.
In addition, if some other "strange" servers/OS are discovered in the
future, the infrastructure to deal with would already be in place.

Daniel, would you accept such a patch ?

Kind regards,
Patrick
Received on 2009-08-10