cURL / Mailing Lists / curl-library / Single Mail

curl-library

libcurl doesn't handle responses from some old FTP servers

From: Alistair Campbell <adcingeo_at_hotmail.com>
Date: Fri, 04 Apr 2003 10:49:11 +1000

Hi guys,

I posted this to the feedback board, but Daniel suggested I sent it to the
mailing list...

I've been using libcurl as part of a data warehouse/reporting project for a
major telco.

One of the FTP servers our system interacts with is an old Netware 3.12 FTP
server. This server returns a 200 Command OK reponse code for successful
completion of a CWD command, as opposed to the 250 File Command OK code that
libcurl (ftp.c) expects (and the RFC requires).

To get our system to work, I've had to modify the code in lib/ftp.c on my
installation as follows:

lib/ftp.c, line 729:

if (ftpcode != 250) {
  failf(conn->data, "Couldn't cd to %s", path);
  return CURLE_FTP_ACCESS_DENIED;
}

to

if (ftpcode != 250 && ftpcode != 200) {
  failf(conn->data, "Couldn't cd to %s", path);
  return CURLE_FTP_ACCESS_DENIED;
}

I realise now that the FTP server we are accessing is in the wrong, but I
thought I'd post this anyway to see if anyone has any ideas or opinions on
whether cURL should be a bit more tolerant (and less compliant??) or whether
old FTP servers deserve the hassle they created for them selves... :)

cheers, Al.

_________________________________________________________________
Hotmail now available on Australian mobile phones. Go to
http://ninemsn.com.au/mobilecentral/hotmail_mobile.asp

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Received on 2003-04-04