iliaa Wed Jan 18 14:05:28 2006 UTC Modified files: /php-src/ext/standard url.c Log: MFB51: Make get_headers() use the default context. http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/url.c?r1=1.89&r2=1.90&diff_format=u Index: php-src/ext/standard/url.c diff -u php-src/ext/standard/url.c:1.89 php-src/ext/standard/url.c:1.90 --- php-src/ext/standard/url.c:1.89 Sun Jan 1 13:09:56 2006 +++ php-src/ext/standard/url.c Wed Jan 18 14:05:28 2006 @@ -15,7 +15,7 @@ | Author: Jim Winstead <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: url.c,v 1.89 2006/01/01 13:09:56 sniper Exp $ */ +/* $Id: url.c,v 1.90 2006/01/18 14:05:28 iliaa Exp $ */ #include <stdlib.h> #include <string.h> @@ -25,6 +25,7 @@ #include "php.h" #include "url.h" +#include "file.h" #ifdef _OSD_POSIX #ifndef APACHE #error On this EBCDIC platform, PHP is only supported as an Apache module. @@ -658,7 +659,7 @@ { char *url; int url_len; - php_stream_context *context = NULL; + php_stream_context *context; php_stream *stream; zval **prev_val, **hdr = NULL; HashPosition pos; @@ -667,6 +668,7 @@ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &url, &url_len, &format) == FAILURE) { return; } + context = FG(default_context) ? FG(default_context) : (FG(default_context) = php_stream_context_alloc()); if (!(stream = php_stream_open_wrapper_ex(url, "r", REPORT_ERRORS | STREAM_USE_URL | STREAM_ONLY_GET_HEADERS, NULL, context))) { RETURN_FALSE;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php