Comment 6 for bug 650779

Revision history for this message
Christian Weiske (cweiske) wrote :

This actually happens with a much smaller test script, as soon as you use POST together with "content" in the context options.

<?php
$opts = array('http' => array('method' => 'POST', 'content' => 'foo'));
$context = stream_context_create($opts);
$result = file_get_contents('http://localhost/poster.php', false, $context);
?>

result:
PHP Warning: file_get_contents(http://localhost:4436/ResourceAll): failed to open stream: HTTP request failed!

When you remove the content key, all is fine.