Commit 9f44a955 authored by Dan Fandrich's avatar Dan Fandrich
Browse files

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)
parent 4b60c3e9
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
@@ -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
+2 −0
Original line number Diff line number Diff line
@@ -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:

+16 −3
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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" */
Loading