cURL / Mailing Lists / curl-users / Single Mail

curl-users

perl - Curl-easy-1.1.5 patch...

From: Cris Bailiff <c.bailiff_at_awayweb.com>
Date: Fri, 20 Apr 2001 20:53:02 +1000

Daniel, Georg,

        I've added all the CURLOPT_ and CURLINFO_ constants in 7.7.2 beta to the perl
interface.

The diff and tarball for 1.1.5 are attached.

I'm sorry to race through the version numbers - its just because each set of
changes I do needs to be distinct as its 'public' once its gone to the
list/Georg, and I'm not sure if Georg or the curl CVS is really the master...

Cris

diff -r -c Curl-easy-1.1.4/Changes Curl-easy-1.1.5/Changes
*** Curl-easy-1.1.4/Changes Fri Apr 20 12:21:39 2001
--- Curl-easy-1.1.5/Changes Fri Apr 20 21:49:35 2001
***************
*** 1,6 ****
--- 1,9 ----
  Revision history for Perl extension Curl::easy.
  Check out the file README for more info.
  
+ 1.1.5 Fri Apr 20 2001: - Cris Bailiff <c.bailiff_at_devsecure.com>
+ - Add latest CURLOPT_ and CURLINFO_ constants to the constants list
+
  1.1.4 Fri Apr 20 2001: - Cris Bailiff <c.bailiff_at_devsecure.com>
      - Fix case where curl_slists such as 'HTTPHEADERS' need to
        be re-set over persistant requests
diff -r -c Curl-easy-1.1.4/easy.pm Curl-easy-1.1.5/easy.pm
*** Curl-easy-1.1.4/easy.pm Fri Apr 20 12:19:16 2001
--- Curl-easy-1.1.5/easy.pm Fri Apr 20 21:41:05 2001
***************
*** 78,83 ****
--- 78,94 ----
  CURLOPT_VERBOSE
  CURLOPT_WRITEFUNCTION
  CURLOPT_WRITEHEADER
+ CURLOPT_MAXREDIRS
+ CURLOPT_FILETIME
+ CURLOPT_TELNETOPTIONS
+ CURLOPT_MAXCONNECTS
+ CURLOPT_CLOSEPOLICY
+ CURLOPT_CLOSEFUNCTION
+ CURLOPT_FRESH_CONNECT
+ CURLOPT_FORBID_REUSE
+ CURLOPT_RANDOM_FILE
+ CURLOPT_EGD_SOCKET
+ CURLOPT_CONNECTTIMEOUT
  
  CURLINFO_EFFECTIVE_URL
  CURLINFO_HTTP_CODE
***************
*** 91,101 ****
  CURLINFO_SPEED_UPLOAD
  CURLINFO_HEADER_SIZE
  CURLINFO_REQUEST_SIZE
  
  USE_INTERNAL_VARS
  );
  
! $VERSION = '1.1.4';
  
  $Curl::easy::headers = "";
  $Curl::easy::content = "";
--- 102,116 ----
  CURLINFO_SPEED_UPLOAD
  CURLINFO_HEADER_SIZE
  CURLINFO_REQUEST_SIZE
+ CURLINFO_SSL_VERIFYRESULT
+ CURLINFO_FILETIME
+ CURLINFO_CONTENT_LENGTH_DOWNLOAD
+ CURLINFO_CONTENT_LENGTH_UPLOAD
  
  USE_INTERNAL_VARS
  );
  
! $VERSION = '1.1.5';
  
  $Curl::easy::headers = "";
  $Curl::easy::content = "";
diff -r -c Curl-easy-1.1.4/easy.xs Curl-easy-1.1.5/easy.xs
*** Curl-easy-1.1.4/easy.xs Fri Apr 20 12:20:22 2001
--- Curl-easy-1.1.5/easy.xs Fri Apr 20 21:45:05 2001
***************
*** 8,14 ****
  #include <curl/easy.h>
  
  #if (LIBCURL_VERSION_NUM<0x070702)
! #define CURLOPT_HEADERFUNCTION 79
  #define header_callback_func write_callback_func
  #else
  #define header_callback_func writeheader_callback_func
--- 8,14 ----
  #include <curl/easy.h>
  
  #if (LIBCURL_VERSION_NUM<0x070702)
! #define CURLOPT_HEADERFUNCTION 20079
  #define header_callback_func write_callback_func
  #else
  #define header_callback_func writeheader_callback_func
***************
*** 368,380 ****
          case 'A':
          case 'B':
          case 'C':
- case 'D':
              if (strEQ(name, "CONNECT_TIME")) return CURLINFO_CONNECT_TIME;
              break;
          case 'E':
- case 'F':
              if (strEQ(name, "EFFECTIVE_URL")) return CURLINFO_EFFECTIVE_URL;
              break;
          case 'G':
          case 'H':
              if (strEQ(name, "HEADER_SIZE")) return CURLINFO_HEADER_SIZE;
--- 368,384 ----
          case 'A':
          case 'B':
          case 'C':
              if (strEQ(name, "CONNECT_TIME")) return CURLINFO_CONNECT_TIME;
+ if (strEQ(name, "CONTENT_LENGTH_DOWNLOAD")) return CURLINFO_CONTENT_LENGTH_DOWNLOAD;
+ if (strEQ(name, "CONTENT_LENGTH_UPLOAD")) return CURLINFO_CONTENT_LENGTH_UPLOAD;
              break;
+ case 'D':
          case 'E':
              if (strEQ(name, "EFFECTIVE_URL")) return CURLINFO_EFFECTIVE_URL;
              break;
+ case 'F':
+ if (strEQ(name, "FILETIME")) return CURLINFO_FILETIME;
+ break;
          case 'G':
          case 'H':
              if (strEQ(name, "HEADER_SIZE")) return CURLINFO_HEADER_SIZE;
***************
*** 397,402 ****
--- 401,408 ----
              if (strEQ(name, "REQUEST_SIZE")) return CURLINFO_REQUEST_SIZE;
              break;
          case 'S':
+ if (strEQ(name, "SSL_VERIFYRESULT")) return CURLINFO_SSL_VERIFYRESULT;
+ break;
          case 'T':
              if (strEQ(name, "SIZE_DOWNLOAD")) return CURLINFO_SIZE_DOWNLOAD;
              if (strEQ(name, "SIZE_UPLOAD")) return CURLINFO_SIZE_UPLOAD;
***************
*** 421,447 ****
              if (strEQ(name, "AUTOREFERER")) return CURLOPT_AUTOREFERER;
              break;
          case 'C':
! case 'D':
              if (strEQ(name, "COOKIE")) return CURLOPT_COOKIE;
              if (strEQ(name, "COOKIEFILE")) return CURLOPT_COOKIEFILE;
              if (strEQ(name, "CRLF")) return CURLOPT_CRLF;
              if (strEQ(name, "CUSTOMREQUEST")) return CURLOPT_CUSTOMREQUEST;
              break;
          case 'E':
! case 'F':
              if (strEQ(name, "ERRORBUFFER")) return CURLOPT_ERRORBUFFER;
              if (strEQ(name, "FAILONERROR")) return CURLOPT_FAILONERROR;
              if (strEQ(name, "FILE")) return CURLOPT_FILE;
              if (strEQ(name, "FOLLOWLOCATION")) return CURLOPT_FOLLOWLOCATION;
              if (strEQ(name, "FTPAPPEND")) return CURLOPT_FTPAPPEND;
              if (strEQ(name, "FTPASCII")) return CURLOPT_FTPASCII;
              if (strEQ(name, "FTPLISTONLY")) return CURLOPT_FTPLISTONLY;
              if (strEQ(name, "FTPPORT")) return CURLOPT_FTPPORT;
              break;
          case 'G':
          case 'H':
              if (strEQ(name, "HEADER")) return CURLOPT_HEADER;
! if (strEQ(name, "HEADERFUNCTION")) return CURLOPT_HEADERFUNCTION;
              if (strEQ(name, "HTTPHEADER")) return CURLOPT_HTTPHEADER;
              if (strEQ(name, "HTTPPOST")) return CURLOPT_HTTPPOST;
              if (strEQ(name, "HTTPPROXYTUNNEL")) return CURLOPT_HTTPPROXYTUNNEL;
--- 427,461 ----
              if (strEQ(name, "AUTOREFERER")) return CURLOPT_AUTOREFERER;
              break;
          case 'C':
! if (strEQ(name, "CONNECTTIMEOUT")) return CURLOPT_CONNECTTIMEOUT;
              if (strEQ(name, "COOKIE")) return CURLOPT_COOKIE;
              if (strEQ(name, "COOKIEFILE")) return CURLOPT_COOKIEFILE;
+ if (strEQ(name, "CLOSEFUNCTION")) return CURLOPT_CLOSEFUNCTION;
+ if (strEQ(name, "CLOSEPOLICY")) return CURLOPT_CLOSEPOLICY;
              if (strEQ(name, "CRLF")) return CURLOPT_CRLF;
              if (strEQ(name, "CUSTOMREQUEST")) return CURLOPT_CUSTOMREQUEST;
              break;
+ case 'D':
          case 'E':
! if (strEQ(name, "EGDSOCKET")) return CURLOPT_EGDSOCKET;
              if (strEQ(name, "ERRORBUFFER")) return CURLOPT_ERRORBUFFER;
+ break;
+ case 'F':
              if (strEQ(name, "FAILONERROR")) return CURLOPT_FAILONERROR;
              if (strEQ(name, "FILE")) return CURLOPT_FILE;
+ if (strEQ(name, "FILETIME")) return CURLOPT_FILETIME;
              if (strEQ(name, "FOLLOWLOCATION")) return CURLOPT_FOLLOWLOCATION;
+ if (strEQ(name, "FORBID_REUSE")) return CURLOPT_FORBID_REUSE;
              if (strEQ(name, "FTPAPPEND")) return CURLOPT_FTPAPPEND;
              if (strEQ(name, "FTPASCII")) return CURLOPT_FTPASCII;
              if (strEQ(name, "FTPLISTONLY")) return CURLOPT_FTPLISTONLY;
              if (strEQ(name, "FTPPORT")) return CURLOPT_FTPPORT;
+ if (strEQ(name, "FRESH_CONNECT")) return CURLOPT_FRESH_CONNECT;
              break;
          case 'G':
          case 'H':
              if (strEQ(name, "HEADER")) return CURLOPT_HEADER;
! if (strEQ(name, "HEADERFUNCTION")) return CURLOPT_HEADERFUNCTION;
              if (strEQ(name, "HTTPHEADER")) return CURLOPT_HTTPHEADER;
              if (strEQ(name, "HTTPPOST")) return CURLOPT_HTTPPOST;
              if (strEQ(name, "HTTPPROXYTUNNEL")) return CURLOPT_HTTPPROXYTUNNEL;
***************
*** 460,465 ****
--- 474,482 ----
              if (strEQ(name, "LOW_SPEED_TIME")) return CURLOPT_LOW_SPEED_TIME;
              break;
          case 'M':
+ if (strEQ(name, "MAXCONNECTS")) return CURLOPT_MAXCONNECTS;
+ if (strEQ(name, "MAXREDIRS")) return CURLOPT_MAXREDIRS;
+ break;
          case 'N':
              if (strEQ(name, "MUTE")) return CURLOPT_MUTE;
              if (strEQ(name, "NETRC")) return CURLOPT_NETRC;
***************
*** 484,502 ****
              if (strEQ(name, "PUT")) return CURLOPT_PUT;
              break;
          case 'Q':
- case 'R':
              if (strEQ(name, "QUOTE")) return CURLOPT_QUOTE;
              if (strEQ(name, "RANGE")) return CURLOPT_RANGE;
              if (strEQ(name, "READFUNCTION")) return CURLOPT_READFUNCTION;
              if (strEQ(name, "REFERER")) return CURLOPT_REFERER;
              if (strEQ(name, "RESUME_FROM")) return CURLOPT_RESUME_FROM;
              break;
          case 'S':
- case 'T':
              if (strEQ(name, "SSLCERT")) return CURLOPT_SSLCERT;
              if (strEQ(name, "SSLCERTPASSWD")) return CURLOPT_SSLCERTPASSWD;
              if (strEQ(name, "SSLVERSION")) return CURLOPT_SSLVERSION;
              if (strEQ(name, "STDERR")) return CURLOPT_STDERR;
              if (strEQ(name, "TIMECONDITION")) return CURLOPT_TIMECONDITION;
              if (strEQ(name, "TIMEOUT")) return CURLOPT_TIMEOUT;
              if (strEQ(name, "TIMEVALUE")) return CURLOPT_TIMEVALUE;
--- 501,523 ----
              if (strEQ(name, "PUT")) return CURLOPT_PUT;
              break;
          case 'Q':
              if (strEQ(name, "QUOTE")) return CURLOPT_QUOTE;
+ break;
+ case 'R':
+ if (strEQ(name, "RANDOM_FILE")) return CURLOPT_RANDOM_FILE;
              if (strEQ(name, "RANGE")) return CURLOPT_RANGE;
              if (strEQ(name, "READFUNCTION")) return CURLOPT_READFUNCTION;
              if (strEQ(name, "REFERER")) return CURLOPT_REFERER;
              if (strEQ(name, "RESUME_FROM")) return CURLOPT_RESUME_FROM;
              break;
          case 'S':
              if (strEQ(name, "SSLCERT")) return CURLOPT_SSLCERT;
              if (strEQ(name, "SSLCERTPASSWD")) return CURLOPT_SSLCERTPASSWD;
              if (strEQ(name, "SSLVERSION")) return CURLOPT_SSLVERSION;
              if (strEQ(name, "STDERR")) return CURLOPT_STDERR;
+ break;
+ case 'T':
+ if (strEQ(name, "TELNETOPTIONS")) return CURLOPT_TELNETOPTIONS;
              if (strEQ(name, "TIMECONDITION")) return CURLOPT_TIMECONDITION;
              if (strEQ(name, "TIMEOUT")) return CURLOPT_TIMEOUT;
              if (strEQ(name, "TIMEVALUE")) return CURLOPT_TIMEVALUE;

Received on 2001-04-20