summaryrefslogtreecommitdiff
path: root/www/p5-WWW-Curl/patches/patch-aa
blob: f75c5ad17645c6fb6f015b78b8d481f5b863a916 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
$NetBSD: patch-aa,v 1.1 2006/12/20 13:28:59 obache Exp $

Support removed PASSWD callback (dropped in curl 7.10.8).
http://cool.haxx.se/cvs.cgi/curl-perl/Curl.xs.diff?r1=1.3&r2=1.4

--- Curl.xs.orig	2003-04-22 12:18:45.000000000 +0000
+++ Curl.xs
@@ -101,10 +101,13 @@ static perl_curl_easy_callback_code call
 	    return CALLBACK_PROGRESS;
 	    break;
 
+/* PASSWD callback dropped in 7.10.8 */
+#if (LIBCURL_VERSION_NUM<0x070A08)
 	case CURLOPT_PASSWDFUNCTION:
 	case CURLOPT_PASSWDDATA:
 	    return CALLBACK_PASSWD;
 	    break;
+#endif
     }
     croak("Bad callback index requested\n");
     return CALLBACK_LAST;
@@ -194,11 +197,13 @@ static perl_curl_form * perl_curl_form_n
 
 static void perl_curl_form_delete(perl_curl_form *self)
 {
+#if 0
 #if LIBCURL_VERSION_NUM >= 0x070900
     if (self->post) {
 	curl_formfree(self->post);
     }
 #endif
+#endif
     Safefree(self);
 }
 
@@ -536,15 +541,18 @@ curl_easy_init(...)
 	curl_easy_setopt(self->curl, CURLOPT_READFUNCTION, read_callback_func);
 	curl_easy_setopt(self->curl, CURLOPT_HEADERFUNCTION, header_callback_func);
 	curl_easy_setopt(self->curl, CURLOPT_PROGRESSFUNCTION, progress_callback_func);
+#if (LIBCURL_VERSION_NUM<0x070A08)
 	curl_easy_setopt(self->curl, CURLOPT_PASSWDFUNCTION, passwd_callback_func);
+#endif
 
 	/* set our own object as the context for all curl callbacks */
 	curl_easy_setopt(self->curl, CURLOPT_FILE, self); 
 	curl_easy_setopt(self->curl, CURLOPT_INFILE, self); 
 	curl_easy_setopt(self->curl, CURLOPT_WRITEHEADER, self); 
 	curl_easy_setopt(self->curl, CURLOPT_PROGRESSDATA, self); 
+#if (LIBCURL_VERSION_NUM<0x070A08)
 	curl_easy_setopt(self->curl, CURLOPT_PASSWDDATA, self); 
-
+#endif
 	/* we always collect this, in case it's wanted */
 	curl_easy_setopt(self->curl, CURLOPT_ERRORBUFFER, self->errbuf);
 
@@ -580,8 +588,9 @@ curl_easy_duphandle(self)
 	curl_easy_setopt(clone->curl, CURLOPT_INFILE, clone); 
 	curl_easy_setopt(clone->curl, CURLOPT_WRITEHEADER, clone); 
 	curl_easy_setopt(clone->curl, CURLOPT_PROGRESSDATA, clone); 
+#if (LIBCURL_VERSION_NUM<0x070A08)
 	curl_easy_setopt(clone->curl, CURLOPT_PASSWDDATA, clone); 
-
+#endif
 	/* we always collect this, in case it's wanted */
 	curl_easy_setopt(clone->curl, CURLOPT_ERRORBUFFER, clone->errbuf);
 
@@ -617,7 +626,9 @@ curl_easy_setopt(self, option, value)
 	case CURLOPT_INFILE:
 	case CURLOPT_WRITEHEADER:
 	case CURLOPT_PROGRESSDATA:
+#if (LIBCURL_VERSION_NUM<0x070A08)
 	case CURLOPT_PASSWDDATA:
+#endif
 	    perl_curl_easy_register_callback(self,&(self->callback_ctx[callback_index(option)]),value);
 	    break;
 
@@ -626,7 +637,9 @@ curl_easy_setopt(self, option, value)
 	case CURLOPT_READFUNCTION:
         case CURLOPT_HEADERFUNCTION:
 	case CURLOPT_PROGRESSFUNCTION:
+#if (LIBCURL_VERSION_NUM<0x070A08)
 	case CURLOPT_PASSWDFUNCTION:
+#endif
 	    perl_curl_easy_register_callback(self,&(self->callback[callback_index(option)]),value);
 	    break;