Re: FTP returns wrong file size (and a fix)
| From: | derick@php.net | Date: | Wed, 13 Mar 2002 21:39:55 +0000 |
| Subject: | Re: FTP returns wrong file size (and a fix) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-81170@lists.php.net to get a copy of this message | ||
On Wed, 13 Mar 2002, Vlad Krupin wrote:
> I guess, we could do that too. Should I come up with a new patch?
I think it is better, decrease the WTF factor :)
Derick
> derick@php.net wrote:
>
> >On Wed, 13 Mar 2002, Vlad Krupin wrote:
> >
> >>I suggest that we always request the filesize after issuing a 'binary'
> >>command. The fix is a one-liner, and I was wondering if there would be
> >>objections to merging it into the release branch as well.
> >>
> >
> >would it be possible to restore the FTPTYPE after the SIZE ?
> >
> >Derick
> >
> >>Do you guys mind if I commit that patch?
> >>
> >>--- ftp.c-old Sat Aug 11 09:38:27 2001
> >>+++ ftp.c Wed Mar 13 17:07:00 2002
> >>@@ -653,6 +653,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)
> >>
> >>
> >>Vlad
> >>
> >>--
> >>Vlad Krupin
> >>Software Engineer
> >>echospace.com
> >>
> >>
> >>--
> >>PHP Development Mailing List
> >><http://www.php.net/>
> >>To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >
> >----------------------------------------------------------------------
> > PHP: Scripting the Web - derick@php.net
> > All your branches are belong to me!
> > SRM: Site Resource Manager - www.vl-srm.net
> >-----------------------------------------------------------------------
> >
> >
>
>
>
----------------------------------------------------------------------
PHP: Scripting the Web - derick@php.net
All your branches are belong to me!
SRM: Site Resource Manager - www.vl-srm.net
-----------------------------------------------------------------------