summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS7
-rw-r--r--ext/standard/fsock.c2
-rw-r--r--ext/zlib/zlib.c2
-rw-r--r--ext/zlib/zlib_fopen_wrapper.c4
-rw-r--r--main/network.c2
-rwxr-xr-xmain/streams.c8
6 files changed, 11 insertions, 14 deletions
diff --git a/NEWS b/NEWS
index 00d353ea0b..10d9e2352a 100644
--- a/NEWS
+++ b/NEWS
@@ -33,9 +33,8 @@ PHP 4 NEWS
- Added mysql_list_processes() and mysql_stat() functions. (Georg)
- Added file_get_contents($filename), which returns the contents of a file
as a string. It also supports URL wrappers. (Wez)
-- Changed fopen wrappers ('php://', 'bz2://' and 'zlib://') to require the
- '://' separator (instead of simply 'php:', 'bz2:' and 'zlib:') to avoid
- ambiguities when filenames have ':' characters. (Wez)
+- Changed 'zlib:' fopen wrapper to 'compress.zlib://' to avoid ambiguities
+ when filenames have ':' characters. (Wez)
- Added URL-wrapper support to exif. (Marcus)
- PHP now has a new stream system that allows it to do some clever stuff with
fopen() and fsockopen(). As a result:
@@ -43,7 +42,7 @@ PHP 4 NEWS
. fsockopen() adds support for ssl:// and tls:// connections via TCP/IP
. copy($srcfilename, $destfilename) can now be used with URL wrappers
. zlib wrappers/streams can be used even on systems without fopencookie()
- . Added BZip2 stream support.
+ . Added 'compress.bzip2://' stream and wrapper support.
. Added user-space streams - it is now possible to define a class in PHP
code and register it as a URL wrapper.
. Most extensions now support streams when passing files, which means
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 21eb6e8256..9d90788298 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -84,8 +84,6 @@
#ifdef ZTS
static int fsock_globals_id;
-#else
-extern int le_fp;
#endif
#ifdef PHP_WIN32
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index fb63e7d123..fbfd5820e3 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -181,7 +181,7 @@ PHP_MINIT_FUNCTION(zlib)
#ifdef ZTS
ts_allocate_id(&zlib_globals_id, sizeof(zend_zlib_globals), (ts_allocate_ctor) php_zlib_init_globals, NULL);
#endif
- php_register_url_stream_wrapper("zlib", &php_stream_gzip_wrapper TSRMLS_CC);
+ php_register_url_stream_wrapper("compress.zlib", &php_stream_gzip_wrapper TSRMLS_CC);
REGISTER_LONG_CONSTANT("FORCE_GZIP", CODING_GZIP, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FORCE_DEFLATE", CODING_DEFLATE, CONST_CS | CONST_PERSISTENT);
diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c
index 0886689634..034311b809 100644
--- a/ext/zlib/zlib_fopen_wrapper.c
+++ b/ext/zlib/zlib_fopen_wrapper.c
@@ -101,8 +101,8 @@ php_stream *php_stream_gzopen(php_stream_wrapper *wrapper, char *path, char *mod
self = emalloc(sizeof(*self));
- if (strncasecmp("zlib://", path, 7) == 0)
- path += 7;
+ if (strncasecmp("compress.zlib://", path, 16) == 0)
+ path += 16;
else if (strncasecmp("zlib:", path, 5) == 0)
path += 5;
diff --git a/main/network.c b/main/network.c
index 03270bcdfa..a34244e84e 100644
--- a/main/network.c
+++ b/main/network.c
@@ -465,7 +465,7 @@ PHPAPI php_stream *_php_stream_sock_open_unix(const char *path, int pathlen, int
memset(&unix_addr, 0, sizeof(unix_addr));
unix_addr.sun_family = AF_UNIX;
- /* we need to be binary safe for the on systems that support an abstract
+ /* we need to be binary safe on systems that support an abstract
* namespace */
if (pathlen >= sizeof(unix_addr.sun_path)) {
/* On linux, when the path begins with a NUL byte we are
diff --git a/main/streams.c b/main/streams.c
index a6cfccddb8..3af18e25b9 100755
--- a/main/streams.c
+++ b/main/streams.c
@@ -1180,7 +1180,7 @@ static php_stream_wrapper *locate_url_wrapper(char *path, char **path_for_open,
if (options & IGNORE_URL)
return &php_plain_files_wrapper;
- for (p = path; isalnum((int)*p); p++) {
+ for (p = path; isalnum((int)*p) || *p == '+' || *p == '-' || *p == '.'; p++) {
n++;
}
@@ -1188,9 +1188,9 @@ static php_stream_wrapper *locate_url_wrapper(char *path, char **path_for_open,
protocol = path;
} else if (strncasecmp(path, "zlib:", 5) == 0) {
/* BC with older php scripts and zlib wrapper */
- protocol = path;
- n = 4;
- zend_error(E_WARNING, "Use of \"zlib:\" wrapper is deprecated; please use \"zlib://\" instead.");
+ protocol = "compress.zlib";
+ n = 13;
+ zend_error(E_WARNING, "Use of \"zlib:\" wrapper is deprecated; please use \"compress.zlib://\" instead.");
}
if (protocol) {