1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Renamed several libcurl error codes and options to make them more general

and allow reuse by multiple protocols. Several unused error codes were
removed.  In all cases, macros were added to preserve source (and binary)
compatibility with the old names.  These macros are subject to removal at
a future date, but probably not before 2009.  An application can be
tested to see if it is using any obsolete code by compiling it with the
CURL_NO_OLDIES macro defined.

Documented some newer error codes in libcurl-error(3)
This commit is contained in:
Dan Fandrich 2007-08-30 20:34:57 +00:00
parent 4b60c3e9d3
commit 9f44a95522
29 changed files with 341 additions and 275 deletions

49
CHANGES
View File

@ -6,6 +6,55 @@
Changelog Changelog
Dan F (30 August 2007)
- Renamed several libcurl error codes and options to make them more general
and allow reuse by multiple protocols. Several unused error codes were
removed. In all cases, macros were added to preserve source (and binary)
compatibility with the old names. These macros are subject to removal at
a future date, but probably not before 2009. An application can be
tested to see if it is using any obsolete code by compiling it with the
CURL_NO_OLDIES macro defined.
The following unused error codes were removed:
CURLE_BAD_CALLING_ORDER
CURLE_BAD_PASSWORD_ENTERED
CURLE_FTP_CANT_RECONNECT
CURLE_FTP_COULDNT_GET_SIZE
CURLE_FTP_COULDNT_SET_ASCII
CURLE_FTP_USER_PASSWORD_INCORRECT
CURLE_FTP_WEIRD_USER_REPLY
CURLE_FTP_WRITE_ERROR
CURLE_LIBRARY_NOT_FOUND
CURLE_MALFORMAT_USER
CURLE_OBSOLETE
CURLE_SHARE_IN_USE
CURLE_URL_MALFORMAT_USER
The following error codes were renamed:
CURLE_FTP_ACCESS_DENIED => CURLE_REMOTE_ACCESS_DENIED
CURLE_FTP_COULDNT_SET_BINARY => CURLE_FTP_COULDNT_SET_TYPE
CURLE_FTP_QUOTE_ERROR => CURLE_QUOTE_ERROR
CURLE_TFTP_DISKFULL => CURLE_REMOTE_DISK_FULL
CURLE_TFTP_EXISTS => CURLE_REMOTE_FILE_EXISTS
CURLE_HTTP_RANGE_ERROR => CURLE_RANGE_ERROR
The following options were renamed:
CURLOPT_SSLKEYPASSWD => CURLOPT_KEYPASSWD
CURLOPT_FTPAPPEND => CURLOPT_APPEND
CURLOPT_FTPLISTONLY => CURLOPT_DIRLISTONLY
CURLOPT_FTP_SSL => CURLOPT_USE_SSL
A few more changes will take place with the next SONAME bump of the
library. These are documented in docs/TODO
- Documented some newer error codes in libcurl-error(3)
Dan F (28 August 2007)
- Some minor internal type and const changes based on a splint scan.
Daniel S (24 August 2007) Daniel S (24 August 2007)
- Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointed - Bug report #1779054 (http://curl.haxx.se/bug/view.cgi?id=1779054) pointed
out that libcurl didn't deal with large responses from server commands, when out that libcurl didn't deal with large responses from server commands, when

View File

@ -18,6 +18,8 @@ This release includes the following changes:
o HTTP transfers have the download size info "available" earlier o HTTP transfers have the download size info "available" earlier
o FTP transfers have the download size info "available" earlier o FTP transfers have the download size info "available" earlier
o builds and runs on OS/400 o builds and runs on OS/400
o several error codes and options were marked as obsolete and subject to
future removal (set CURL_NO_OLDIES to see if your application is using them)
This release includes the following bugfixes: This release includes the following bugfixes:

View File

@ -275,9 +275,6 @@ TODO
and FTP-SSL tests without the stunnel dependency, and it could allow us to and FTP-SSL tests without the stunnel dependency, and it could allow us to
provide test tools built with either OpenSSL or GnuTLS provide test tools built with either OpenSSL or GnuTLS
* Make the test servers able to serve multiple running test suites. Like if
two users run 'make test' at once.
* If perl wasn't found by the configure script, don't attempt to run the * If perl wasn't found by the configure script, don't attempt to run the
tests but explain something nice why it doesn't. tests but explain something nice why it doesn't.
@ -292,6 +289,22 @@ TODO
* #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers * #undef CURL_FTP_HTTPSTYLE_HEAD in lib/ftp.c to remove the HTTP-style headers
from being output in NOBODY requests over ftp from being output in NOBODY requests over ftp
* Combine some of the error codes to remove duplicates. The original
numbering should not be changed, and the old identifiers would be
macroed to the new ones in an CURL_NO_OLDIES section to help with
backward compatibility.
Candidates for removal and their replacements:
CURLE_FILE_COULDNT_READ_FILE => CURLE_REMOTE_FILE_NOT_FOUND
CURLE_FTP_COULDNT_RETR_FILE => CURLE_REMOTE_FILE_NOT_FOUND
CURLE_FTP_COULDNT_USE_REST => CURLE_RANGE_ERROR
CURLE_FUNCTION_NOT_FOUND => CURLE_FAILED_INIT
CURLE_LDAP_INVALID_URL => CURLE_URL_MALFORMAT
CURLE_TFTP_NOSUCHUSER => CURLE_TFTP_ILLEGAL
CURLE_TFTP_NOTFOUND => CURLE_REMOTE_FILE_NOT_FOUND
CURLE_TFTP_PERM => CURLE_REMOTE_ACCESS_DENIED
NEXT MAJOR RELEASE NEXT MAJOR RELEASE
* curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a * curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a

View File

@ -122,10 +122,10 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,
fseek(f, uploaded_len, SEEK_SET); fseek(f, uploaded_len, SEEK_SET);
curl_easy_setopt(curlhandle, CURLOPT_FTPAPPEND, 1); curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1);
} }
else { /* no */ else { /* no */
curl_easy_setopt(curlhandle, CURLOPT_FTPAPPEND, 0); curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0);
} }
r = curl_easy_perform(curlhandle); r = curl_easy_perform(curlhandle);

View File

@ -95,7 +95,7 @@ int main(int argc, char **argv)
/* sorry, for engine we must set the passphrase /* sorry, for engine we must set the passphrase
(if the key has one...) */ (if the key has one...) */
if (pPassphrase) if (pPassphrase)
curl_easy_setopt(curl,CURLOPT_SSLKEYPASSWD,pPassphrase); curl_easy_setopt(curl,CURLOPT_KEYPASSWD,pPassphrase);
/* if we use a key stored in a crypto engine, /* if we use a key stored in a crypto engine,
we must set the key type to "ENG" */ we must set the key type to "ENG" */

View File

@ -21,7 +21,7 @@
.\" * $Id$ .\" * $Id$
.\" ************************************************************************** .\" **************************************************************************
.\" .\"
.TH curl_easy_setopt 3 "1 Aug 2007" "libcurl 7.17.0" "libcurl Manual" .TH curl_easy_setopt 3 "30 Aug 2007" "libcurl 7.17.0" "libcurl Manual"
.SH NAME .SH NAME
curl_easy_setopt \- set options for a curl easy handle curl_easy_setopt \- set options for a curl easy handle
.SH SYNOPSIS .SH SYNOPSIS
@ -764,7 +764,7 @@ multiple cookies in one string like this: "name1=content1; name2=content2;"
etc. etc.
Using this option multiple times will only make the latest string override the Using this option multiple times will only make the latest string override the
previously ones. previous ones.
.IP CURLOPT_COOKIEFILE .IP CURLOPT_COOKIEFILE
Pass a pointer to a zero terminated string as parameter. It should contain the Pass a pointer to a zero terminated string as parameter. It should contain the
name of your file holding cookie data to read. The cookie data may be in name of your file holding cookie data to read. The cookie data may be in
@ -875,17 +875,21 @@ struct curl_slist structs properly filled in as described for
\fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this \fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this
option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP non-zero, option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP non-zero,
this option didn't work. this option didn't work.
.IP CURLOPT_FTPLISTONLY .IP CURLOPT_DIRLISTONLY
A non-zero parameter tells the library to just list the names of an ftp A non-zero parameter tells the library to just list the names of files in a
directory, instead of doing a full directory listing that would include file directory, instead of doing a full directory listing that would include file
sizes, dates etc. sizes, dates etc. This works for FTP and SFTP URLs.
This causes an FTP NLST command to be sent. Beware that some FTP servers list This causes an FTP NLST command to be sent on an FTP server. Beware
only files in their response to NLST; they might not include subdirectories that some FTP servers list only files in their response to NLST; they
and symbolic links. might not include subdirectories and symbolic links.
.IP CURLOPT_FTPAPPEND
(This option was known as CURLOPT_FTPLISTONLY up to 7.16.4)
.IP CURLOPT_APPEND
A non-zero parameter tells the library to append to the remote file instead of A non-zero parameter tells the library to append to the remote file instead of
overwrite it. This is only useful when uploading to an ftp site. overwrite it. This is only useful when uploading to an ftp site.
(This option was known as CURLOPT_FTPAPPEND up to 7.16.4)
.IP CURLOPT_FTP_USE_EPRT .IP CURLOPT_FTP_USE_EPRT
Pass a long. If the value is non-zero, it tells curl to use the EPRT (and Pass a long. If the value is non-zero, it tells curl to use the EPRT (and
LPRT) command when doing active FTP downloads (which is enabled by LPRT) command when doing active FTP downloads (which is enabled by
@ -932,9 +936,11 @@ same IP address it already uses for the control connection. But it will use
the port number from the 227-response. (Added in 7.14.2) the port number from the 227-response. (Added in 7.14.2)
This option has no effect if PORT, EPRT or EPSV is used instead of PASV. This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
.IP CURLOPT_FTP_SSL .IP CURLOPT_USE_SSL
Pass a long using one of the values from below, to make libcurl use your Pass a long using one of the values from below, to make libcurl use your
desired level of SSL for the ftp transfer. (Added in 7.11.0) desired level of SSL for the ftp transfer. (Added in 7.11.0)
(This option was known as CURLOPT_FTP_SSL up to 7.16.4)
.RS .RS
.IP CURLFTPSSL_NONE .IP CURLFTPSSL_NONE
Don't attempt to use SSL. Don't attempt to use SSL.
@ -1225,13 +1231,6 @@ with.
Pass a pointer to a zero terminated string as parameter. The string should be Pass a pointer to a zero terminated string as parameter. The string should be
the format of your certificate. Supported formats are "PEM" and "DER". (Added the format of your certificate. Supported formats are "PEM" and "DER". (Added
in 7.9.3) in 7.9.3)
.IP CURLOPT_SSLCERTPASSWD
Pass a pointer to a zero terminated string as parameter. It will be used as
the password required to use the \fICURLOPT_SSLCERT\fP certificate.
This option is replaced by \fICURLOPT_SSLKEYPASSWD\fP and should only be used
for backward compatibility. You never needed a pass phrase to load a
certificate but you need one to load your private key.
.IP CURLOPT_SSLKEY .IP CURLOPT_SSLKEY
Pass a pointer to a zero terminated string as parameter. The string should be Pass a pointer to a zero terminated string as parameter. The string should be
the file name of your private key. The default format is "PEM" and can be the file name of your private key. The default format is "PEM" and can be
@ -1244,10 +1243,15 @@ The format "ENG" enables you to load the private key from a crypto engine. In
this case \fICURLOPT_SSLKEY\fP is used as an identifier passed to the this case \fICURLOPT_SSLKEY\fP is used as an identifier passed to the
engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE\fP. engine. You have to set the crypto engine with \fICURLOPT_SSLENGINE\fP.
\&"DER" format key file currently does not work because of a bug in OpenSSL. \&"DER" format key file currently does not work because of a bug in OpenSSL.
.IP CURLOPT_SSLKEYPASSWD .IP CURLOPT_KEYPASSWD
Pass a pointer to a zero terminated string as parameter. It will be used as Pass a pointer to a zero terminated string as parameter. It will be used as
the password required to use the \fICURLOPT_SSLKEY\fP or the password required to use the \fICURLOPT_SSLKEY\fP or
\fICURLOPT_SSH_PRIVATE_KEYFILE\fP private key. \fICURLOPT_SSH_PRIVATE_KEYFILE\fP private key.
You never needed a pass phrase to load a certificate but you need one to
load your private key.
(This option was known as CURLOPT_SSLKEYPASSWD up to 7.16.4 and
CURLOPT_SSLCERTPASSWD up to 7.9.2)
.IP CURLOPT_SSLENGINE .IP CURLOPT_SSLENGINE
Pass a pointer to a zero terminated string as parameter. It will be used as Pass a pointer to a zero terminated string as parameter. It will be used as
the identifier for the crypto engine you want to use for your private the identifier for the crypto engine you want to use for your private
@ -1406,7 +1410,7 @@ libcurl defaults to using \fB~/.ssh/id_dsa.pub\fP.
.IP CURLOPT_SSH_PRIVATE_KEYFILE .IP CURLOPT_SSH_PRIVATE_KEYFILE
Pass a char * pointing to a file name for your private key. If not used, Pass a char * pointing to a file name for your private key. If not used,
libcurl defaults to using \fB~/.ssh/id_dsa\fP. libcurl defaults to using \fB~/.ssh/id_dsa\fP.
If the file is password-protected, set the password with \fICURLOPT_SSLKEYPASSWD\fP. If the file is password-protected, set the password with \fICURLOPT_KEYPASSWD\fP.
(Added in 7.16.1) (Added in 7.16.1)
.SH OTHER OPTIONS .SH OTHER OPTIONS
.IP CURLOPT_PRIVATE .IP CURLOPT_PRIVATE

View File

@ -21,7 +21,7 @@
.\" * $Id$ .\" * $Id$
.\" ************************************************************************** .\" **************************************************************************
.\" .\"
.TH libcurl-errors 3 "8 May 2007" "libcurl 7.16.3" "libcurl errors" .TH libcurl-errors 3 "30 Aug 2007" "libcurl 7.17.0" "libcurl errors"
.SH NAME .SH NAME
libcurl-errors \- error codes in libcurl libcurl-errors \- error codes in libcurl
.SH DESCRIPTION .SH DESCRIPTION
@ -48,8 +48,6 @@ Very early initialization code failed. This is likely to be an internal error
or problem. or problem.
.IP "CURLE_URL_MALFORMAT (3)" .IP "CURLE_URL_MALFORMAT (3)"
The URL was not properly formatted. The URL was not properly formatted.
.IP "CURLE_URL_MALFORMAT_USER (4)"
This is never returned by current libcurl.
.IP "CURLE_COULDNT_RESOLVE_PROXY (5)" .IP "CURLE_COULDNT_RESOLVE_PROXY (5)"
Couldn't resolve proxy. The given proxy host could not be resolved. Couldn't resolve proxy. The given proxy host could not be resolved.
.IP "CURLE_COULDNT_RESOLVE_HOST (6)" .IP "CURLE_COULDNT_RESOLVE_HOST (6)"
@ -60,17 +58,12 @@ Failed to connect() to host or proxy.
After connecting to an FTP server, libcurl expects to get a certain reply After connecting to an FTP server, libcurl expects to get a certain reply
back. This error code implies that it got a strange or bad reply. The given back. This error code implies that it got a strange or bad reply. The given
remote server is probably not an OK FTP server. remote server is probably not an OK FTP server.
.IP "CURLE_FTP_ACCESS_DENIED (9)" .IP "CURLE_REMOTE_ACCESS_DENIED (9)"
We were denied access when trying to login to an FTP server or when trying to We were denied access to the resource given in the URL. For FTP, this occurs
change working directory to the one given in the URL. while trying to change to the remote directory.
.IP "CURLE_FTP_USER_PASSWORD_INCORRECT (10)"
This is never returned by current libcurl.
.IP "CURLE_FTP_WEIRD_PASS_REPLY (11)" .IP "CURLE_FTP_WEIRD_PASS_REPLY (11)"
After having sent the FTP password to the server, libcurl expects a proper After having sent the FTP password to the server, libcurl expects a proper
reply. This error code indicates that an unexpected code was returned. reply. This error code indicates that an unexpected code was returned.
.IP "CURLE_FTP_WEIRD_USER_REPLY (12)"
After having sent user name to the FTP server, libcurl expects a proper
reply. This error code indicates that an unexpected code was returned.
.IP "CURLE_FTP_WEIRD_PASV_REPLY (13)" .IP "CURLE_FTP_WEIRD_PASV_REPLY (13)"
libcurl failed to get a sensible result back from the server as a response to 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. either a PASV or a EPSV command. The server is flawed.
@ -79,11 +72,8 @@ 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. fails to parse that line, this return code is passed back.
.IP "CURLE_FTP_CANT_GET_HOST (15)" .IP "CURLE_FTP_CANT_GET_HOST (15)"
An internal failure to lookup the host used for the new connection. An internal failure to lookup the host used for the new connection.
.IP "CURLE_FTP_CANT_RECONNECT (16)" .IP "CURLE_FTP_COULDNT_SET_TYPE (17)"
A bad return code on either PASV or EPSV was sent by the FTP server, Received an error when trying to set the transfer mode to binary or ascii.
preventing libcurl from being able to continue.
.IP "CURLE_FTP_COULDNT_SET_BINARY (17)"
Received an error when trying to set the transfer mode to binary.
.IP "CURLE_PARTIAL_FILE (18)" .IP "CURLE_PARTIAL_FILE (18)"
A file transfer was shorter or larger than expected. This happens when the 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 server first reports an expected transfer size, and then delivers data that
@ -91,12 +81,10 @@ doesn't match the previously given size.
.IP "CURLE_FTP_COULDNT_RETR_FILE (19)" .IP "CURLE_FTP_COULDNT_RETR_FILE (19)"
This was either a weird reply to a 'RETR' command or a zero byte transfer This was either a weird reply to a 'RETR' command or a zero byte transfer
complete. complete.
.IP "CURLE_FTP_WRITE_ERROR (20)" .IP "CURLE_QUOTE_ERROR (21)"
After a completed file transfer, the FTP server did not respond a proper
\"transfer successful\" code.
.IP "CURLE_FTP_QUOTE_ERROR (21)"
When sending custom "QUOTE" commands to the remote server, one of the commands When sending custom "QUOTE" commands to the remote server, one of the commands
returned an error code that was 400 or higher. returned an error code that was 400 or higher (for FTP) or otherwise
indicated unsuccessful completion of the command.
.IP "CURLE_HTTP_RETURNED_ERROR (22)" .IP "CURLE_HTTP_RETURNED_ERROR (22)"
This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server
returns an error code that is >= 400. (This error code was formerly known as returns an error code that is >= 400. (This error code was formerly known as
@ -104,34 +92,27 @@ CURLE_HTTP_NOT_FOUND.)
.IP "CURLE_WRITE_ERROR (23)" .IP "CURLE_WRITE_ERROR (23)"
An error occurred when writing received data to a local file, or an error was An error occurred when writing received data to a local file, or an error was
returned to libcurl from a write callback. returned to libcurl from a write callback.
.IP "CURLE_MALFORMAT_USER (24)"
This is never returned by current libcurl.
.IP "CURLE_UPLOAD_FAILED (25)" .IP "CURLE_UPLOAD_FAILED (25)"
Failed starting the upload. For FTP, the server typcially denied the STOR Failed starting the upload. For FTP, the server typically denied the STOR
command. The error buffer usually contains the server's explanation to this. command. The error buffer usually contains the server's explanation to this.
(This error code was formerly known as CURLE_FTP_COULDNT_STOR_FILE.) (This error code was formerly known as CURLE_FTP_COULDNT_STOR_FILE.)
.IP "CURLE_READ_ERROR (26)" .IP "CURLE_READ_ERROR (26)"
There was a problem reading a local file or an error returned by the read There was a problem reading a local file or an error returned by the read
callback. callback.
.IP "CURLE_OUT_OF_MEMORY (27)" .IP "CURLE_OUT_OF_MEMORY (27)"
Out of memory. A memory allocation request failed. This is serious badness and A memory allocation request failed. This is serious badness and
things are severely screwed up if this ever occur. things are severely screwed up if this ever occur.
.IP "CURLE_OPERATION_TIMEOUTED (28)" .IP "CURLE_OPERATION_TIMEDOUT (28)"
Operation timeout. The specified time-out period was reached according to the Operation timeout. The specified time-out period was reached according to the
conditions. conditions.
.IP "CURLE_FTP_COULDNT_SET_ASCII (29)"
libcurl failed to set ASCII transfer type (TYPE A).
.IP "CURLE_FTP_PORT_FAILED (30)" .IP "CURLE_FTP_PORT_FAILED (30)"
The FTP PORT command returned error. This mostly happen when you haven't The FTP PORT command returned error. This mostly happen when you haven't
specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP. specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
.IP "CURLE_FTP_COULDNT_USE_REST (31)" .IP "CURLE_FTP_COULDNT_USE_REST (31)"
The FTP REST command returned error. This should never happen if the server is The FTP REST command returned error. This should never happen if the server is
sane. sane.
.IP "CURLE_FTP_COULDNT_GET_SIZE (32)" .IP "CURLE_RANGE_ERROR (33)"
The FTP SIZE command returned error. SIZE is not a kosher FTP command, it is The server does not support or accept range requests.
an extension and not all servers support it. This is not a surprising error.
.IP "CURLE_HTTP_RANGE_ERROR (33)"
The HTTP server does not support or accept range requests.
.IP "CURLE_HTTP_POST_ERROR (34)" .IP "CURLE_HTTP_POST_ERROR (34)"
This is an odd error that mainly occurs due to internal confusion. This is an odd error that mainly occurs due to internal confusion.
.IP "CURLE_SSL_CONNECT_ERROR (35)" .IP "CURLE_SSL_CONNECT_ERROR (35)"
@ -148,23 +129,17 @@ path doesn't identify an existing file. Did you check file permissions?
LDAP cannot bind. LDAP bind operation failed. LDAP cannot bind. LDAP bind operation failed.
.IP "CURLE_LDAP_SEARCH_FAILED (39)" .IP "CURLE_LDAP_SEARCH_FAILED (39)"
LDAP search failed. LDAP search failed.
.IP "CURLE_LIBRARY_NOT_FOUND (40)"
Library not found. The LDAP library was not found.
.IP "CURLE_FUNCTION_NOT_FOUND (41)" .IP "CURLE_FUNCTION_NOT_FOUND (41)"
Function not found. A required LDAP function was not found. Function not found. A required zlib function was not found.
.IP "CURLE_ABORTED_BY_CALLBACK (42)" .IP "CURLE_ABORTED_BY_CALLBACK (42)"
Aborted by callback. A callback returned "abort" to libcurl. Aborted by callback. A callback returned "abort" to libcurl.
.IP "CURLE_BAD_FUNCTION_ARGUMENT (43)" .IP "CURLE_BAD_FUNCTION_ARGUMENT (43)"
Internal error. A function was called with a bad parameter. Internal error. A function was called with a bad parameter.
.IP "CURLE_BAD_CALLING_ORDER (44)"
This is never returned by current libcurl.
.IP "CURLE_INTERFACE_FAILED (45)" .IP "CURLE_INTERFACE_FAILED (45)"
Interface error. A specified outgoing interface could not be used. Set which Interface error. A specified outgoing interface could not be used. Set which
interface to use for outgoing connections' source IP address with interface to use for outgoing connections' source IP address with
CURLOPT_INTERFACE. (This error code was formerly known as CURLOPT_INTERFACE. (This error code was formerly known as
CURLE_HTTP_PORT_FAILED.) CURLE_HTTP_PORT_FAILED.)
.IP "CURLE_BAD_PASSWORD_ENTERED (46)"
This is never returned by current libcurl.
.IP "CURLE_TOO_MANY_REDIRECTS (47)" .IP "CURLE_TOO_MANY_REDIRECTS (47)"
Too many redirects. When following redirects, libcurl hit the maximum amount. Too many redirects. When following redirects, libcurl hit the maximum amount.
Set your limit with CURLOPT_MAXREDIRS. Set your limit with CURLOPT_MAXREDIRS.
@ -173,9 +148,6 @@ An option set with CURLOPT_TELNETOPTIONS was not recognized/known. Refer to
the appropriate documentation. the appropriate documentation.
.IP "CURLE_TELNET_OPTION_SYNTAX (49)" .IP "CURLE_TELNET_OPTION_SYNTAX (49)"
A telnet option string was Illegally formatted. A telnet option string was Illegally formatted.
.IP "CURLE_OBSOLETE (50)"
This is not an error. This used to be another error code in an old libcurl
version and is currently unused.
.IP "CURLE_SSL_PEER_CERTIFICATE (51)" .IP "CURLE_SSL_PEER_CERTIFICATE (51)"
The remote server's SSL certificate was deemed not OK. The remote server's SSL certificate was deemed not OK.
.IP "CURLE_GOT_NOTHING (52)" .IP "CURLE_GOT_NOTHING (52)"
@ -189,14 +161,12 @@ Failed setting the selected SSL crypto engine as default!
Failed sending network data. Failed sending network data.
.IP "CURLE_RECV_ERROR (56)" .IP "CURLE_RECV_ERROR (56)"
Failure with receiving network data. Failure with receiving network data.
.IP "CURLE_SHARE_IN_USE (57)"
Share is in use
.IP "CURLE_SSL_CERTPROBLEM (58)" .IP "CURLE_SSL_CERTPROBLEM (58)"
problem with the local client certificate problem with the local client certificate
.IP "CURLE_SSL_CIPHER (59)" .IP "CURLE_SSL_CIPHER (59)"
couldn't use specified cipher Couldn't use specified cipher
.IP "CURLE_SSL_CACERT (60)" .IP "CURLE_SSL_CACERT (60)"
peer certificate cannot be authenticated with known CA certificates Peer certificate cannot be authenticated with known CA certificates
.IP "CURLE_BAD_CONTENT_ENCODING (61)" .IP "CURLE_BAD_CONTENT_ENCODING (61)"
Unrecognized transfer encoding Unrecognized transfer encoding
.IP "CURLE_LDAP_INVALID_URL (62)" .IP "CURLE_LDAP_INVALID_URL (62)"
@ -214,24 +184,33 @@ Initiating the SSL Engine failed
The remote server denied curl to login (Added in 7.13.1) The remote server denied curl to login (Added in 7.13.1)
.IP "CURLE_TFTP_NOTFOUND (68)" .IP "CURLE_TFTP_NOTFOUND (68)"
File not found on TFTP server File not found on TFTP server
.IP "CURLE_TFTP_PERM (69" .IP "CURLE_TFTP_PERM (69)"
Permission problem on TFTP server Permission problem on TFTP server
.IP "CURLE_TFTP_DISKFULL (70)" .IP "CURLE_REMOTE_DISK_FULL (70)"
Out of disk space on TFTP server Out of disk space on the server
.IP "CURLE_TFTP_ILLEGAL (71)" .IP "CURLE_TFTP_ILLEGAL (71)"
Illegal TFTP operation Illegal TFTP operation
.IP "CURLE_TFTP_UNKNOWNID (72)" .IP "CURLE_TFTP_UNKNOWNID (72)"
Unknown TFTP transfer ID Unknown TFTP transfer ID
.IP "CURLE_TFTP_EXISTS (73)" .IP "CURLE_REMOTE_FILE_EXISTS (73)"
TFTP File already exists File already exists and will not be overwritten
.IP "CURLE_TFTP_NOSUCHUSER (74)" .IP "CURLE_TFTP_NOSUCHUSER (74)"
No such TFTP user This error should never be returned by a properly functioning TFTP server
.IP "CURLE_CONV_FAILED (75)" .IP "CURLE_CONV_FAILED (75)"
Character conversion failed Character conversion failed
.IP "CURLE_CONV_REQD (76)" .IP "CURLE_CONV_REQD (76)"
Caller must register conversion callbacks Caller must register conversion callbacks
.IP "CURLE_SSL_CACERT_BADFILE (77)" .IP "CURLE_SSL_CACERT_BADFILE (77)"
Problem with reading the SSL CA cert (path? access rights?) Problem with reading the SSL CA cert (path? access rights?)
.IP "CURLE_REMOTE_FILE_NOT_FOUND (78)"
The resource referenced in the URL does not exist
.IP "CURLE_SSH (79)"
An unspecified error occurred during the SSH session
.IP "CURLE_SSL_SHUTDOWN_FAILED (80)"
Failed to shut down the SSL connection
.IP "CURLE_OBSOLETE*"
These error codes will never be returned. They used to be used in an old libcurl
version and are currently unused.
.SH "CURLMcode" .SH "CURLMcode"
This is the generic return code used by functions in the libcurl multi This is the generic return code used by functions in the libcurl multi
interface. Also consider \fIcurl_multi_strerror(3)\fP. interface. Also consider \fIcurl_multi_strerror(3)\fP.
@ -253,6 +232,9 @@ This can only be returned if libcurl bugs. Please report it to us!
.IP "CURLM_BAD_SOCKET (5)" .IP "CURLM_BAD_SOCKET (5)"
The passed-in socket is not a valid one that libcurl already knows about. The passed-in socket is not a valid one that libcurl already knows about.
(Added in 7.15.4) (Added in 7.15.4)
.IP "CURLM_UNKNOWN_OPTION (6)"
curl_multi_setopt() with unsupported option
(Added in 7.15.4)
.SH "CURLSHcode" .SH "CURLSHcode"
The "share" interface will return a CURLSHcode to indicate when an error has The "share" interface will return a CURLSHcode to indicate when an error has
occurred. Also consider \fIcurl_share_strerror(3)\fP. occurred. Also consider \fIcurl_share_strerror(3)\fP.
@ -264,4 +246,6 @@ An invalid option was passed to the function.
The share object is currently in use. The share object is currently in use.
.IP "CURLSHE_INVALID (3)" .IP "CURLSHE_INVALID (3)"
An invalid share object was passed to the function. An invalid share object was passed to the function.
.IP "CURLSHE_NOMEM (4)"
Not enough memory was available.
(Added in 7.12.0)

View File

@ -415,7 +415,7 @@ you're using an SSL private key for secure transfers.
To pass the known private key password to libcurl: To pass the known private key password to libcurl:
curl_easy_setopt(easyhandle, CURLOPT_SSLKEYPASSWD, "keypassword"); curl_easy_setopt(easyhandle, CURLOPT_KEYPASSWD, "keypassword");
.SH "HTTP Authentication" .SH "HTTP Authentication"
The previous chapter showed how to set user name and password for getting The previous chapter showed how to set user name and password for getting
@ -931,7 +931,7 @@ would instead be called CURLOPT_POSTQUOTE and used the exact same way.
The custom FTP command will be issued to the server in the same order they are The custom FTP command will be issued to the server in the same order they are
added to the list, and if a command gets an error code returned back from the added to the list, and if a command gets an error code returned back from the
server, no more commands will be issued and libcurl will bail out with an server, no more commands will be issued and libcurl will bail out with an
error code (CURLE_FTP_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send error code (CURLE_QUOTE_ERROR). Note that if you use CURLOPT_QUOTE to send
commands before a transfer, no transfer will actually take place when a quote commands before a transfer, no transfer will actually take place when a quote
command has failed. command has failed.

View File

@ -314,29 +314,29 @@ typedef enum {
CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
CURLE_FAILED_INIT, /* 2 */ CURLE_FAILED_INIT, /* 2 */
CURLE_URL_MALFORMAT, /* 3 */ CURLE_URL_MALFORMAT, /* 3 */
CURLE_URL_MALFORMAT_USER, /* 4 - NOT USED */ CURLE_OBSOLETE4, /* 4 - NOT USED */
CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
CURLE_COULDNT_RESOLVE_HOST, /* 6 */ CURLE_COULDNT_RESOLVE_HOST, /* 6 */
CURLE_COULDNT_CONNECT, /* 7 */ CURLE_COULDNT_CONNECT, /* 7 */
CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */ CURLE_FTP_WEIRD_SERVER_REPLY, /* 8 */
CURLE_FTP_ACCESS_DENIED, /* 9 a service was denied by the FTP server CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server
due to lack of access - when login fails due to lack of access - when login fails
this is not returned. */ this is not returned. */
CURLE_FTP_USER_PASSWORD_INCORRECT, /* 10 - NOT USED */ CURLE_OBSOLETE10, /* 10 - NOT USED */
CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */
CURLE_FTP_WEIRD_USER_REPLY, /* 12 */ CURLE_OBSOLETE12, /* 12 - NOT USED */
CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */
CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ CURLE_FTP_WEIRD_227_FORMAT, /* 14 */
CURLE_FTP_CANT_GET_HOST, /* 15 */ CURLE_FTP_CANT_GET_HOST, /* 15 */
CURLE_FTP_CANT_RECONNECT, /* 16 */ CURLE_OBSOLETE16, /* 16 - NOT USED */
CURLE_FTP_COULDNT_SET_BINARY, /* 17 */ CURLE_FTP_COULDNT_SET_TYPE, /* 17 */
CURLE_PARTIAL_FILE, /* 18 */ CURLE_PARTIAL_FILE, /* 18 */
CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ CURLE_FTP_COULDNT_RETR_FILE, /* 19 */
CURLE_FTP_WRITE_ERROR, /* 20 */ CURLE_OBSOLETE20, /* 20 - NOT USED */
CURLE_FTP_QUOTE_ERROR, /* 21 */ CURLE_QUOTE_ERROR, /* 21 - quote command failure */
CURLE_HTTP_RETURNED_ERROR, /* 22 */ CURLE_HTTP_RETURNED_ERROR, /* 22 */
CURLE_WRITE_ERROR, /* 23 */ CURLE_WRITE_ERROR, /* 23 */
CURLE_MALFORMAT_USER, /* 24 - NOT USED */ CURLE_OBSOLETE24, /* 24 - NOT USED */
CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */
CURLE_READ_ERROR, /* 26 - could open/read from file */ CURLE_READ_ERROR, /* 26 - could open/read from file */
CURLE_OUT_OF_MEMORY, /* 27 */ CURLE_OUT_OF_MEMORY, /* 27 */
@ -344,29 +344,29 @@ typedef enum {
instead of a memory allocation error if CURL_DOES_CONVERSIONS instead of a memory allocation error if CURL_DOES_CONVERSIONS
is defined is defined
*/ */
CURLE_OPERATION_TIMEOUTED, /* 28 - the timeout time was reached */ CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */
CURLE_FTP_COULDNT_SET_ASCII, /* 29 - TYPE A failed */ CURLE_OBSOLETE29, /* 29 - NOT USED */
CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */
CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */
CURLE_FTP_COULDNT_GET_SIZE, /* 32 - the SIZE command failed */ CURLE_OBSOLETE32, /* 32 - NOT USED */
CURLE_HTTP_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */
CURLE_HTTP_POST_ERROR, /* 34 */ CURLE_HTTP_POST_ERROR, /* 34 */
CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */
CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */
CURLE_FILE_COULDNT_READ_FILE, /* 37 */ CURLE_FILE_COULDNT_READ_FILE, /* 37 */
CURLE_LDAP_CANNOT_BIND, /* 38 */ CURLE_LDAP_CANNOT_BIND, /* 38 */
CURLE_LDAP_SEARCH_FAILED, /* 39 */ CURLE_LDAP_SEARCH_FAILED, /* 39 */
CURLE_LIBRARY_NOT_FOUND, /* 40 */ CURLE_OBSOLETE40, /* 40 - NOT USED */
CURLE_FUNCTION_NOT_FOUND, /* 41 */ CURLE_FUNCTION_NOT_FOUND, /* 41 */
CURLE_ABORTED_BY_CALLBACK, /* 42 */ CURLE_ABORTED_BY_CALLBACK, /* 42 */
CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
CURLE_BAD_CALLING_ORDER, /* 44 - NOT USED */ CURLE_OBSOLETE44, /* 44 - NOT USED */
CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
CURLE_BAD_PASSWORD_ENTERED, /* 46 - NOT USED */ CURLE_OBSOLETE46, /* 46 - NOT USED */
CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */
CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
CURLE_OBSOLETE, /* 50 - NOT USED */ CURLE_OBSOLETE50, /* 50 - NOT USED */
CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */ CURLE_SSL_PEER_CERTIFICATE, /* 51 - peer's certificate wasn't ok */
CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ CURLE_GOT_NOTHING, /* 52 - when this is a specific error */
CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */
@ -374,7 +374,7 @@ typedef enum {
default */ default */
CURLE_SEND_ERROR, /* 55 - failed sending network data */ CURLE_SEND_ERROR, /* 55 - failed sending network data */
CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ CURLE_RECV_ERROR, /* 56 - failure in receiving network data */
CURLE_SHARE_IN_USE, /* 57 - share is in use */ CURLE_OBSOLETE57, /* 57 - NOT IN USE */
CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */
CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */
CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */
@ -389,10 +389,10 @@ typedef enum {
accepted and we failed to login */ accepted and we failed to login */
CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */
CURLE_TFTP_PERM, /* 69 - permission problem on server */ CURLE_TFTP_PERM, /* 69 - permission problem on server */
CURLE_TFTP_DISKFULL, /* 70 - out of disk space on server */ CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */
CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */
CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */
CURLE_TFTP_EXISTS, /* 73 - File already exists */ CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */
CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */
CURLE_CONV_FAILED, /* 75 - conversion failed */ CURLE_CONV_FAILED, /* 75 - conversion failed */
CURLE_CONV_REQD, /* 76 - caller must register conversion CURLE_CONV_REQD, /* 76 - caller must register conversion
@ -412,6 +412,52 @@ typedef enum {
CURL_LAST /* never use! */ CURL_LAST /* never use! */
} CURLcode; } CURLcode;
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */
/* Backwards compatibility with older names */
/* These are scheduled to disappear by 2009 */
/* The following were added in 7.17.0 */
#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */
#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16
#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32
#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29
#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12
#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20
#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
#define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4
#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR
#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL
#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS
#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR
/* The following were added earlier */
#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT
#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
/* This was the error code 50 in 7.7.3 and a few earlier versions, this
is no longer used by libcurl but is instead #defined here only to not
make programs break */
#define CURLE_ALREADY_COMPLETE 99999
#endif /*!CURL_NO_OLDIES*/
/* This prototype applies to all conversion callbacks */ /* This prototype applies to all conversion callbacks */
typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length);
@ -420,17 +466,6 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */
OpenSSL SSL_CTX */ OpenSSL SSL_CTX */
void *userptr); void *userptr);
/* Make a spelling correction for the operation timed-out define */
#define CURLE_OPERATION_TIMEDOUT CURLE_OPERATION_TIMEOUTED
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */
/* backwards compatibility with older names */
#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR
#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED
#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED
#endif
typedef enum { typedef enum {
CURLPROXY_HTTP = 0, CURLPROXY_HTTP = 0,
CURLPROXY_SOCKS4 = 4, CURLPROXY_SOCKS4 = 4,
@ -453,21 +488,9 @@ typedef enum {
#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */
#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */
/* this was the error code 50 in 7.7.3 and a few earlier versions, this
is no longer used by libcurl but is instead #defined here only to not
make programs break */
#define CURLE_ALREADY_COMPLETE 99999
/* These are just to make older programs not break: */
#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE
#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
#endif
#define CURL_ERROR_SIZE 256 #define CURL_ERROR_SIZE 256
/* parameter for the CURLOPT_FTP_SSL option */ /* parameter for the CURLOPT_USE_SSL option */
typedef enum { typedef enum {
CURLFTPSSL_NONE, /* do not attempt to use SSL */ CURLFTPSSL_NONE, /* do not attempt to use SSL */
CURLFTPSSL_TRY, /* try using SSL, proceed anyway otherwise */ CURLFTPSSL_TRY, /* try using SSL, proceed anyway otherwise */
@ -647,10 +670,8 @@ typedef enum {
/* name of the file keeping your private SSL-certificate */ /* name of the file keeping your private SSL-certificate */
CINIT(SSLCERT, OBJECTPOINT, 25), CINIT(SSLCERT, OBJECTPOINT, 25),
/* password for the SSL-private key, keep this for compatibility */ /* password for the SSL or SSH private key */
CINIT(SSLCERTPASSWD, OBJECTPOINT, 26), CINIT(KEYPASSWD, OBJECTPOINT, 26),
/* password for the SSL private key */
CINIT(SSLKEYPASSWD, OBJECTPOINT, 26),
/* send TYPE parameter? */ /* send TYPE parameter? */
CINIT(CRLF, LONG, 27), CINIT(CRLF, LONG, 27),
@ -704,9 +725,9 @@ typedef enum {
CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */
CINIT(UPLOAD, LONG, 46), /* this is an upload */ CINIT(UPLOAD, LONG, 46), /* this is an upload */
CINIT(POST, LONG, 47), /* HTTP POST method */ CINIT(POST, LONG, 47), /* HTTP POST method */
CINIT(FTPLISTONLY, LONG, 48), /* Use NLST when listing ftp dir */ CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */
CINIT(FTPAPPEND, LONG, 50), /* Append instead of overwrite on upload! */ CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */
/* Specify whether to read the user+password from the .netrc or the URL. /* Specify whether to read the user+password from the .netrc or the URL.
* This must be one of the CURL_NETRC_* enums below. */ * This must be one of the CURL_NETRC_* enums below. */
@ -747,8 +768,6 @@ typedef enum {
* is a string, 'clear', 'safe', 'confidential' or 'private'. If the string * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
* is set but doesn't match one of these, 'private' will be used. */ * is set but doesn't match one of these, 'private' will be used. */
CINIT(KRBLEVEL, OBJECTPOINT, 63), CINIT(KRBLEVEL, OBJECTPOINT, 63),
/* This is for compatibility with older curl releases */
#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
/* Set if we should verify the peer in ssl handshake, set 1 to verify. */ /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
CINIT(SSL_VERIFYPEER, LONG, 64), CINIT(SSL_VERIFYPEER, LONG, 64),
@ -971,7 +990,7 @@ typedef enum {
CURLFTPSSL_CONTROL - SSL for the control connection or fail CURLFTPSSL_CONTROL - SSL for the control connection or fail
CURLFTPSSL_ALL - SSL for all communication or fail CURLFTPSSL_ALL - SSL for all communication or fail
*/ */
CINIT(FTP_SSL, LONG, 119), CINIT(USE_SSL, LONG, 119),
/* The _LARGE version of the standard POSTFIELDSIZE option */ /* The _LARGE version of the standard POSTFIELDSIZE option */
CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120),
@ -987,7 +1006,7 @@ typedef enum {
/* 127 OBSOLETE. Gone in 7.16.0 */ /* 127 OBSOLETE. Gone in 7.16.0 */
/* 128 OBSOLETE. Gone in 7.16.0 */ /* 128 OBSOLETE. Gone in 7.16.0 */
/* When FTP over SSL/TLS is selected (with CURLOPT_FTP_SSL), this option /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option
can be used to change libcurl's default action which is to first try can be used to change libcurl's default action which is to first try
"AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
response has been received. response has been received.
@ -1093,6 +1112,29 @@ typedef enum {
CURLOPT_LASTENTRY /* the last unused */ CURLOPT_LASTENTRY /* the last unused */
} CURLoption; } CURLoption;
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */
/* Backwards compatibility with older names */
/* These are scheduled to disappear by 2009 */
/* The following were added in 7.17.0 */
#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD
#define CURLOPT_FTPAPPEND CURLOPT_APPEND
#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY
#define CURLOPT_FTP_SSL CURLOPT_USE_SSL
/* The following were added earlier */
#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
#else
/* This is set if CURL_NO_OLDIES is defined at compile-time */
#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
#endif
/* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host
name resolves addresses using more than one IP protocol version, this name resolves addresses using more than one IP protocol version, this
option might be handy to force libcurl to use a specific IP version. */ option might be handy to force libcurl to use a specific IP version. */
@ -1106,14 +1148,6 @@ typedef enum {
#define CURLOPT_READDATA CURLOPT_INFILE #define CURLOPT_READDATA CURLOPT_INFILE
#define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER #define CURLOPT_HEADERDATA CURLOPT_WRITEHEADER
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */
#else
/* This is set if CURL_NO_OLDIES is defined at compile-time */
#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
#endif
/* These enums are for use with the CURLOPT_HTTP_VERSION option. */ /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
enum { enum {
CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd

View File

@ -137,7 +137,7 @@ size_t Curl_base64_decode(const char *src, unsigned char **outptr)
* *
* Returns the length of the newly created base64 string. The third argument * Returns the length of the newly created base64 string. The third argument
* is a pointer to an allocated area holding the base64 data. If something * is a pointer to an allocated area holding the base64 data. If something
* went wrong, -1 is returned. * went wrong, 0 is returned.
* *
*/ */
size_t Curl_base64_encode(struct SessionHandle *data, size_t Curl_base64_encode(struct SessionHandle *data,
@ -265,7 +265,7 @@ int main(int argc, argv_item_t argv[], char **envp)
handle = curl_easy_init(); handle = curl_easy_init();
if(handle == NULL) { if(handle == NULL) {
fprintf(stderr, "Error: curl_easy_init failed\n"); fprintf(stderr, "Error: curl_easy_init failed\n");
return 0; return 1;
} }
#endif #endif
data = (unsigned char *)suck(&dataLen); data = (unsigned char *)suck(&dataLen);
@ -305,7 +305,7 @@ int main(int argc, argv_item_t argv[], char **envp)
struct SessionHandle *handle = curl_easy_init(); struct SessionHandle *handle = curl_easy_init();
if(handle == NULL) { if(handle == NULL) {
fprintf(stderr, "Error: curl_easy_init failed\n"); fprintf(stderr, "Error: curl_easy_init failed\n");
return 0; return 1;
} }
#endif #endif

View File

@ -552,7 +552,7 @@ CURLcode Curl_is_connected(struct connectdata *conn,
if(has_passed > allow ) { if(has_passed > allow ) {
/* time-out, bail out, go home */ /* time-out, bail out, go home */
failf(data, "Connection time-out after %ld ms", has_passed); failf(data, "Connection time-out after %ld ms", has_passed);
return CURLE_OPERATION_TIMEOUTED; return CURLE_OPERATION_TIMEDOUT;
} }
if(conn->bits.tcpconnect) { if(conn->bits.tcpconnect) {
/* we are connected already! */ /* we are connected already! */
@ -827,7 +827,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
if(timeout_ms < 0) { if(timeout_ms < 0) {
/* a precaution, no need to continue if time already is up */ /* a precaution, no need to continue if time already is up */
failf(data, "Connection time-out"); failf(data, "Connection time-out");
return CURLE_OPERATION_TIMEOUTED; return CURLE_OPERATION_TIMEDOUT;
} }
} }
Curl_expire(data, timeout_ms); Curl_expire(data, timeout_ms);
@ -863,7 +863,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
timeout_ms -= Curl_tvdiff(after, before); timeout_ms -= Curl_tvdiff(after, before);
if(timeout_ms < 0) { if(timeout_ms < 0) {
failf(data, "connect() timed out!"); failf(data, "connect() timed out!");
return CURLE_OPERATION_TIMEOUTED; return CURLE_OPERATION_TIMEDOUT;
} }
before = after; before = after;
} /* end of connect-to-each-address loop */ } /* end of connect-to-each-address loop */

View File

@ -1885,7 +1885,7 @@ static CURLcode ftp_state_type_resp(struct connectdata *conn,
successful 'TYPE I'. While that is not as RFC959 says, it is still a successful 'TYPE I'. While that is not as RFC959 says, it is still a
positive response code and we allow that. */ positive response code and we allow that. */
failf(data, "Couldn't set desired mode"); failf(data, "Couldn't set desired mode");
return CURLE_FTP_COULDNT_SET_BINARY; /* FIX */ return CURLE_FTP_COULDNT_SET_TYPE;
} }
if(ftpcode != 200) if(ftpcode != 200)
infof(data, "Got a %03d response code instead of the assumed 200\n", infof(data, "Got a %03d response code instead of the assumed 200\n",
@ -2608,7 +2608,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
case FTP_STOR_PREQUOTE: case FTP_STOR_PREQUOTE:
if(ftpcode >= 400) { if(ftpcode >= 400) {
failf(conn->data, "QUOT command failed with %03d", ftpcode); failf(conn->data, "QUOT command failed with %03d", ftpcode);
return CURLE_FTP_QUOTE_ERROR; return CURLE_QUOTE_ERROR;
} }
result = ftp_state_quote(conn, FALSE, ftpc->state); result = ftp_state_quote(conn, FALSE, ftpc->state);
if(result) if(result)
@ -2631,7 +2631,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
failf(data, "Server denied you to change to the given directory"); failf(data, "Server denied you to change to the given directory");
ftpc->cwdfail = TRUE; /* don't remember this path as we failed ftpc->cwdfail = TRUE; /* don't remember this path as we failed
to enter it */ to enter it */
return CURLE_FTP_ACCESS_DENIED; return CURLE_REMOTE_ACCESS_DENIED;
} }
} }
else { else {
@ -2653,7 +2653,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
if(ftpcode/100 != 2) { if(ftpcode/100 != 2) {
/* failure to MKD the dir */ /* failure to MKD the dir */
failf(data, "Failed to MKD dir: %03d", ftpcode); failf(data, "Failed to MKD dir: %03d", ftpcode);
return CURLE_FTP_ACCESS_DENIED; return CURLE_REMOTE_ACCESS_DENIED;
} }
state(conn, FTP_CWD); state(conn, FTP_CWD);
/* send CWD */ /* send CWD */
@ -2964,10 +2964,10 @@ CURLcode Curl_ftp_done(struct connectdata *conn, CURLcode status, bool premature
case CURLE_BAD_DOWNLOAD_RESUME: case CURLE_BAD_DOWNLOAD_RESUME:
case CURLE_FTP_WEIRD_PASV_REPLY: case CURLE_FTP_WEIRD_PASV_REPLY:
case CURLE_FTP_PORT_FAILED: case CURLE_FTP_PORT_FAILED:
case CURLE_FTP_COULDNT_SET_BINARY: case CURLE_FTP_COULDNT_SET_TYPE:
case CURLE_FTP_COULDNT_RETR_FILE: case CURLE_FTP_COULDNT_RETR_FILE:
case CURLE_UPLOAD_FAILED: case CURLE_UPLOAD_FAILED:
case CURLE_FTP_ACCESS_DENIED: case CURLE_REMOTE_ACCESS_DENIED:
case CURLE_FILESIZE_EXCEEDED: case CURLE_FILESIZE_EXCEEDED:
/* the connection stays alive fine even though this happened */ /* the connection stays alive fine even though this happened */
/* fall-through */ /* fall-through */
@ -3146,7 +3146,7 @@ CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote)
if (ftpcode >= 400) { if (ftpcode >= 400) {
failf(conn->data, "QUOT string not accepted: %s", item->data); failf(conn->data, "QUOT string not accepted: %s", item->data);
return CURLE_FTP_QUOTE_ERROR; return CURLE_QUOTE_ERROR;
} }
} }

View File

@ -175,7 +175,7 @@ static CURLcode handshake(struct connectdata *conn,
if(timeout_ms < 0) { if(timeout_ms < 0) {
/* a precaution, no need to continue if time already is up */ /* a precaution, no need to continue if time already is up */
failf(data, "SSL connection timeout"); failf(data, "SSL connection timeout");
return CURLE_OPERATION_TIMEOUTED; return CURLE_OPERATION_TIMEDOUT;
} }
rc = Curl_socket_ready(conn->sock[sockindex], rc = Curl_socket_ready(conn->sock[sockindex],

View File

@ -550,7 +550,7 @@ int Curl_nss_send(struct connectdata *conn, /* connection data */
if(err == PR_IO_TIMEOUT_ERROR) { if(err == PR_IO_TIMEOUT_ERROR) {
failf(data, "SSL connection timeout"); failf(data, "SSL connection timeout");
return CURLE_OPERATION_TIMEOUTED; return CURLE_OPERATION_TIMEDOUT;
} }
failf(conn->data, "SSL write: error %d\n", err); failf(conn->data, "SSL write: error %d\n", err);
@ -591,7 +591,7 @@ ssize_t Curl_nss_recv(struct connectdata * conn, /* connection data */
} }
if(err == PR_IO_TIMEOUT_ERROR) { if(err == PR_IO_TIMEOUT_ERROR) {
failf(data, "SSL connection timeout"); failf(data, "SSL connection timeout");
return CURLE_OPERATION_TIMEOUTED; return CURLE_OPERATION_TIMEDOUT;
} }
failf(conn->data, "SSL read: errno %d", err); failf(conn->data, "SSL read: errno %d", err);
return -1; return -1;

View File

@ -57,7 +57,7 @@ CURLcode Curl_speedcheck(struct SessionHandle *data,
"Less than %d bytes/sec transfered the last %d seconds", "Less than %d bytes/sec transfered the last %d seconds",
data->set.low_speed_limit, data->set.low_speed_limit,
data->set.low_speed_time); data->set.low_speed_time);
return CURLE_OPERATION_TIMEOUTED; return CURLE_OPERATION_TIMEDOUT;
} }
Curl_expire(data, howlong); Curl_expire(data, howlong);
} }

View File

@ -722,7 +722,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
if (cp == NULL) { if (cp == NULL) {
failf(data, "Syntax error in SFTP command. Supply parameter(s)!"); failf(data, "Syntax error in SFTP command. Supply parameter(s)!");
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
@ -880,7 +880,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
failf(data, "Attempt to get SFTP stats failed: %s", failf(data, "Attempt to get SFTP stats failed: %s",
sftp_libssh2_strerror(err)); sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
@ -894,7 +894,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
sshc->quote_path2 = NULL; sshc->quote_path2 = NULL;
failf(data, "Syntax error: chgrp gid not a number"); failf(data, "Syntax error: chgrp gid not a number");
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
} }
@ -909,7 +909,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
sshc->quote_path2 = NULL; sshc->quote_path2 = NULL;
failf(data, "Syntax error: chmod permissions not a number"); failf(data, "Syntax error: chmod permissions not a number");
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
} }
@ -922,7 +922,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
sshc->quote_path2 = NULL; sshc->quote_path2 = NULL;
failf(data, "Syntax error: chown uid not a number"); failf(data, "Syntax error: chown uid not a number");
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
} }
@ -945,7 +945,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
failf(data, "Attempt to set SFTP stats failed: %s", failf(data, "Attempt to set SFTP stats failed: %s",
sftp_libssh2_strerror(err)); sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
state(conn, SSH_SFTP_NEXT_QUOTE); state(conn, SSH_SFTP_NEXT_QUOTE);
@ -966,7 +966,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
failf(data, "symlink command failed: %s", failf(data, "symlink command failed: %s",
sftp_libssh2_strerror(err)); sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
state(conn, SSH_SFTP_NEXT_QUOTE); state(conn, SSH_SFTP_NEXT_QUOTE);
@ -983,7 +983,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
sshc->quote_path1 = NULL; sshc->quote_path1 = NULL;
failf(data, "mkdir command failed: %s", sftp_libssh2_strerror(err)); failf(data, "mkdir command failed: %s", sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
state(conn, SSH_SFTP_NEXT_QUOTE); state(conn, SSH_SFTP_NEXT_QUOTE);
@ -1002,7 +1002,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
sshc->quote_path2 = NULL; sshc->quote_path2 = NULL;
failf(data, "rename command failed: %s", sftp_libssh2_strerror(err)); failf(data, "rename command failed: %s", sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
state(conn, SSH_SFTP_NEXT_QUOTE); state(conn, SSH_SFTP_NEXT_QUOTE);
@ -1019,7 +1019,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
sshc->quote_path1 = NULL; sshc->quote_path1 = NULL;
failf(data, "rmdir command failed: %s", sftp_libssh2_strerror(err)); failf(data, "rmdir command failed: %s", sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
state(conn, SSH_SFTP_NEXT_QUOTE); state(conn, SSH_SFTP_NEXT_QUOTE);
@ -1036,7 +1036,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
sshc->quote_path1 = NULL; sshc->quote_path1 = NULL;
failf(data, "rm command failed: %s", sftp_libssh2_strerror(err)); failf(data, "rm command failed: %s", sftp_libssh2_strerror(err));
state(conn, SSH_SFTP_CLOSE); state(conn, SSH_SFTP_CLOSE);
sshc->actualCode = CURLE_FTP_QUOTE_ERROR; sshc->actualCode = CURLE_QUOTE_ERROR;
break; break;
} }
state(conn, SSH_SFTP_NEXT_QUOTE); state(conn, SSH_SFTP_NEXT_QUOTE);
@ -2143,7 +2143,7 @@ get_pathname(const char **cpp, char **path)
if (!*cp) { if (!*cp) {
*cpp = cp; *cpp = cp;
*path = NULL; *path = NULL;
return CURLE_FTP_QUOTE_ERROR; return CURLE_QUOTE_ERROR;
} }
*path = malloc(strlen(cp) + 1); *path = malloc(strlen(cp) + 1);
@ -2198,7 +2198,7 @@ get_pathname(const char **cpp, char **path)
fail: fail:
Curl_safefree(*path); Curl_safefree(*path);
*path = NULL; *path = NULL;
return CURLE_FTP_QUOTE_ERROR; return CURLE_QUOTE_ERROR;
} }

View File

@ -1492,7 +1492,7 @@ Curl_ossl_connect_step2(struct connectdata *conn,
if(*timeout_ms < 0) { if(*timeout_ms < 0) {
/* a precaution, no need to continue if time already is up */ /* a precaution, no need to continue if time already is up */
failf(data, "SSL connection timeout"); failf(data, "SSL connection timeout");
return CURLE_OPERATION_TIMEOUTED; return CURLE_OPERATION_TIMEDOUT;
} }
err = SSL_connect(connssl->handle); err = SSL_connect(connssl->handle);

View File

@ -81,15 +81,12 @@ curl_easy_strerror(CURLcode error)
case CURLE_FTP_WEIRD_SERVER_REPLY: case CURLE_FTP_WEIRD_SERVER_REPLY:
return "FTP: weird server reply"; return "FTP: weird server reply";
case CURLE_FTP_ACCESS_DENIED: case CURLE_REMOTE_ACCESS_DENIED:
return "FTP: access denied"; return "access denied";
case CURLE_FTP_WEIRD_PASS_REPLY: case CURLE_FTP_WEIRD_PASS_REPLY:
return "FTP: unknown PASS reply"; return "FTP: unknown PASS reply";
case CURLE_FTP_WEIRD_USER_REPLY:
return "FTP: unknown USER reply";
case CURLE_FTP_WEIRD_PASV_REPLY: case CURLE_FTP_WEIRD_PASV_REPLY:
return "FTP: unknown PASV reply"; return "FTP: unknown PASV reply";
@ -99,11 +96,8 @@ curl_easy_strerror(CURLcode error)
case CURLE_FTP_CANT_GET_HOST: case CURLE_FTP_CANT_GET_HOST:
return "FTP: can't figure out the host in the PASV response"; return "FTP: can't figure out the host in the PASV response";
case CURLE_FTP_CANT_RECONNECT: case CURLE_FTP_COULDNT_SET_TYPE:
return "FTP: can't connect to server the response code is unknown"; return "FTP: couldn't set file type";
case CURLE_FTP_COULDNT_SET_BINARY:
return "FTP: couldn't set binary mode";
case CURLE_PARTIAL_FILE: case CURLE_PARTIAL_FILE:
return "Transferred a partial file"; return "Transferred a partial file";
@ -111,11 +105,8 @@ curl_easy_strerror(CURLcode error)
case CURLE_FTP_COULDNT_RETR_FILE: case CURLE_FTP_COULDNT_RETR_FILE:
return "FTP: couldn't retrieve (RETR failed) the specified file"; return "FTP: couldn't retrieve (RETR failed) the specified file";
case CURLE_FTP_WRITE_ERROR: case CURLE_QUOTE_ERROR:
return "FTP: the post-transfer acknowledge response was not OK"; return "a quote command returned error";
case CURLE_FTP_QUOTE_ERROR:
return "FTP: a quote command returned error";
case CURLE_HTTP_RETURNED_ERROR: case CURLE_HTTP_RETURNED_ERROR:
return "HTTP response code said error"; return "HTTP response code said error";
@ -130,28 +121,18 @@ curl_easy_strerror(CURLcode error)
return "failed to open/read local data from file/application"; return "failed to open/read local data from file/application";
case CURLE_OUT_OF_MEMORY: case CURLE_OUT_OF_MEMORY:
#ifdef CURL_DOES_CONVERSIONS
return "conversion failed -or- out of memory";
#else
return "out of memory"; return "out of memory";
#endif /* CURL_DOES_CONVERSIONS */
case CURLE_OPERATION_TIMEOUTED: case CURLE_OPERATION_TIMEDOUT:
return "a timeout was reached"; return "a timeout was reached";
case CURLE_FTP_COULDNT_SET_ASCII:
return "FTP could not set ASCII mode (TYPE A)";
case CURLE_FTP_PORT_FAILED: case CURLE_FTP_PORT_FAILED:
return "FTP command PORT failed"; return "FTP command PORT failed";
case CURLE_FTP_COULDNT_USE_REST: case CURLE_FTP_COULDNT_USE_REST:
return "FTP command REST failed"; return "FTP command REST failed";
case CURLE_FTP_COULDNT_GET_SIZE: case CURLE_RANGE_ERROR:
return "FTP command SIZE failed";
case CURLE_HTTP_RANGE_ERROR:
return "a range was requested but the server did not deliver it"; return "a range was requested but the server did not deliver it";
case CURLE_HTTP_POST_ERROR: case CURLE_HTTP_POST_ERROR:
@ -172,9 +153,6 @@ curl_easy_strerror(CURLcode error)
case CURLE_LDAP_SEARCH_FAILED: case CURLE_LDAP_SEARCH_FAILED:
return "LDAP: search failed"; return "LDAP: search failed";
case CURLE_LIBRARY_NOT_FOUND:
return "a required shared library was not found";
case CURLE_FUNCTION_NOT_FOUND: case CURLE_FUNCTION_NOT_FOUND:
return "a required function in the shared library was not found"; return "a required function in the shared library was not found";
@ -217,9 +195,6 @@ curl_easy_strerror(CURLcode error)
case CURLE_RECV_ERROR: case CURLE_RECV_ERROR:
return "failure when receiving data from the peer"; return "failure when receiving data from the peer";
case CURLE_SHARE_IN_USE:
return "share is already in use";
case CURLE_SSL_CERTPROBLEM: case CURLE_SSL_CERTPROBLEM:
return "problem with the local SSL certificate"; return "problem with the local SSL certificate";
@ -259,8 +234,8 @@ curl_easy_strerror(CURLcode error)
case CURLE_TFTP_PERM: case CURLE_TFTP_PERM:
return "TFTP: Access Violation"; return "TFTP: Access Violation";
case CURLE_TFTP_DISKFULL: case CURLE_REMOTE_DISK_FULL:
return "TFTP: Disk full or allocation exceeded"; return "Disk full or allocation exceeded";
case CURLE_TFTP_ILLEGAL: case CURLE_TFTP_ILLEGAL:
return "TFTP: Illegal operation"; return "TFTP: Illegal operation";
@ -268,8 +243,8 @@ curl_easy_strerror(CURLcode error)
case CURLE_TFTP_UNKNOWNID: case CURLE_TFTP_UNKNOWNID:
return "TFTP: Unknown transfer ID"; return "TFTP: Unknown transfer ID";
case CURLE_TFTP_EXISTS: case CURLE_REMOTE_FILE_EXISTS:
return "TFTP: File already exists"; return "File already exists";
case CURLE_TFTP_NOSUCHUSER: case CURLE_TFTP_NOSUCHUSER:
return "TFTP: No such user"; return "TFTP: No such user";
@ -287,12 +262,19 @@ curl_easy_strerror(CURLcode error)
return "Error in the SSH layer"; return "Error in the SSH layer";
/* error codes not used by current libcurl */ /* error codes not used by current libcurl */
case CURLE_URL_MALFORMAT_USER: case CURLE_OBSOLETE4:
case CURLE_FTP_USER_PASSWORD_INCORRECT: case CURLE_OBSOLETE10:
case CURLE_MALFORMAT_USER: case CURLE_OBSOLETE12:
case CURLE_BAD_CALLING_ORDER: case CURLE_OBSOLETE16:
case CURLE_BAD_PASSWORD_ENTERED: case CURLE_OBSOLETE20:
case CURLE_OBSOLETE: case CURLE_OBSOLETE24:
case CURLE_OBSOLETE29:
case CURLE_OBSOLETE32:
case CURLE_OBSOLETE40:
case CURLE_OBSOLETE44:
case CURLE_OBSOLETE46:
case CURLE_OBSOLETE50:
case CURLE_OBSOLETE57:
case CURL_LAST: case CURL_LAST:
break; break;
} }

View File

@ -1390,7 +1390,7 @@ CURLcode Curl_telnet(struct connectdata *conn, bool *done)
now = Curl_tvnow(); now = Curl_tvnow();
if(Curl_tvdiff(now, conn->created) >= data->set.timeout) { if(Curl_tvdiff(now, conn->created) >= data->set.timeout) {
failf(data, "Time-out"); failf(data, "Time-out");
code = CURLE_OPERATION_TIMEOUTED; code = CURLE_OPERATION_TIMEDOUT;
keepon = FALSE; keepon = FALSE;
} }
} }

View File

@ -801,7 +801,7 @@ CURLcode Curl_tftp(struct connectdata *conn, bool *done)
code = CURLE_TFTP_PERM; code = CURLE_TFTP_PERM;
break; break;
case TFTP_ERR_DISKFULL: case TFTP_ERR_DISKFULL:
code = CURLE_TFTP_DISKFULL; code = CURLE_REMOTE_DISK_FULL;
break; break;
case TFTP_ERR_ILLEGAL: case TFTP_ERR_ILLEGAL:
code = CURLE_TFTP_ILLEGAL; code = CURLE_TFTP_ILLEGAL;
@ -810,13 +810,13 @@ CURLcode Curl_tftp(struct connectdata *conn, bool *done)
code = CURLE_TFTP_UNKNOWNID; code = CURLE_TFTP_UNKNOWNID;
break; break;
case TFTP_ERR_EXISTS: case TFTP_ERR_EXISTS:
code = CURLE_TFTP_EXISTS; code = CURLE_REMOTE_FILE_EXISTS;
break; break;
case TFTP_ERR_NOSUCHUSER: case TFTP_ERR_NOSUCHUSER:
code = CURLE_TFTP_NOSUCHUSER; code = CURLE_TFTP_NOSUCHUSER;
break; break;
case TFTP_ERR_TIMEOUT: case TFTP_ERR_TIMEOUT:
code = CURLE_OPERATION_TIMEOUTED; code = CURLE_OPERATION_TIMEDOUT;
break; break;
case TFTP_ERR_NORESPONSE: case TFTP_ERR_NORESPONSE:
code = CURLE_COULDNT_CONNECT; code = CURLE_COULDNT_CONNECT;

View File

@ -1182,7 +1182,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
* wasn't a GET we did a POST or PUT resume) */ * wasn't a GET we did a POST or PUT resume) */
failf(data, "HTTP server doesn't seem to support " failf(data, "HTTP server doesn't seem to support "
"byte ranges. Cannot resume."); "byte ranges. Cannot resume.");
return CURLE_HTTP_RANGE_ERROR; return CURLE_RANGE_ERROR;
} }
if(data->set.timecondition && !data->reqdata.range) { if(data->set.timecondition && !data->reqdata.range) {
@ -1591,7 +1591,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
FORMAT_OFF_T " bytes received", FORMAT_OFF_T " bytes received",
data->set.timeout, k->bytecount); data->set.timeout, k->bytecount);
} }
return CURLE_OPERATION_TIMEOUTED; return CURLE_OPERATION_TIMEDOUT;
} }
if(!k->keepon) { if(!k->keepon) {

View File

@ -813,16 +813,16 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
*/ */
data->set.ftp_response_timeout = va_arg( param , long ) * 1000; data->set.ftp_response_timeout = va_arg( param , long ) * 1000;
break; break;
case CURLOPT_FTPLISTONLY: case CURLOPT_DIRLISTONLY:
/* /*
* An FTP option that changes the command to one that asks for a list * An option that changes the command to one that asks for a list
* only, no file info details. * only, no file info details.
*/ */
data->set.ftp_list_only = (bool)(0 != va_arg(param, long)); data->set.ftp_list_only = (bool)(0 != va_arg(param, long));
break; break;
case CURLOPT_FTPAPPEND: case CURLOPT_APPEND:
/* /*
* We want to upload and append to an existing (FTP) file. * We want to upload and append to an existing file.
*/ */
data->set.ftp_append = (bool)(0 != va_arg(param, long)); data->set.ftp_append = (bool)(0 != va_arg(param, long));
break; break;
@ -1524,9 +1524,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
result = Curl_setstropt(&data->set.str[STRING_KEY_TYPE], result = Curl_setstropt(&data->set.str[STRING_KEY_TYPE],
va_arg(param, char *)); va_arg(param, char *));
break; break;
case CURLOPT_SSLKEYPASSWD: case CURLOPT_KEYPASSWD:
/* /*
* String that holds the SSL private key password. * String that holds the SSL or SSH private key password.
*/ */
result = Curl_setstropt(&data->set.str[STRING_KEY_PASSWD], result = Curl_setstropt(&data->set.str[STRING_KEY_PASSWD],
va_arg(param, char *)); va_arg(param, char *));
@ -1730,9 +1730,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
data->set.max_filesize = va_arg(param, long); data->set.max_filesize = va_arg(param, long);
break; break;
case CURLOPT_FTP_SSL: case CURLOPT_USE_SSL:
/* /*
* Make FTP transfers attempt to use SSL/TLS. * Make transfers attempt to use SSL/TLS.
*/ */
data->set.ftp_ssl = (curl_ftpssl)va_arg(param, long); data->set.ftp_ssl = (curl_ftpssl)va_arg(param, long);
break; break;
@ -4226,7 +4226,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
won't, and zero would be to switch it off so we never set it to won't, and zero would be to switch it off so we never set it to
less than 1! */ less than 1! */
alarm(1); alarm(1);
result = CURLE_OPERATION_TIMEOUTED; result = CURLE_OPERATION_TIMEDOUT;
failf(data, "Previous alarm fired off!"); failf(data, "Previous alarm fired off!");
} }
else else

View File

@ -52,7 +52,7 @@ from CURLOPT_CAINFO.
_ The certificate identifier is then used as an application identifier in the _ The certificate identifier is then used as an application identifier in the
main certificate store. If successful, this context is used. main certificate store. If successful, this context is used.
_ If the previous step failed, the certificate identifier is used as the file _ If the previous step failed, the certificate identifier is used as the file
name of a keyring. CURLOPT_SSLKEYPASSWD is used here as the keyring password. name of a keyring. CURLOPT_KEYPASSWD is used here as the keyring password.
_ The default ca-bundle (CURLOPT_CAINFO) is set to the main certificate store's _ The default ca-bundle (CURLOPT_CAINFO) is set to the main certificate store's
keyring file name: this allows to use the system global CAs by default. (In that keyring file name: this allows to use the system global CAs by default. (In that
case, the keyring password is safely recovered from the system... IBM dixit!) case, the keyring password is safely recovered from the system... IBM dixit!)
@ -78,6 +78,7 @@ options:
CURLOPT_FTP_ACCOUNT CURLOPT_FTP_ACCOUNT
CURLOPT_FTP_ALTERNATIVE_TO_USER CURLOPT_FTP_ALTERNATIVE_TO_USER
CURLOPT_INTERFACE CURLOPT_INTERFACE
CURLOPT_KEYPASSWD
CURLOPT_KRBLEVEL CURLOPT_KRBLEVEL
CURLOPT_NETRC_FILE CURLOPT_NETRC_FILE
CURLOPT_POSTFIELDS CURLOPT_POSTFIELDS
@ -92,7 +93,6 @@ options:
CURLOPT_SSLCERTTYPE CURLOPT_SSLCERTTYPE
CURLOPT_SSLENGINE CURLOPT_SSLENGINE
CURLOPT_SSLKEY CURLOPT_SSLKEY
CURLOPT_SSLKEYPASSWD
CURLOPT_SSLKEYTYPE CURLOPT_SSLKEYTYPE
CURLOPT_SSL_CIPHER_LIST CURLOPT_SSL_CIPHER_LIST
CURLOPT_URL CURLOPT_URL

View File

@ -1039,6 +1039,7 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
case CURLOPT_FTP_ACCOUNT: case CURLOPT_FTP_ACCOUNT:
case CURLOPT_FTP_ALTERNATIVE_TO_USER: case CURLOPT_FTP_ALTERNATIVE_TO_USER:
case CURLOPT_INTERFACE: case CURLOPT_INTERFACE:
case CURLOPT_KEYPASSWD:
case CURLOPT_KRBLEVEL: case CURLOPT_KRBLEVEL:
case CURLOPT_NETRC_FILE: case CURLOPT_NETRC_FILE:
case CURLOPT_POSTFIELDS: case CURLOPT_POSTFIELDS:
@ -1053,7 +1054,6 @@ curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...)
case CURLOPT_SSLCERTTYPE: case CURLOPT_SSLCERTTYPE:
case CURLOPT_SSLENGINE: case CURLOPT_SSLENGINE:
case CURLOPT_SSLKEY: case CURLOPT_SSLKEY:
case CURLOPT_SSLKEYPASSWD:
case CURLOPT_SSLKEYTYPE: case CURLOPT_SSLKEYTYPE:
case CURLOPT_SSL_CIPHER_LIST: case CURLOPT_SSL_CIPHER_LIST:
case CURLOPT_URL: case CURLOPT_URL:

View File

@ -212,7 +212,7 @@
d c 2 d c 2
d CURLE_URL_MALFORMAT... d CURLE_URL_MALFORMAT...
d c 3 d c 3
d CURLE_URL_MALFORMAT_USER... d CURLE_OBSOLETE4...
d c 4 d c 4
d CURLE_COULDNT_RESOLVE_PROXY... d CURLE_COULDNT_RESOLVE_PROXY...
d c 5 d c 5
@ -222,13 +222,13 @@
d c 7 d c 7
d CURLE_FTP_WEIRD_SERVER_REPLY... d CURLE_FTP_WEIRD_SERVER_REPLY...
d c 8 d c 8
d CURLE_FTP_ACCESS_DENIED... d CURLE_REMOTE_ACCESS_DENIED...
d c 9 d c 9
d CURLE_FTP_USER_PASSWORD_INCORRECT... d CURLE_OBSOLETE10...
d c 10 d c 10
d CURLE_FTP_WEIRD_PASS_REPLY... d CURLE_FTP_WEIRD_PASS_REPLY...
d c 11 d c 11
d CURLE_FTP_WEIRD_USER_REPLY... d CURLE_OBSOLETE12...
d c 12 d c 12
d CURLE_FTP_WEIRD_PASV_REPLY... d CURLE_FTP_WEIRD_PASV_REPLY...
d c 13 d c 13
@ -236,23 +236,23 @@
d c 14 d c 14
d CURLE_FTP_CANT_GET_HOST... d CURLE_FTP_CANT_GET_HOST...
d c 15 d c 15
d CURLE_FTP_CANT_RECONNECT... d CURLE_OBSOLETE16...
d c 16 d c 16
d CURLE_FTP_COULDNT_SET_BINARY... d CURLE_FTP_COULDNT_SET_TYPE...
d c 17 d c 17
d CURLE_PARTIAL_FILE... d CURLE_PARTIAL_FILE...
d c 18 d c 18
d CURLE_FTP_COULDNT_RETR_FILE... d CURLE_FTP_COULDNT_RETR_FILE...
d c 19 d c 19
d CURLE_FTP_WRITE_ERROR... d CURLE_OBSOLETE20...
d c 20 d c 20
d CURLE_FTP_QUOTE_ERROR... d CURLE_QUOTE_ERROR...
d c 21 d c 21
d CURLE_HTTP_RETURNED_ERROR... d CURLE_HTTP_RETURNED_ERROR...
d c 22 d c 22
d CURLE_WRITE_ERROR... d CURLE_WRITE_ERROR...
d c 23 d c 23
d CURLE_MALFORMAT_USER... d CURLE_OBSOLETE24...
d c 24 d c 24
d CURLE_UPLOAD_FAILED... d CURLE_UPLOAD_FAILED...
d c 25 d c 25
@ -260,19 +260,17 @@
d c 26 d c 26
d CURLE_OUT_OF_MEMORY... d CURLE_OUT_OF_MEMORY...
d c 27 d c 27
d CURLE_OPERATION_TIMEOUTED...
d c 28
d CURLE_OPERATION_TIMEDOUT... d CURLE_OPERATION_TIMEDOUT...
d c 28 d c 28
d CURLE_FTP_COULDNT_SET_ASCII... d CURLE_OBSOLETE29...
d c 29 d c 29
d CURLE_FTP_PORT_FAILED... d CURLE_FTP_PORT_FAILED...
d c 30 d c 30
d CURLE_FTP_COULDNT_USE_REST... d CURLE_FTP_COULDNT_USE_REST...
d c 31 d c 31
d CURLE_FTP_COULDNT_GET_SIZE... d CURLE_OBSOLETE32...
d c 32 d c 32
d CURLE_HTTP_RANGE_ERROR... d CURLE_RANGE_ERROR...
d c 33 d c 33
d CURLE_HTTP_POST_ERROR... d CURLE_HTTP_POST_ERROR...
d c 34 d c 34
@ -286,7 +284,7 @@
d c 38 d c 38
d CURLE_LDAP_SEARCH_FAILED... d CURLE_LDAP_SEARCH_FAILED...
d c 39 d c 39
d CURLE_LIBRARY_NOT_FOUND... d CURLE_OBSOLETE40...
d c 40 d c 40
d CURLE_FUNCTION_NOT_FOUND... d CURLE_FUNCTION_NOT_FOUND...
d c 41 d c 41
@ -294,11 +292,11 @@
d c 42 d c 42
d CURLE_BAD_FUNCTION_ARGUMENT... d CURLE_BAD_FUNCTION_ARGUMENT...
d c 43 d c 43
d CURLE_BAD_CALLING_ORDER... d CURLE_OBSOLETE44...
d c 44 d c 44
d CURLE_INTERFACE_FAILED... d CURLE_INTERFACE_FAILED...
d c 45 d c 45
d CURLE_BAD_PASSWORD_ENTERED... d CURLE_OBSOLETE46...
d c 46 d c 46
d CURLE_TOO_MANY_REDIRECTS... d CURLE_TOO_MANY_REDIRECTS...
d c 47 d c 47
@ -306,7 +304,7 @@
d c 48 d c 48
d CURLE_TELNET_OPTION_SYNTAX... d CURLE_TELNET_OPTION_SYNTAX...
d c 49 d c 49
d CURLE_OBSOLETE... d CURLE_OBSOLETE50...
d c 50 d c 50
d CURLE_SSL_PEER_CERTIFICATE... d CURLE_SSL_PEER_CERTIFICATE...
d c 51 d c 51
@ -320,7 +318,7 @@
d c 55 d c 55
d CURLE_RECV_ERROR... d CURLE_RECV_ERROR...
d c 56 d c 56
d CURLE_SHARE_IN_USE... d CURLE_OBSOLETE57...
d c 57 d c 57
d CURLE_SSL_CERTPROBLEM... d CURLE_SSL_CERTPROBLEM...
d c 58 d c 58
@ -346,13 +344,13 @@
d c 68 d c 68
d CURLE_TFTP_PERM... d CURLE_TFTP_PERM...
d c 69 d c 69
d CURLE_TFTP_DISKFULL... d CURLE_REMOTE_DISK_FULL...
d c 70 d c 70
d CURLE_TFTP_ILLEGAL... d CURLE_TFTP_ILLEGAL...
d c 71 d c 71
d CURLE_TFTP_UNKNOWNID... d CURLE_TFTP_UNKNOWNID...
d c 72 d c 72
d CURLE_TFTP_EXISTS... d CURLE_REMOTE_FILE_EXISTS...
d c 73 d c 73
d CURLE_TFTP_NOSUCHUSER... d CURLE_TFTP_NOSUCHUSER...
d c 74 d c 74
@ -493,7 +491,7 @@
d c 10025 d c 10025
d CURLOPT_SSLCERTPASSWD... d CURLOPT_SSLCERTPASSWD...
d c 10026 d c 10026
d CURLOPT_SSLKEYPASSWD... d CURLOPT_KEYPASSWD...
d c 10026 d c 10026
d CURLOPT_CRLF c 00027 d CURLOPT_CRLF c 00027
d CURLOPT_QUOTE c 10028 d CURLOPT_QUOTE c 10028
@ -530,9 +528,9 @@
d CURLOPT_UPLOAD... d CURLOPT_UPLOAD...
d c 00046 d c 00046
d CURLOPT_POST c 00047 d CURLOPT_POST c 00047
d CURLOPT_FTPLISTONLY... d CURLOPT_DIRLISTONLY...
d c 00048 d c 00048
d CURLOPT_FTPAPPEND... d CURLOPT_APPEND...
d c 00050 d c 00050
d CURLOPT_NETRC c 00051 d CURLOPT_NETRC c 00051
d CURLOPT_FOLLOWLOCATION... d CURLOPT_FOLLOWLOCATION...
@ -659,7 +657,7 @@
d c 30117 d c 30117
d CURLOPT_NETRC_FILE... d CURLOPT_NETRC_FILE...
d c 10118 d c 10118
d CURLOPT_FTP_SSL... d CURLOPT_USE_SSL...
d c 00119 d c 00119
d CURLOPT_POSTFIELDSIZE_LARGE... d CURLOPT_POSTFIELDSIZE_LARGE...
d c 30120 d c 30120

View File

@ -175,7 +175,7 @@ typedef enum {
#define CONF_NOPROGRESS (1<<10) /* shut off the progress meter */ #define CONF_NOPROGRESS (1<<10) /* shut off the progress meter */
#define CONF_NOBODY (1<<11) /* use HEAD to get http document */ #define CONF_NOBODY (1<<11) /* use HEAD to get http document */
#define CONF_FAILONERROR (1<<12) /* no output on http error codes >= 300 */ #define CONF_FAILONERROR (1<<12) /* no output on http error codes >= 300 */
#define CONF_FTPLISTONLY (1<<16) /* Use NLST when listing ftp dir */ #define CONF_DIRLISTONLY (1<<16) /* request nonverbose directory listing */
#define CONF_FTPAPPEND (1<<20) /* Append instead of overwrite on upload! */ #define CONF_FTPAPPEND (1<<20) /* Append instead of overwrite on upload! */
#define CONF_NETRC (1<<22) /* read user+password from .netrc */ #define CONF_NETRC (1<<22) /* read user+password from .netrc */
#define CONF_FOLLOWLOCATION (1<<23) /* use Location: Luke! */ #define CONF_FOLLOWLOCATION (1<<23) /* use Location: Luke! */
@ -2242,7 +2242,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
nextarg); nextarg);
break; break;
case 'l': case 'l':
config->conf ^= CONF_FTPLISTONLY; /* only list the names of the FTP dir */ config->conf ^= CONF_DIRLISTONLY; /* only list the names of the FTP dir */
break; break;
case 'L': case 'L':
config->conf ^= CONF_FOLLOWLOCATION; /* Follow Location: HTTP headers */ config->conf ^= CONF_FOLLOWLOCATION; /* Follow Location: HTTP headers */
@ -4132,9 +4132,9 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
my_setopt(curl, CURLOPT_FAILONERROR, my_setopt(curl, CURLOPT_FAILONERROR,
config->conf&CONF_FAILONERROR); config->conf&CONF_FAILONERROR);
my_setopt(curl, CURLOPT_UPLOAD, uploadfile?TRUE:FALSE); my_setopt(curl, CURLOPT_UPLOAD, uploadfile?TRUE:FALSE);
my_setopt(curl, CURLOPT_FTPLISTONLY, my_setopt(curl, CURLOPT_DIRLISTONLY,
config->conf&CONF_FTPLISTONLY); config->conf&CONF_DIRLISTONLY);
my_setopt(curl, CURLOPT_FTPAPPEND, config->conf&CONF_FTPAPPEND); my_setopt(curl, CURLOPT_APPEND, config->conf&CONF_FTPAPPEND);
if (config->conf&CONF_NETRC_OPT) if (config->conf&CONF_NETRC_OPT)
my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL); my_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
@ -4185,7 +4185,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
my_setopt(curl, CURLOPT_SSLCERTTYPE, config->cert_type); my_setopt(curl, CURLOPT_SSLCERTTYPE, config->cert_type);
my_setopt(curl, CURLOPT_SSLKEY, config->key); my_setopt(curl, CURLOPT_SSLKEY, config->key);
my_setopt(curl, CURLOPT_SSLKEYTYPE, config->key_type); my_setopt(curl, CURLOPT_SSLKEYTYPE, config->key_type);
my_setopt(curl, CURLOPT_SSLKEYPASSWD, config->key_passwd); my_setopt(curl, CURLOPT_KEYPASSWD, config->key_passwd);
/* SSH private key uses the same command-line option as SSL private key */ /* SSH private key uses the same command-line option as SSL private key */
my_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key); my_setopt(curl, CURLOPT_SSH_PRIVATE_KEYFILE, config->key);
@ -4323,15 +4323,15 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
/* new in curl 7.15.5 */ /* new in curl 7.15.5 */
if(config->ftp_ssl_reqd) if(config->ftp_ssl_reqd)
my_setopt(curl, CURLOPT_FTP_SSL, CURLFTPSSL_ALL); my_setopt(curl, CURLOPT_USE_SSL, CURLFTPSSL_ALL);
/* new in curl 7.11.0 */ /* new in curl 7.11.0 */
else if(config->ftp_ssl) else if(config->ftp_ssl)
my_setopt(curl, CURLOPT_FTP_SSL, CURLFTPSSL_TRY); my_setopt(curl, CURLOPT_USE_SSL, CURLFTPSSL_TRY);
/* new in curl 7.16.0 */ /* new in curl 7.16.0 */
else if(config->ftp_ssl_control) else if(config->ftp_ssl_control)
my_setopt(curl, CURLOPT_FTP_SSL, CURLFTPSSL_CONTROL); my_setopt(curl, CURLOPT_USE_SSL, CURLFTPSSL_CONTROL);
/* new in curl 7.16.1 */ /* new in curl 7.16.1 */
if(config->ftp_ssl_ccc) if(config->ftp_ssl_ccc)

View File

@ -61,7 +61,7 @@ Host: 127.0.0.1:%HTTPPORT
Accept: */* Accept: */*
</protocol> </protocol>
# 33 is CURLE_HTTP_RANGE_ERROR # 33 is CURLE_RANGE_ERROR
<errorcode> <errorcode>
33 33
</errorcode> </errorcode>

View File

@ -24,7 +24,7 @@ ftp://%HOSTIP:%FTPPORT/path/to/file/190 -m %FTPTIME2
# Verify data after the test has been "shot" # Verify data after the test has been "shot"
<verify> <verify>
# 28 is CURLE_OPERATION_TIMEOUTED # 28 is CURLE_OPERATION_TIMEDOUT
<errorcode> <errorcode>
28 28
</errorcode> </errorcode>

View File

@ -50,7 +50,7 @@ http://%HOSTIP:%HTTPPORT/99 -C 9999999999
# #
# Verify data after the test has been "shot" # Verify data after the test has been "shot"
<verify> <verify>
# 33 is CURLE_HTTP_RANGE_ERROR # 33 is CURLE_RANGE_ERROR
<errorcode> <errorcode>
33 33
</errorcode> </errorcode>