Edit report at http://bugs.php.net/bug.php?id=54440&edit=1

 ID:                 54440
 Updated by:         cataphr...@php.net
 Reported by:        jpa...@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] cataphr...@php.net

Obviously the patch wasn't meant to be attached here. Sorry.

------------------------------------------------------------------------
[2011-04-04 00:32:46] cataphr...@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] jpa...@php.net

See also #52926

------------------------------------------------------------------------
[2011-04-01 11:43:32] jpa...@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

Reply via email to