libcurl-errors.3 9.0 KB

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