diff options
author | Andrew Skalski <askalski@php.net> | 2000-02-16 16:07:27 +0000 |
---|---|---|
committer | Andrew Skalski <askalski@php.net> | 2000-02-16 16:07:27 +0000 |
commit | 2ba009c0f1771210118509a271bccc06923227e3 (patch) | |
tree | e3c2a166f7c4277ac2e9e7bf3d9b6b171873ec80 /ext/ftp/ftp.c | |
parent | 1ed56d5d0883b016b62492b1a77d68036026fb7b (diff) | |
download | php-git-2ba009c0f1771210118509a271bccc06923227e3.tar.gz |
recognize 125 as success for put/get commands
Diffstat (limited to 'ext/ftp/ftp.c')
-rw-r--r-- | ext/ftp/ftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 */ |