cvs: php4 /ext/ftp ftp.c

From: Date: Mon, 18 Mar 2002 22:26:33 +0000
Subject: cvs: php4 /ext/ftp ftp.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-10384@lists.php.net to get a copy of this message
vlad Mon Mar 18 17:26:33 2002 EDT Modified files: /php4/ext/ftp ftp.c Log: Fix ftp_size() returning bogus results. # make sure the server is in BINARY mode before requesting file size. Index: php4/ext/ftp/ftp.c diff -u php4/ext/ftp/ftp.c:1.48 php4/ext/ftp/ftp.c:1.49 --- php4/ext/ftp/ftp.c:1.48 Mon Mar 18 13:54:24 2002 +++ php4/ext/ftp/ftp.c Mon Mar 18 17:26:32 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.c,v 1.48 2002/03/18 18:54:24 wez Exp $ */ +/* $Id: ftp.c,v 1.49 2002/03/18 22:26:32 vlad Exp $ */ #include "php.h" @@ -685,6 +685,8 @@ 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)

« previous php.cvs (#10384) next »