度过了一个冬眠,在春末夏初之际,补充自己的营养,努力学习,努力工作!

Error Codes

上一篇 / 下一篇  2012-08-02 14:48:49 / 个人分类:[转贴]技术文章

原文地址http://curl.haxx.se/libcurl/c/libcurl-errors.html
tW3k D p"L|v0

NAME

libcurl-errors - error codes in libcurl51Testing软件测试网%IE b e9`6_1Q6^,p[

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.

K+y[l!gOk@ q0

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.

kRZ7n(M9fl5yhs"@5Y0

CURLcode is one of the following:

;Z5eFj$\Sg~+x0

CURLE_OK (0)

l:sdg4B;m I&~0

All fine. Proceed as usual.51Testing软件测试网Y0ks&Vd

CURLE_UNSUPPORTED_PROTOCOL (1)51Testing软件测试网g!{#z _ mu9m`M

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.

&}(~c.Hfc2m0

CURLE_FAILED_INIT (2)51Testing软件测试网,W2v+w1f~Q*KS-X H

Very 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软件测试网*Wm*Yb { X:P#X

CURLE_URL_MALFORMAT (3)

&]'xp tRXa0

The URL was not properly formatted.

D%~i9u g0u0

CURLE_NOT_BUILT_IN (4)51Testing软件测试网8_r2ZR ~ Eb3SY

A 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.51Testing软件测试网2` lG1Blvw

CURLE_COULDNT_RESOLVE_PROXY (5)51Testing软件测试网:o4QQ `1[#?O

Couldn't resolve proxy. The given proxy host could not be resolved.

!h u-qR'KS T;`#]2P;g0

CURLE_COULDNT_RESOLVE_HOST (6)

!ne;bijp'h(Q@0

Couldn't resolve host. The given remote host was not resolved.51Testing软件测试网t KH(j0V#W9W3a*J

CURLE_COULDNT_CONNECT (7)51Testing软件测试网y` ~,K6D){~)k(a

Failed to connect() to host or proxy.51Testing软件测试网/A:rqdY&xnw

CURLE_FTP_WEIRD_SERVER_REPLY (8)

8a#w][ SY0

After 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.

m#wkiy9O P E%A)u0

CURLE_REMOTE_ACCESS_DENIED (9)

Qz*GA)Ai U5z&J0

We were denied access to the resource given in the URL. For FTP, this occurs while trying to change to the remote directory.

/p8A?5?1J%Yi0

CURLE_FTP_ACCEPT_FAILED (10)51Testing软件测试网0f*[D[MF

While 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软件测试网o'@-M:Z6xT;rE

CURLE_FTP_WEIRD_PASS_REPLY (11)

oB0jP/Lhx@&N0

After having sent the FTP password to the server, libcurl expects a proper reply. This error code indicates that an unexpected code was returned.

A$w'^\ Z0In5yk0

CURLE_FTP_ACCEPT_TIMEOUT (12)51Testing软件测试网KPS8yBW Dx k-S

During an active FTP session while waiting for the server to connect, the CURLOPT_ACCEPTTIMOUT_MS (or the internal default) timeout expired.51Testing软件测试网-Q"MV }m)co

CURLE_FTP_WEIRD_PASV_REPLY (13)51Testing软件测试网%A2e6P,D+T%{7[

libcurl failed to get a sensible result back from the server as a response to either a PASV or a EPSV command. The server is flawed.51Testing软件测试网&~*lEZ!PJnpC

CURLE_FTP_WEIRD_227_FORMAT (14)

}y%n gEp3w eu0

FTP servers return a 227-line as a response to a PASV command. If libcurl fails to parse that line, this return code is passed back.

m/DxK1b+Si)\pP.W0

CURLE_FTP_CANT_GET_HOST (15)51Testing软件测试网7Cb p;qL

An internal failure to lookup the host used for the new connection.51Testing软件测试网~7MeS \{ b8uS

CURLE_FTP_COULDNT_SET_TYPE (17)

3SGZ#N`0

Received an error when trying to set the transfer mode to binary or ASCII.51Testing软件测试网e,i;HT$U

CURLE_PARTIAL_FILE (18)51Testing软件测试网r'vCVC4Jn6ea1z!@

A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously given size.

N"}2Oi%@5[5i%x"rT k0

CURLE_FTP_COULDNT_RETR_FILE (19)51Testing软件测试网}/t:m9?Sug

This was either a weird reply to a 'RETR' command or a zero byte transfer complete.

J7^Z~`?(\} k0

CURLE_QUOTE_ERROR (21)51Testing软件测试网Q3jIBWx

When sending custom "QUOTE" commands to the remote server, one of the commands returned an error code that was 400 or higher (for FTP) or otherwise indicated unsuccessful completion of the command.51Testing软件测试网J0I-hm9}

CURLE_HTTP_RETURNED_ERROR (22)51Testing软件测试网m;[ Bw)LK

This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is >= 400.

3mf`@n Af4UC*g0

CURLE_WRITE_ERROR (23)51Testing软件测试网g`Ie:Zd~'K

An error occurred when writing received data to a local file, or an error was returned to libcurl from a write callback.51Testing软件测试网1Ed ~v4[

CURLE_UPLOAD_FAILED (25)

jc{(n1k _5S0

Failed starting the upload. For FTP, the server typically denied the STOR command. The error buffer usually contains the server's explanation for this.

b;J!kk(]0

CURLE_READ_ERROR (26)

_)f0@,ok#uZ1W5u0

There was a problem reading a local file or an error returned by the read callback.51Testing软件测试网&J0|+l B(\(l|

CURLE_OUT_OF_MEMORY (27)

xr@D4Gqg0

A memory allocation request failed. This is serious badness and things are severely screwed up if this ever occurs.51Testing软件测试网5ggI-Q!N R(Es

CURLE_OPERATION_TIMEDOUT (28)

b5r2k'cz0

Operation timeout. The specified time-out period was reached according to the conditions.51Testing软件测试网M5u9BspG(QOt

CURLE_FTP_PORT_FAILED (30)

j"ZS*al%yRaMXm0

The FTP PORT command returned error. This mostly happens when you haven't specified a good enough address for libcurl to use. See CURLOPT_FTPPORT.

'^ q,o9Xu$z0

CURLE_FTP_COULDNT_USE_REST (31)

"N#z+~?!m0

The FTP REST command returned error. This should never happen if the server is sane.51Testing软件测试网ES*^1](W,]&xV5i0o

CURLE_RANGE_ERROR (33)51Testing软件测试网;Lyt uWN)fv

The server does not support or accept range requests.51Testing软件测试网0O!n-Q5VwI:n(T

CURLE_HTTP_POST_ERROR (34)51Testing软件测试网N1H9_*]&oh5h o3O

This is an odd error that mainly occurs due to internal confusion.

qXF(h"Z0

CURLE_SSL_CONNECT_ERROR (35)51Testing软件测试网dG7^%T'U v/E&E9u7n.gy

A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others.

/E&p O,Z&I*x4s)m0

CURLE_BAD_DOWNLOAD_RESUME (36)51Testing软件测试网 ZN:@w0QavdI

The download could not be resumed because the specified offset was out of the file boundary.51Testing软件测试网(u5M4cB z4P(U

CURLE_FILE_COULDNT_READ_FILE (37)51Testing软件测试网#D4u C!X/qLd"H

A file given with FILE:// couldn't be opened. Most likely because the file path doesn't identify an existing file. Did you check file permissions?

MZ;UD6q"L0

CURLE_LDAP_CANNOT_BIND (38)51Testing软件测试网/~3c\Xt+iv

LDAP cannot bind. LDAP bind operation failed.51Testing软件测试网0m%X;N8FJ i)~

CURLE_LDAP_SEARCH_FAILED (39)51Testing软件测试网p1C1G;I_kF4_`

LDAP search failed.

k(^q9V.f[;L0

CURLE_FUNCTION_NOT_FOUND (41)51Testing软件测试网Hj1bu:mz

Function not found. A required zlib function was not found.

1n*fq P-pI0

CURLE_ABORTED_BY_CALLBACK (42)

'LH\%qR3Dr0

Aborted by callback. A callback returned "abort" to libcurl.

T2M8G!T.^)R!]2a0

CURLE_BAD_FUNCTION_ARGUMENT (43)

6P_w H L0

Internal error. A function was called with a bad parameter.51Testing软件测试网lJLwKG

CURLE_INTERFACE_FAILED (45)51Testing软件测试网u-O#} m8q7P;A7Y!f

Interface error. A specified outgoing interface could not be used. Set which interface to use for outgoing connections' source IP address with CURLOPT_INTERFACE.

5w#cJIxb0

CURLE_TOO_MANY_REDIRECTS (47)51Testing软件测试网p |.gRG Pw4Y

Too many redirects. When following redirects, libcurl hit the maximum amount. Set your limit with CURLOPT_MAXREDIRS.

c$v*JwwD4lw2n0

CURLE_UNKNOWN_OPTION (48)

l$~2v1NfQ"\0

An option passed to libcurl is not recognized/known. Refer to the appropriate documentation. This is most likely a problem in the program that uses libcurl. The error buffer might contain more specific information about which exact option it concerns.

A+F(m8?x-_h)M0

CURLE_TELNET_OPTION_SYNTAX (49)

-Z!wb7i ?|C0

A telnet option string was Illegally formatted.

6j XOuS3oD2V0

CURLE_PEER_FAILED_VERIFICATION (51)51Testing软件测试网/D0V I.W e

The remote server's SSL certificate or SSH md5 fingerprint was deemed not OK.

&c MU;@)XD0

CURLE_GOT_NOTHING (52)

0^CN[ q3jw7P0

Nothing was returned from the server, and under the circumstances, getting nothing is considered an error.

?T ~LxJl0

CURLE_SSL_ENGINE_NOTFOUND (53)51Testing软件测试网f#kzt~

The specified crypto engine wasn't found.

dm.}EgR0

CURLE_SSL_ENGINE_SETFAILED (54)

e:CL7^)I$N-C0

Failed setting the selected SSL crypto engine as default!51Testing软件测试网!]9z7Eu y!D4h~

CURLE_SEND_ERROR (55)

Q\ _(z;I0

Failed sending network data.51Testing软件测试网 F6C?B%A#Hpy

CURLE_RECV_ERROR (56)

p jR-d_ e m8N } ^0

Failure with receiving network data.

g/rBjg;L l0

CURLE_SSL_CERTPROBLEM (58)51Testing软件测试网y0QZ w1I/d(|

problem with the local client certificate.51Testing软件测试网*G ^D+o ?

CURLE_SSL_CIPHER (59)

:U1e-t$M.|'P0

TAG:

 

评分:0

我来说两句

日历

« 2024-05-08  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 197452
  • 日志数: 283
  • 书签数: 1
  • 建立时间: 2007-04-23
  • 更新时间: 2015-07-31

RSS订阅

Open Toolbar