mirror of
https://github.com/php/php-src.git
synced 2024-12-01 13:54:10 +08:00
Fix ftp_size() returning bogus results.
# make sure the server is in BINARY mode before requesting file size.
This commit is contained in:
parent
46315144ee
commit
7139845af9
@ -685,6 +685,8 @@ ftp_size(ftpbuf_t *ftp, const char *path)
|
||||
if (ftp == NULL)
|
||||
return -1;
|
||||
|
||||
if (!ftp_type(ftp, FTPTYPE_IMAGE))
|
||||
return -1;
|
||||
if (!ftp_putcmd(ftp, "SIZE", path))
|
||||
return -1;
|
||||
if (!ftp_getresp(ftp) || ftp->resp != 213)
|
||||
|
Loading…
Reference in New Issue
Block a user