]> granicus.if.org Git - php/commitdiff
Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds but returns...
authorIlia Alshanetsky <iliaa@php.net>
Wed, 6 Jan 2010 12:54:53 +0000 (12:54 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 6 Jan 2010 12:54:53 +0000 (12:54 +0000)
main/streams/streams.c

index c70bd49a5b6b98723200b4178186c8749b85eb14..8b394deb274e8c545d89d2d68bb66315d0d71dd0 100755 (executable)
@@ -1877,7 +1877,7 @@ static size_t _php_stream_copy_to_stream_common(php_stream *src, php_stream *des
        /* we've got at least 1 byte to read. 
         * less than 1 is an error */
 
-       if (haveread > 0) {
+       if (haveread > 0 || src->eof) {
                return SUCCESS;
        }
        return FAILURE;