upcoming new error code
[platform/upstream/curl.git] / docs / libcurl / libcurl-errors.3
1 .\" You can view this file with:
2 .\" nroff -man [file]
3 .\" $Id$
4 .\"
5 .TH libcurl-errors 3 "9 Feb 2005" "libcurl 7.13.1" "libcurl errors"
6 .SH NAME
7 libcurl-errors \- error codes in libcurl
8 .SH DESCRIPTION
9 This man page includes most, if not all, available error codes in libcurl.
10 Why they occur and possibly what you can do to fix the problem.
11 .SH "CURLcode"
12 Almost all "easy" interface functions return a CURLcode error code. No matter
13 what, using the \fIcurl_easy_setopt(3)\fP option \fICURLOPT_ERRORBUFFER\fP is
14 a good idea as it will give you a human readable error string that may offer
15 more details about the error cause than just the error code
16 does. \fIcurl_easy_strerror(3)\fP can be called to get an error string from a
17 given CURLcode number.
18
19 CURLcode is one of the following:
20 .IP "CURLE_OK (0)"
21 All fine. Proceed as usual.
22 .IP "CURLE_UNSUPPORTED_PROTOCOL (1)"
23 The URL you passed to libcurl used a protocol that this libcurl does not
24 support. The support might be a compile-time option that you didn't use, it
25 can be a misspelled protocol string or just a protocol libcurl has no code
26 for.
27 .IP "CURLE_FAILED_INIT (2)"
28 Very early initialization code failed. This is likely to be an internal error
29 or problem.
30 .IP "CURLE_URL_MALFORMAT (3)"
31 The URL was not properly formatted.
32 .IP "CURLE_URL_MALFORMAT_USER (4)"
33 URL user malformatted. The user-part of the URL syntax was not correct.
34 .IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
35 Couldn't resolve proxy. The given proxy host could not be resolved.
36 .IP "CURLE_COULDNT_RESOLVE_HOST (6)"
37 Couldn't resolve host. The given remote host was not resolved.
38 .IP "CURLE_COULDNT_CONNECT (7)"
39 Failed to connect() to host or proxy.
40 .IP "CURLE_FTP_WEIRD_SERVER_REPLY (8)"
41 After connecting to an FTP server, libcurl expects to get a certain reply back.
42 This error code implies that it god a strange or bad reply. The given remote
43 server is probably not an OK FTP server.
44 .IP "CURLE_FTP_ACCESS_DENIED (9)"
45 We were denied access when trying to login to an FTP server or when trying to
46 change working directory to the one given in the URL.
47 .IP "CURLE_FTP_USER_PASSWORD_INCORRECT (10)"
48 The FTP server rejected access to the server after the password was sent to
49 it. It might be because the username and/or the password were incorrect or
50 just that the server is not allowing you access for the moment etc.
51 .IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
52 After having sent the FTP password to the server, libcurl expects a proper
53 reply. This error code indicates that an unexpected code was returned.
54 .IP "CURLE_FTP_WEIRD_USER_REPLY (12)"
55 After having sent user name to the FTP server, libcurl expects a proper
56 reply. This error code indicates that an unexpected code was returned.
57 .IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
58 libcurl failed to get a sensible result back from the server as a response to
59 either a PASV or a EPSV command. The server is flawed.
60 .IP "CURLE_FTP_WEIRD_227_FORMAT (14)"
61 FTP servers return a 227-line as a response to a PASV command. If libcurl
62 fails to parse that line, this return code is passed back.
63 .IP "CURLE_FTP_CANT_GET_HOST (15)"
64 An internal failure to lookup the host used for the new connection.
65 .IP "CURLE_FTP_CANT_RECONNECT (16)"
66 A bad return code on either PASV or EPSV was sent by the FTP server,
67 preventing libcurl from being able to continue.
68 .IP "CURLE_FTP_COULDNT_SET_BINARY (17)"
69 Received an error when trying to set the transfer mode to binary.
70 .IP "CURLE_PARTIAL_FILE (18)"
71 A file transfer was shorter or larger than expected. This happens when the
72 server first reports an expected transfer size, and then delivers data that
73 doesn't match the previously given size.
74 .IP "CURLE_FTP_COULDNT_RETR_FILE (19)"
75 This was either a weird reply to a 'RETR' command or a zero byte transfer
76 complete.
77 .IP "CURLE_FTP_WRITE_ERROR (20)"
78 After a completed file transfer, the FTP server did not respond a proper
79 \"transfer successful\" code.
80 .IP "CURLE_FTP_QUOTE_ERROR (21)"
81 When sending custom "QUOTE" commands to the remote server, one of the commands
82 returned an error code that was 400 or higher.
83 .IP "CURLE_HTTP_RETURNED_ERROR (22)"
84 This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server
85 returns an error code that is >= 400.
86 .IP "CURLE_WRITE_ERROR (23)"
87 An error occurred when writing received data to a local file, or an error was
88 returned to libcurl from a write callback.
89 .IP "CURLE_MALFORMAT_USER (24)"
90 Malformat user. User name badly specified. *Not currently used*
91 .IP "CURLE_FTP_COULDNT_STOR_FILE (25)"
92 FTP couldn't STOR file. The server denied the STOR operation. The error buffer
93 usually contains the server's explanation to this.
94 .IP "CURLE_READ_ERROR (26)"
95 There was a problem reading a local file or an error returned by the read
96 callback.
97 .IP "CURLE_OUT_OF_MEMORY (27)"
98 Out of memory. A memory allocation request failed. This is serious badness and
99 things are severely screwed up if this ever occur.
100 .IP "CURLE_OPERATION_TIMEOUTED (28)"
101 Operation timeout. The specified time-out period was reached according to the
102 conditions.
103 .IP "CURLE_FTP_COULDNT_SET_ASCII (29)"
104 libcurl failed to set ASCII transfer type (TYPE A).
105 .IP "CURLE_FTP_PORT_FAILED (30)"
106 The FTP PORT command returned error. This mostly happen when you haven't
107 specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
108 .IP "CURLE_FTP_COULDNT_USE_REST (31)"
109 The FTP REST command returned error. This should never happen if the server is
110 sane.
111 .IP "CURLE_FTP_COULDNT_GET_SIZE (32)"
112 The FTP SIZE command returned error. SIZE is not a kosher FTP command, it is
113 an extension and not all servers support it. This is not a surprising error.
114 .IP "CURLE_HTTP_RANGE_ERROR (33)"
115 The HTTP server does not support or accept range requests.
116 .IP "CURLE_HTTP_POST_ERROR (34)"
117 This is an odd error that mainly occurs due to internal confusion.
118 .IP "CURLE_SSL_CONNECT_ERROR (35)"
119 A problem occurred somewhere in the SSL/TLS handshake. You really want the
120 error buffer and read the message there as it pinpoints the problem slightly
121 more. Could be certificates (file formats, paths, permissions), passwords, and
122 others.
123 .IP "CURLE_FTP_BAD_DOWNLOAD_RESUME (36)"
124 Attempting FTP resume beyond file size.
125 .IP "CURLE_FILE_COULDNT_READ_FILE (37)"
126 A file given with FILE:// couldn't be opened. Most likely because the file
127 path doesn't identify an existing file. Did you check file permissions?
128 .IP "CURLE_LDAP_CANNOT_BIND (38)"
129 LDAP cannot bind. LDAP bind operation failed.
130 .IP "CURLE_LDAP_SEARCH_FAILED (39)"
131 LDAP search failed.
132 .IP "CURLE_LIBRARY_NOT_FOUND (40)"
133 Library not found. The LDAP library was not found.
134 .IP "CURLE_FUNCTION_NOT_FOUND (41)"
135 Function not found. A required LDAP function was not found.
136 .IP "CURLE_ABORTED_BY_CALLBACK (42)"
137 Aborted by callback. A callback returned "abort" to libcurl.
138 .IP "CURLE_BAD_FUNCTION_ARGUMENT (43)"
139 Internal error. A function was called with a bad parameter.
140 .IP "CURLE_BAD_CALLING_ORDER (44)"
141 Internal error. A function was called in a bad order.
142 .IP "CURLE_HTTP_PORT_FAILED (45)"
143 Interface error. A specified outgoing interface could not be used. Set which
144 interface to use for outgoing connections' source IP address with
145 CURLOPT_INTERFACE.
146 .IP "CURLE_BAD_PASSWORD_ENTERED (46)"
147 Bad password entered. An error was signaled when the password was
148 entered. This can also be the result of a "bad password" returned from a
149 specified password callback.
150 .IP "CURLE_TOO_MANY_REDIRECTS (47)"
151 Too many redirects. When following redirects, libcurl hit the maximum amount.
152 Set your limit with CURLOPT_MAXREDIRS.
153 .IP "CURLE_UNKNOWN_TELNET_OPTION (48)"
154 An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to
155 the appropriate documentation.
156 .IP "CURLE_TELNET_OPTION_SYNTAX (49)"
157 A telnet option string was Illegally formatted.
158 .IP "CURLE_OBSOLETE (50)"
159 This is not an error. This used to be another error code in an old libcurl
160 version and is currently unused.
161 .IP "CURLE_SSL_PEER_CERTIFICATE (51)"
162 The remote server's SSL certificate was deemed not OK.
163 .IP "CURLE_GOT_NOTHING (52)"
164 Nothing was returned from the server, and under the circumstances, getting
165 nothing is considered an error.
166 .IP "CURLE_SSL_ENGINE_NOTFOUND (53)"
167 The specified crypto engine wasn't found.
168 .IP "CURLE_SSL_ENGINE_SETFAILED (54)"
169 Failed setting the selected SSL crypto engine as default!
170 .IP "CURLE_SEND_ERROR (55)"
171 Failed sending network data.
172 .IP "CURLE_RECV_ERROR (56)"
173 Failure with receiving network data.
174 .IP "CURLE_SHARE_IN_USE (57)"
175 Share is in use
176 .IP "CURLE_SSL_CERTPROBLEM (58)"
177 problem with the local client certificate
178 .IP "CURLE_SSL_CIPHER (59)"
179 couldn't use specified cipher
180 .IP "CURLE_SSL_CACERT (60)"
181 problem with the CA cert (path? access rights?) 
182 .IP "CURLE_BAD_CONTENT_ENCODING (61)"
183 Unrecognized transfer encoding
184 .IP "CURLE_LDAP_INVALID_URL (62)"
185 Invalid LDAP URL
186 .IP "CURLE_FILESIZE_EXCEEDED (63)"
187 Maximum file size exceeded
188 .IP "CURLE_FTP_SSL_FAILED (64)"
189 Requested FTP SSL level failed
190 .IP "CURLE_SEND_FAIL_REWIND (65)"
191 When doing a send operation curl had to rewind the data to retransmit, but the
192 rewinding operation failed
193 .IP "CURLE_SSL_ENGINE_INITFAILED (66)"
194 Initiating the SSL Engine failed
195 .IP "CURLE_LOGIN_DENIED (67)"
196 The remote server denied curl to login (Added in 7.13.1)
197 .SH "CURLMcode"
198 This is the generic return code used by functions in the libcurl multi
199 interface. Also consider \fIcurl_multi_strerror(3)\fP.
200 .IP "CURLM_CALL_MULTI_PERFORM (-1)"
201 This is not really an error. It means you should call
202 \fIcurl_multi_perform(3)\fP again without doing select() or similar in between.
203 .IP "CURLM_OK (0)"
204 Things are fine.
205 .IP "CURLM_BAD_HANDLE (1)"
206 The passed-in handle is not a valid CURLM handle.
207 .IP "CURLM_BAD_EASY_HANDLE (2)"
208 An easy handle was not good/valid.
209 .IP "CURLM_OUT_OF_MEMORY (3)"
210 You are doomed.
211 .IP "CURLM_INTERNAL_ERROR (4)"
212 This can only be returned if libcurl bugs. Please report it to us!
213 .IP "CURLM_BAD_SOCKET (5)"
214 The passed-in socket is not a valid one that libcurl already knows about.
215 (Added in 7.16.0)
216 .SH "CURLSHcode"
217 The "share" interface will return a CURLSHcode to indicate when an error has
218 occurred.  Also consider \fIcurl_share_strerror(3)\fP.
219 .IP "CURLSHE_OK (0)"
220 All fine. Proceed as usual.
221 .IP "CURLSHE_BAD_OPTION (1)"
222 An invalid option was passed to the function.
223 .IP "CURLSHE_IN_USE (2)"
224 The share object is currently in use.
225 .IP "CURLSHE_INVALID (3)"
226 An invalid share object was passed to the function.
227