diff options
author | Antony Dovgal <tony2001@php.net> | 2008-07-11 10:25:15 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2008-07-11 10:25:15 +0000 |
commit | cf7e15c3a0fb44f57298c1761a373ca08a6d4a9d (patch) | |
tree | 01f29a896bb67c620cb1a02d1ea28506c71c34a4 /ext/standard/http_fopen_wrapper.c | |
parent | 46f41aded18fe844e00385fb670a321bf2a75837 (diff) | |
download | php-git-cf7e15c3a0fb44f57298c1761a373ca08a6d4a9d.tar.gz |
MFH: manage references of stream context properly
Diffstat (limited to 'ext/standard/http_fopen_wrapper.c')
-rw-r--r-- | ext/standard/http_fopen_wrapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 7382d38882..0140f2e94a 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -611,6 +611,9 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, if (location[0] != '\0') php_stream_notify_info(context, PHP_STREAM_NOTIFY_REDIRECTED, location, 0); + if (context) { /* keep the context for the next try */ + zend_list_addref(context->rsrc_id); + } php_stream_close(stream); stream = NULL; |