ID: 34180
User updated by: ibrash at gmail dot com
Reported By: ibrash at gmail dot com
Status: Assigned
Bug Type: cURL related
Operating System: Linux
PHP Version: 5.1.0b3
Assigned To: pollita
New Comment:
Sara already knows about it as she was the one to help me figure out
what was causing this problem on IRC. Unfortunately, the network with
the server hosting requestdump.php is having some routing problems and
is inaccessible at the moment, but that should clear up pretty soon and
if it doesn't, I provided the source in my original submission.
Previous Comments:
------------------------------------------------------------------------
[2005-08-18 13:02:36] [EMAIL PROTECTED]
Sara, check this out.
------------------------------------------------------------------------
[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