#34180 [Asn->Csd]: --with-curlwrappers causes PHP to disregard some HTTP stream context options
| From: | mike@php.net | Date: | Thu, 25 May 2006 13:10:43 +0000 |
| Subject: | #34180 [Asn->Csd]: --with-curlwrappers causes PHP to disregard some HTTP stream context options | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97596@lists.php.net to get a copy of this message | ||
ID: 34180
Updated by: mike@php.net
Reported By: ibrash at gmail dot com
-Status: Assigned
+Status: Closed
Bug Type: cURL related
Operating System: *
PHP Version: 5CVS-2005-08-30
Assigned To: pollita
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-08-18 06:38:14] ibrash at gmail dot com
Description:
------------
When PHP is compiled with --with-curl --with-curlwrappers, setting the
HTTP method to POST in a stream context is disregarded and GET is used
instead.
This affects both 5.0 and 5.1 and presumably HEAD (haven't checked).
Reproduce code:
---------------
<?php
$opts = array(
'http' => array(
'method' => 'POST',
'header' => "Content-Type: application/x-www-form-urlencoded",
'content' => 'foo=bar'
)
);
$context = stream_context_create($opts);
readfile ('http://gaernin.aswwc.net/~ibrash/temp/dumprequestinfo.php',
false, $context);
?>
For reference, dumprequestinfo.php is <?php
var_dump($_SERVER['REQUEST_METHOD']); print_r($_POST); ?>
Expected result:
----------------
string(4) "POST"
Array
(
[foo] => "bar"
)
Actual result:
--------------
string(3) "GET"
Array
(
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34180&edit=1