curl-library
Re: optimizing TYPE in FTP
Date: Fri, 11 Aug 2006 00:49:57 +0200
>> here is a patch, it works well for me, but i could not pass the test
>> suite on it (i am on Windows, how should i do?)
>
> Thanks! I don't believe it works fine on Windows at all. Parts of it used
> to work on Windows, but I don't think anyone has tested for a good while.
>
>> it does not optimize first 'TYPE' request on new connections to avoid
>> relying on server respecting the TYPE A default (as they should as per
>> rfc959).
>
> Sounds good, since we then won't stop functioning on servers we currently
> work with just by assuming they are standards compliant...
>
> Let me just comment on the code style. You did several lines like this:
>
> + if ((result=ftp_nbsendtransfertype(conn, data->set.ftp_ascii,
> FTP_TYPE))) return result;
>
> ... while curl code in general always is narrower than 80 columns and
> splits it up like this:
>
> result=ftp_nbsendtransfertype(conn, data->set.ftp_ascii, FTP_TYPE);
> if(result)
> return result;
>
> I happen to find it much easier to read and the generated code is exactly
> the same. You also didn't follow the {}-style or even the 2-space indent
> tradition.
>
> Apart from that the actual functionality seems fine. I'm having this patch
> on hold a bit though since I'm working to get a monster-huge patch applied
> that will remove the tight connection between 'connectdata' structs and
> 'SessionHandle' structs (and thus your patch will need to be slightly
> adjusted).
ok, no problem. is it ok to go on with the SIZE stuff?
Armel
Received on 2006-08-11