ID: 15279
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Feedback
Bug Type: cURL related
Operating System: Linux
PHP Version: 4.1.1
New Comment:
What happens if you try with a valid HTTP request, or just
'GET', as the custom response? The script you gave below
didn't work for me either, but did if I did either of:
$request = "GET /index.html HTTP/1.0\r\n\r\n";
...or...
$request = "GET";
Can you try that and report back?
Torben
Previous Comments:
------------------------------------------------------------------------
[2002-01-29 11:53:52] [EMAIL PROTECTED]
When using curl to request a page, if I just set RETURNTRANSFER
curlopt, things work as expected (output is dumped into a variable). If
I just set CUSTOMREQUEST, thinks work as expected (output is dumped to
stdout). However, if I set RETURNTRANSFER and CUSTOMREQUEST at the same
time, I get no output. The request is made, according to my apache
logs, but I get nothing. Here is some demo code:
<?
$c = curl_init();
$request = '';
$request .= 'GET /testfiles/phptest.php' . "\r\n";
curl_setopt($c, CURLOPT_URL,
'http://localhost:8080/testfiles/phptest.php');
curl_setopt($c, CURLOPT_CUSTOMREQUEST, $request);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo trim( curl_exec($c) );
curl_close($c);
?>
That is an example of a request that will not work. Comment either one
of the "curl_setopt" lines out and it will.
Thanks,
robert
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15279&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php