From: Wez Furlong Date: Mon, 23 Sep 2002 19:10:33 +0000 (+0000) Subject: Ensure that the seekable stream returned for include("http://") under win32 X-Git-Tag: MODERN_SYMMETRIC_SESSION_BEHAVIOUR_20021003~219 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2c344fa6724f6480d5219dfb00dbf51459985a2;p=php Ensure that the seekable stream returned for include("http://") under win32 is based on a temporary file rather than a memory stream. --- diff --git a/main/streams.c b/main/streams.c index ea20c869af..ef37fb4a35 100755 --- a/main/streams.c +++ b/main/streams.c @@ -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: