ID:               35616
 Updated by:       [EMAIL PROTECTED]
 Reported By:      humbads at alum dot mit dot edu
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: Windows XP SP2
 PHP Version:      Irrelevant
 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.


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

[2005-12-09 22:30:37] humbads at alum dot mit dot edu

Description:
------------
In the curl_setopt documentation page, under CURLOPT_FAILONERROR, it
says "TRUE to fail silently if the HTTP code returned is greater than
300..."  It should say "greater than or equal to 400" not "greater than
300".

Expected result:
----------------
HTTP status codes >= 400 are errors according to RFC2616:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
  
The option's behavior is correct.  When I ran a simple HTTP GET with
against a page that returns 301 (redirect), with CURLOPT_FAILONERROR
set to true, the error code returned is zero (no error).

If you look in the libcurl documentation of error codes, it says,
"CURLE_HTTP_RETURNED_ERROR (22)  This is returned if
CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error
code that is >= 400."

http://curl.haxx.se/libcurl/c/libcurl-errors.html

However, if you look in the set_opt function's documentation, it says,
"CURLOPT_FAILONERROR A non-zero parameter tells the library to fail
silently if the HTTP code returned is equal to or larger than 300..."

http://curl.haxx.se/libcurl/c/curl_easy_setopt.html

This is probably wrong.  I have contacted libcurl to update this.




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


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

Reply via email to