From: humbads at alum dot mit dot edu Operating system: Windows XP SP2 PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: mistake in documentation of CURLOPT_FAILONERROR
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 bug report at http://bugs.php.net/?id=35616&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35616&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35616&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35616&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35616&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35616&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35616&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35616&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35616&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35616&r=support Expected behavior: http://bugs.php.net/fix.php?id=35616&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35616&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35616&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35616&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35616&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35616&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35616&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35616&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35616&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35616&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35616&r=mysqlcfg