Skip to content
Permalink
Browse files

Renamed several libcurl error codes and options to make them more gen…

…eral

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)
  • Loading branch information...
dfandrich committed Aug 30, 2007
1 parent 4b60c3e commit 9f44a95522162c0f4a61093efe1bf1f58b087358
49 CHANGES
@@ -6,6 +6,55 @@

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)
- 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
@@ -18,6 +18,8 @@ This release includes the following changes:
o HTTP 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 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:

@@ -275,9 +275,6 @@ TODO
and FTP-SSL tests without the stunnel dependency, and it could allow us to
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
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
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

* curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a
@@ -122,10 +122,10 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath,

fseek(f, uploaded_len, SEEK_SET);

curl_easy_setopt(curlhandle, CURLOPT_FTPAPPEND, 1);
curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1);
}
else { /* no */
curl_easy_setopt(curlhandle, CURLOPT_FTPAPPEND, 0);
curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0);
}

r = curl_easy_perform(curlhandle);
@@ -95,7 +95,7 @@ int main(int argc, char **argv)
/* sorry, for engine we must set the passphrase
(if the key has one...) */
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,
we must set the key type to "ENG" */
@@ -21,7 +21,7 @@
.\" * $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
curl_easy_setopt \- set options for a curl easy handle
.SH SYNOPSIS
@@ -764,7 +764,7 @@ multiple cookies in one string like this: "name1=content1; name2=content2;"
etc.

Using this option multiple times will only make the latest string override the
previously ones.
previous ones.
.IP CURLOPT_COOKIEFILE
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
@@ -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
option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP non-zero,
this option didn't work.
.IP CURLOPT_FTPLISTONLY
A non-zero parameter tells the library to just list the names of an ftp
.IP CURLOPT_DIRLISTONLY
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
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
only files in their response to NLST; they might not include subdirectories
and symbolic links.
.IP CURLOPT_FTPAPPEND
This causes an FTP NLST command to be sent on an FTP server. Beware
that some FTP servers list only files in their response to NLST; they
might not include subdirectories and symbolic links.

(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
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
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
@@ -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)

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
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
.IP CURLFTPSSL_NONE
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
the format of your certificate. Supported formats are "PEM" and "DER". (Added
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
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
@@ -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
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.
.IP CURLOPT_SSLKEYPASSWD
.IP CURLOPT_KEYPASSWD
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
\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
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
@@ -1406,7 +1410,7 @@ libcurl defaults to using \fB~/.ssh/id_dsa.pub\fP.
.IP CURLOPT_SSH_PRIVATE_KEYFILE
Pass a char * pointing to a file name for your private key. If not used,
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)
.SH OTHER OPTIONS
.IP CURLOPT_PRIVATE

0 comments on commit 9f44a95

Please sign in to comment.
You can’t perform that action at this time.