Bug #54440 [Opn->Csd]: libxml extension ignores default context
| From: | cataphract@php.net | Date: | Sat, 09 Apr 2011 18:33:00 +0000 |
| Subject: | Bug #54440 [Opn->Csd]: libxml extension ignores default context | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-160074@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=54440&edit=1
ID: 54440
Updated by: cataphract@php.net
Reported by: jpauli@php.net
-Summary: stream_context_set_default() should publish the
default context to everybody
+Summary: libxml extension ignores default context
-Status: Open
+Status: Closed
Type: Bug
Package: Streams related
Operating System: *nix
PHP Version: 5.3.6
-Assigned To:
+Assigned To: cataphract
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2011-04-04 00:36:28] cataphract@php.net
Obviously the patch wasn't meant to be attached here. Sorry.
------------------------------------------------------------------------
[2011-04-04 00:32:46] cataphract@php.net
The following patch has been added/updated:
Patch Name: libxslt_54440.patch
Revision: 1301869965
URL:
http://bugs.php.net/patch-display.php?bug=54440&patch=libxslt_54440.patch&revision=1301869965
------------------------------------------------------------------------
[2011-04-01 11:45:40] jpauli@php.net
See also #52926
------------------------------------------------------------------------
[2011-04-01 11:43:32] jpauli@php.net
Description:
------------
stream_context_set_default() doesn't publish the context to all PHP
extension.
Example is ext/libxml that doesn't recognize the context.
Test script:
---------------
stream_context_set_default(array('http'=>array('proxy'=>'my_proxy_url')));
$x = simplexml_load_file('http://some_resource');
Expected result:
----------------
The resource gets loaded through the HTTP proxy
Actual result:
--------------
The resource is not loaded through the HTTP proxy.
For this to work, we have to use :
$ctx =
stream_context_create(array('http'=>array('proxy'=>'my_proxy_url')));
libxml_set_streams_context($ctx); // userland manual bind
$x = simplexml_load_file('http://some_resource');
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54440&edit=1