1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 01:48:26 +02:00

- Fixed bug #48637 ("file" wrapper is overwritten when using --with-curlwrappers)

# Also fixes bug #48603, basically same issue.
This commit is contained in:
Jani Taskinen
2009-07-25 20:44:19 +00:00
parent 57140f7db0
commit 776cb8a669
2 changed files with 14 additions and 1 deletions
+2
View File
@@ -46,6 +46,8 @@ PHP NEWS
components). (Ilia)
- Fixed bug #48681 (openssl signature verification for tar archives broken).
(Greg)
- Fixed bug #48637 ("file" fopen wrapper is overwritten when using
--with-curlwrappers). (Jani)
- Fixed bug #48377 (error message unclear on converting phar with existing file).
(Greg)
- Fixed bug #48247 (Infinite loop and possible crash during startup with
+12 -1
View File
@@ -818,13 +818,24 @@ PHP_MINIT_FUNCTION(curl)
char **p = (char **)info->protocols;
while (*p != NULL) {
php_register_url_stream_wrapper(*p++, &php_curl_wrapper TSRMLS_CC);
/* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */
if (strncasecmp(*p, "file", sizeof("file")-1) != 0) {
php_unregister_url_stream_wrapper(*p);
php_register_url_stream_wrapper(*p, &php_curl_wrapper TSRMLS_CC);
}
(void) *p++;
}
}
# else
php_unregister_url_stream_wrapper("http");
php_register_url_stream_wrapper("http", &php_curl_wrapper TSRMLS_CC);
php_unregister_url_stream_wrapper("https");
php_register_url_stream_wrapper("https", &php_curl_wrapper TSRMLS_CC);
php_unregister_url_stream_wrapper("ftp");
php_register_url_stream_wrapper("ftp", &php_curl_wrapper TSRMLS_CC);
php_unregister_url_stream_wrapper("ftps");
php_register_url_stream_wrapper("ftps", &php_curl_wrapper TSRMLS_CC);
php_unregister_url_stream_wrapper("ldap");
php_register_url_stream_wrapper("ldap", &php_curl_wrapper TSRMLS_CC);
# endif
#endif