diff options
| author | Felipe Pena <felipe@php.net> | 2008-07-11 18:28:25 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2008-07-11 18:28:25 +0000 |
| commit | 6074163f74eb8db06017bbbe8692b740e92e27f8 (patch) | |
| tree | a63c8733d0143b2415318043590ab300aca06524 /ext | |
| parent | 9a58cb0b3c9eb069d5d2274e7efe01e42d1cb48f (diff) | |
| download | php-git-6074163f74eb8db06017bbbe8692b740e92e27f8.tar.gz | |
- Fixed bug #45449 (filesize() regression using ftp wrapper) (patch by crrodriguez at suse dot de)
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/ftp_fopen_wrapper.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index c8d4b7a481..3dde2f5fdb 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -777,6 +777,13 @@ static int php_stream_ftp_url_stat(php_stream_wrapper *wrapper, char *url, int f } php_stream_write_string(stream, "TYPE I\r\n"); /* we need this since some servers refuse to accept SIZE command in ASCII mode */ + + result = GET_FTP_RESULT(stream); + + if(result < 200 || result > 299) { + goto stat_errexit; + } + php_stream_printf(stream TSRMLS_CC, "SIZE %s\r\n", (resource->path != NULL ? resource->path : "/")); result = GET_FTP_RESULT(stream); if (result < 200 || result > 299) { |
