1
# Copyright (C) 2006 Canonical
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
# Taken from curl/curl.h
19
CURLE_UNSUPPORTED_PROTOCOL = 1
21
CURLE_URL_MALFORMAT = 3
22
CURLE_URL_MALFORMAT_USER = 4 # (NOT USED)
23
CURLE_COULDNT_RESOLVE_PROXY = 5
24
CURLE_COULDNT_RESOLVE_HOST = 6
25
CURLE_COULDNT_CONNECT = 7
26
CURLE_FTP_WEIRD_SERVER_REPLY = 8
27
CURLE_FTP_ACCESS_DENIED = 9 # a service was denied by the FTP server
28
# due to lack of access - when login fails
29
# this is not returned.
30
CURLE_FTP_USER_PASSWORD_INCORRECT = 10
31
CURLE_FTP_WEIRD_PASS_REPLY = 11
32
CURLE_FTP_WEIRD_USER_REPLY = 12
33
CURLE_FTP_WEIRD_PASV_REPLY = 13
34
CURLE_FTP_WEIRD_227_FORMAT = 14
35
CURLE_FTP_CANT_GET_HOST = 15
36
CURLE_FTP_CANT_RECONNECT = 16
37
CURLE_FTP_COULDNT_SET_BINARY = 17
38
CURLE_PARTIAL_FILE = 18
39
CURLE_FTP_COULDNT_RETR_FILE = 19
40
CURLE_FTP_WRITE_ERROR = 20
41
CURLE_FTP_QUOTE_ERROR = 21
42
CURLE_HTTP_RETURNED_ERROR = 22
43
CURLE_WRITE_ERROR = 23
44
CURLE_MALFORMAT_USER = 24 # NOT USED
45
CURLE_FTP_COULDNT_STOR_FILE = 25 # failed FTP upload
46
CURLE_READ_ERROR = 26 # could open/read from file
47
CURLE_OUT_OF_MEMORY = 27
48
CURLE_OPERATION_TIMEOUTED = 28 # the timeout time was reached
49
CURLE_FTP_COULDNT_SET_ASCII = 29 # TYPE A failed
50
CURLE_FTP_PORT_FAILED = 30 # FTP PORT operation failed
51
CURLE_FTP_COULDNT_USE_REST = 31 # the REST command failed
52
CURLE_FTP_COULDNT_GET_SIZE = 32 # the SIZE command failed
53
CURLE_HTTP_RANGE_ERROR = 33 # RANGE "command" didn't work
54
CURLE_HTTP_POST_ERROR = 34
55
CURLE_SSL_CONNECT_ERROR = 35 # wrong when connecting with SSL
56
CURLE_BAD_DOWNLOAD_RESUME = 36 # couldn't resume download
57
CURLE_FILE_COULDNT_READ_FILE = 37
58
CURLE_LDAP_CANNOT_BIND = 38
59
CURLE_LDAP_SEARCH_FAILED = 39
60
CURLE_LIBRARY_NOT_FOUND = 40
61
CURLE_FUNCTION_NOT_FOUND = 41
62
CURLE_ABORTED_BY_CALLBACK = 42
63
CURLE_BAD_FUNCTION_ARGUMENT = 43
64
CURLE_BAD_CALLING_ORDER = 44 # NOT USED
65
CURLE_INTERFACE_FAILED = 45 # CURLOPT_INTERFACE failed
66
CURLE_BAD_PASSWORD_ENTERED = 46 # NOT USED
67
CURLE_TOO_MANY_REDIRECTS = 47 # catch endless re-direct loops
68
CURLE_UNKNOWN_TELNET_OPTION = 48 # User specified an unknown option
69
CURLE_TELNET_OPTION_SYNTAX = 49 # Malformed telnet option
70
CURLE_OBSOLETE = 50 # NOT USED
71
CURLE_SSL_PEER_CERTIFICATE = 51 # peer's certificate wasn't ok
72
CURLE_GOT_NOTHING = 52 # when this is a specific error
73
CURLE_SSL_ENGINE_NOTFOUND = 53 # SSL crypto engine not found
74
CURLE_SSL_ENGINE_SETFAILED = 54 # can not set SSL crypto engine as default
75
CURLE_SEND_ERROR = 55 # failed sending network data
76
CURLE_RECV_ERROR = 56 # failure in receiving network data
77
CURLE_SHARE_IN_USE = 57 # share is in use
78
CURLE_SSL_CERTPROBLEM = 58 # problem with the local certificate
79
CURLE_SSL_CIPHER = 59 # couldn't use specified cipher
80
CURLE_SSL_CACERT = 60 # problem with the CA cert (path?)
81
CURLE_BAD_CONTENT_ENCODING = 61 # Unrecognized transfer encoding
82
CURLE_LDAP_INVALID_URL = 62 # Invalid LDAP URL
83
CURLE_FILESIZE_EXCEEDED = 63 # Maximum file size exceeded
84
CURLE_FTP_SSL_FAILED = 64 # Requested FTP SSL level failed
85
CURLE_SEND_FAIL_REWIND = 65 # Sending the data requires a rewind that failed
86
CURLE_SSL_ENGINE_INITFAILED = 66 # failed to initialise ENGINE
87
CURLE_LOGIN_DENIED = 67 # user, password or similar was not
88
# accepted and we failed to login
89
CURLE_TFTP_NOTFOUND = 68 # file not found on server
90
CURLE_TFTP_PERM = 69 # permission problem on server
91
CURLE_TFTP_DISKFULL = 70 # out of disk space on server
92
CURLE_TFTP_ILLEGAL = 71 # Illegal TFTP operation
93
CURLE_TFTP_UNKNOWNID = 72 # Unknown transfer ID
94
CURLE_TFTP_EXISTS = 73 # File already exists
95
CURLE_TFTP_NOSUCHUSER = 74 # No such user
98
# Create the reverse mapping, so we can look things up.
100
for name, val in globals().items():
101
if name.startswith('CURLE'):
102
errorcode[val] = name