]> granicus.if.org Git - php/commitdiff
Ensure that the seekable stream returned for include("http://") under win32
authorWez Furlong <wez@php.net>
Mon, 23 Sep 2002 19:10:33 +0000 (19:10 +0000)
committerWez Furlong <wez@php.net>
Mon, 23 Sep 2002 19:10:33 +0000 (19:10 +0000)
is based on a temporary file rather than a memory stream.

main/streams.c

index ea20c869af040e92efad97937a2f8c9378876fd6..ef37fb4a35aa769bf109105f92749fe4ff1c89f6 100755 (executable)
@@ -1864,7 +1864,9 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(char *path, char *mode, int optio
        if (stream != NULL && (options & STREAM_MUST_SEEK)) {
                php_stream *newstream;
 
-               switch(php_stream_make_seekable_rel(stream, &newstream, PHP_STREAM_NO_PREFERENCE)) {
+               switch(php_stream_make_seekable_rel(stream, &newstream,
+                                       (options & STREAM_WILL_CAST)
+                                               ? PHP_STREAM_PREFER_STDIO : PHP_STREAM_NO_PREFERENCE)) {
                        case PHP_STREAM_UNCHANGED:
                                return stream;
                        case PHP_STREAM_RELEASED: