php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #35616 mistake in documentation of CURLOPT_FAILONERROR
Submitted: 2005-12-09 22:30 UTC Modified: 2005-12-09 22:52 UTC
From: humbads at alum dot mit dot edu Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Windows XP SP2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: humbads at alum dot mit dot edu
New email:
PHP Version: OS:

 

 [2005-12-09 22:30 UTC] 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.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-09 22:52 UTC] dave@php.net
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.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Aug 03 13:00:02 2025 UTC