For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > December 2005 > #35616 [Opn->Csd]: mistake in documentation of CURLOPT_FAILONERROR









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #35616 [Opn->Csd]: mistake in documentation of CURLOPT_FAILONERROR
dave@php.net

2005-12-09, 7:02 pm

ID: 35616
Updated by: dave@php.net
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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com