From: Andrew Skalski Date: Wed, 16 Feb 2000 16:07:27 +0000 (+0000) Subject: recognize 125 as success for put/get commands X-Git-Tag: BEFORE_SAPI_POST_PATCH_17_FEB_2000~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ba009c0f1771210118509a271bccc06923227e3;p=php recognize 125 as success for put/get commands --- diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 4ced3839a0..916e706c72 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -484,7 +484,7 @@ ftp_get(ftpbuf_t *ftp, FILE *outfp, const char *path, ftptype_t type) if (!ftp_putcmd(ftp, "RETR", path)) goto bail; - if (!ftp_getresp(ftp) || ftp->resp != 150) + if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) goto bail; if ((data = data_accept(data)) == NULL) @@ -546,7 +546,7 @@ ftp_put(ftpbuf_t *ftp, const char *path, FILE *infp, ftptype_t type) if (!ftp_putcmd(ftp, "STOR", path)) goto bail; - if (!ftp_getresp(ftp) || ftp->resp != 150) + if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) goto bail; if ((data = data_accept(data)) == NULL) @@ -1087,7 +1087,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path) if (!ftp_putcmd(ftp, cmd, path)) goto bail; - if (!ftp_getresp(ftp) || ftp->resp != 150) + if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) goto bail; /* pull data buffer into tmpfile */