|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-25 13:10 UTC] mike@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 02:00:01 2025 UTC |
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 ( )