diff options
-rw-r--r-- | ext/standard/php_fopen_wrapper.c | 3 | ||||
-rw-r--r-- | ext/zlib/zlib_fopen_wrapper.c | 4 | ||||
-rwxr-xr-x | main/streams.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 8677486c52..19aa15a2e4 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -34,6 +34,9 @@ php_stream * php_stream_url_wrap_php(char * path, char * mode, int options, char { FILE * fp = NULL; php_stream * stream = NULL; + + if (!strncasecmp(path, "php://", 6)) + path += 6; if (!strcasecmp(path, "stdin")) { fp = fdopen(dup(STDIN_FILENO), mode); diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c index a12abf1996..434719dae5 100644 --- a/ext/zlib/zlib_fopen_wrapper.c +++ b/ext/zlib/zlib_fopen_wrapper.c @@ -99,8 +99,8 @@ php_stream *php_stream_gzopen(char *path, char *mode, int options, char **opened self = emalloc(sizeof(*self)); - if (strncmp("zlib:", path, 5) == 0) - path += 5; + if (strncasecmp("zlib://", path, 7) == 0) + path += 7; self->stream = php_stream_open_wrapper(path, mode, STREAM_MUST_SEEK|options, opened_path); diff --git a/main/streams.c b/main/streams.c index a02e4c7f7e..0a0f3a32e2 100755 --- a/main/streams.c +++ b/main/streams.c @@ -1029,7 +1029,7 @@ static php_stream *php_stream_open_url(char *path, char *mode, int options, char n++; } - if ((*p == ':') && (n > 1)) { + if ((*p == ':') && (n > 1) && !strncmp("://", p, 3)) { protocol = path; } |