#34180 [NEW]: --with-curlwrappers causes PHP to disregard some HTTP stream context options
| From: | ibrash at gmail dot com | Date: | Thu, 18 Aug 2005 04:38:15 +0000 |
| Subject: | #34180 [NEW]: --with-curlwrappers causes PHP to disregard some HTTP stream context options | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-83742@lists.php.net to get a copy of this message | ||
From: ibrash at gmail dot com
Operating system: Linux
PHP version: 5.1.0b3
PHP Bug Type: cURL related
Bug description: --with-curlwrappers causes PHP to disregard some HTTP stream context options
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 bug report at http://bugs.php.net/?id=34180&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34180&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34180&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34180&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34180&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34180&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34180&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34180&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34180&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34180&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34180&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34180&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34180&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34180&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34180&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34180&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34180&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34180&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34180&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34180&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34180&r=mysqlcfg