[wp-trac] [WordPress Trac] #11888: The streams & fopen HTTP transport arnt't sending headers that are passed to it (was: The streams HTTP transport isn't sending headers that are passed to it)
WordPress Trac
wp-trac at lists.automattic.com
Thu Jan 14 10:39:16 UTC 2010
#11888: The streams & fopen HTTP transport arnt't sending headers that are passed
to it
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: HTTP | Version: 2.9.1
Severity: normal | Keywords: 2nd-opinion
-------------------------------+--------------------------------------------
Comment(by dd32):
Ref:
{{{
Custom headers may be sent with an HTTP request prior to version 5 by
taking advantage of a side-effect in the handling of the user_agent INI
setting. Set user_agent to any valid string (such as the default
PHP/version setting) followed by a carriage-return/line-feed pair and any
additional headers. This method works in PHP 4 and all later versions.
Example #1 Sending custom headers with an HTTP request
<?php
ini_set('user_agent', "PHP\r\nX-MyCustomHeader: Foo");
$fp = fopen('http://www.example.com/index.php', 'r');
?>
}}}
http://php.net/manual/en/wrappers.http.php
It seems to suggest theres a PHP5+ method thats better suited, I'm going
to assume this is what the Streams function should be using.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11888#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list