ID:               27202
 Updated by:       [EMAIL PROTECTED]
-Summary:          CURLOPT_POSTFIELDS and CURLOPT_POST don't work
                   properly
 Reported By:      leander2 at berwers dot com
-Status:           Bogus
+Status:           Open
-Bug Type:         cURL related
+Bug Type:         Documentation problem
 Operating System: Linux
 PHP Version:      Irrelevant
 New Comment:

Marking this as a documentation problem and rewriting the summary as
'document all curl constants'.

All curl constants should be documented (or perhaps mention that all
are not, at least until they are), here is a complete list:

http://lxr.php.net/source/php-src/ext/curl/interface.c#130

Wow, there sure are a lot of curl constants! :)  List of constants go
here:

http://cvs.php.net/phpdoc/en/reference/curl/constants.xml

Docs (with useful information) goes here:

http://cvs.php.net/phpdoc/en/reference/curl/functions/curl-setopt.xml


Previous Comments:
------------------------------------------------------------------------

[2004-07-24 23:11:04] fido at list dot pl

Sorry to bother You, but could You point me to a place in manual where
this option is described?? 
I searched it a few times (with and without Ctrl+F) and couldn't find
it. Maybe this "feature" is not yet documented?
I've lost a few hours today fighting with this.. and gave up. I did it
by reinitiating CURL.

------------------------------------------------------------------------

[2004-02-10 11:14:43] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You need to set curl_setopt($ch, CURLOPT_HTTPGET, 1); for 
the 2nd request, the  
curl_setopt($ch, CURLOPT_URL,"http://second";); 
curl_setopt($ch, CURLOPT_POST, 0); 
 
are not needed for request #2. 

------------------------------------------------------------------------

[2004-02-10 04:46:46] leander2 at berwers dot com

Description:
------------
CURLOPT_POST = 0 and/or CURLOPT_POSTFIELDS = null does actually do a
POST while a GET is required

Reproduce code:
---------------
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL,"http://first";);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $b);
        $x = curl_exec($ch);
        curl_setopt($ch, CURLOPT_URL,"http://second";);
        curl_setopt($ch, CURLOPT_POST, 0);
        curl_setopt($ch, CURLOPT_POSTFIELDS, null);
        curl_close($ch);  


Expected result:
----------------
The first request should be a POST and the second request should be a
GET. 

Actual result:
--------------
The first request is a POST (which is ok), but the second request is
also a POST.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27202&edit=1

Reply via email to