libxml extension ignores default context
| Bug #54440 | libxml extension ignores default context | ||||
|---|---|---|---|---|---|
| Submitted: | 2011-04-01 11:43 UTC | Modified: | 2011-04-09 20:32 UTC | ||
| From: | jpauli@php.net | Assigned: | cataphract (profile) | ||
| Status: | Closed | Package: | Streams related | ||
| PHP Version: | 5.3.6 | OS: | *nix | ||
| Private report: | No | CVE-ID: | None | ||
[2011-04-01 11:43 UTC] 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');
Patches
libxslt_54440.patch (last revision 2011-04-03 22:32 UTC by cataphract@php.net)Pull Requests
History
AllCommentsChangesGit/SVN commits
[2011-04-04 00:36 UTC] cataphract@php.net
[2011-04-09 20:32 UTC] cataphract@php.net
-Summary: stream_context_set_default() should publish the default context to everybody +Summary: libxml extension ignores default context -Status: Open +Status: Closed -Assigned To: +Assigned To: cataphract
[2012-03-29 13:48 UTC] shein@php.net