Error Codes
上一篇 / 下一篇 2012-08-02 14:48:49 / 个人分类:[转贴]技术文章
NAME
libcurl-errors - error codes in libcurl51Testing软件测试网 ys\w \m7}
DESCRIPTION
This man page includes most, if not all, available error codes in libcurl. Why they occur and possibly what you can do to fix the problem are also included.51Testing软件测试网 H:PCS7sx W
CURLcode
Almost all "easy" interface functions return a CURLcode error code. No matter what, using the curl_easy_setopt(3) option CURLOPT_ERRORBUFFER is a good idea as it will give you a human readable error string that may offer more details about the cause of the error than just the error code. curl_easy_strerror(3) can be called to get an error string from a given CURLcode number.51Testing软件测试网I r x8|kB|C
CURLcode is one of the following:51Testing软件测试网${AB$MKB
OJ M9[/E tL`0All fine. Proceed as usual.
/u+Ua&S,yBg0CURLE_UNSUPPORTED_PROTOCOL (1)51Testing软件测试网4`[&\&C+Y8x2v ZhB
The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you didn't use, it can be a misspelled protocol string or just a protocol libcurl has no code for.
jq0a*N Yi06m/TuJ@6g'P'~0Very early initialization code failed. This is likely to be an internal error or problem, or a resource problem where something fundamental couldn't get done at init time.51Testing软件测试网x!|#\4OTN
7D[5s3}2{Z4TM0The URL was not properly formatted.51Testing软件测试网[e L.O6c-i5Me
:};\@(\{2FMo0A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision. This means that a feature or option was not enabled or explicitly disabled when libcurl was built and in order to get it to function you have to get a rebuilt libcurl.
:Y ijg6S v0Ys0CURLE_COULDNT_RESOLVE_PROXY (5)51Testing软件测试网/ml"Dw zl s9Q.W
Couldn't resolve proxy. The given proxy host could not be resolved.51Testing软件测试网K)VB&p(^ f
CURLE_COULDNT_RESOLVE_HOST (6)51Testing软件测试网'[(k&L.iG
Couldn't resolve host. The given remote host was not resolved.51Testing软件测试网{ E:ef }?VQc I
-?9x!l4hXm0Failed to connect() to host or proxy.
2t{?4e jwb4xP0CURLE_FTP_WEIRD_SERVER_REPLY (8)
{)U#vs6T7{ eJD%@0After connecting to a FTP server, libcurl expects to get a certain reply back. This error code implies that it got a strange or bad reply. The given remote server is probably not an OK FTP server.51Testing软件测试网8[7]:y7io5Yg
CURLE_REMOTE_ACCESS_DENIED (9)
}!U,b4u-c0Qu7b0We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory.
1BT U0p.v)sQW p0@*g(r MNr;`0While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or similar.51Testing软件测试网\K H}hVs q
CURLE_FTP_WEIRD_PASS_REPLY (11)51Testing软件测试网9?2bJX1q"N(@bM$}
After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned.51Testing软件测试网&ft-~i&t