curb 0.7.15 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +5 -1
- data/Rakefile +7 -3
- data/ext/curb.c +600 -0
- data/ext/curb.h +5 -5
- data/ext/curb_easy.c +319 -393
- data/ext/curb_easy.h +1 -0
- data/ext/curb_errors.c +10 -0
- data/ext/curb_macros.h +4 -0
- data/ext/curb_multi.c +69 -13
- data/ext/extconf.rb +223 -3
- data/lib/curb.rb +2 -307
- data/lib/curl/easy.rb +385 -0
- data/lib/curl/multi.rb +244 -0
- data/tests/bug_crash_on_debug.rb +39 -0
- data/tests/bug_crash_on_progress.rb +33 -0
- data/tests/helper.rb +8 -0
- data/tests/tc_curl_download.rb +4 -4
- data/tests/tc_curl_easy.rb +110 -10
- data/tests/tc_curl_easy_setopt.rb +31 -0
- metadata +33 -41
data/ext/curb_easy.h
CHANGED
data/ext/curb_errors.c
CHANGED
|
@@ -28,6 +28,7 @@ VALUE eCurlErrUnsupportedProtocol;
|
|
|
28
28
|
VALUE eCurlErrFailedInit;
|
|
29
29
|
VALUE eCurlErrMalformedURL;
|
|
30
30
|
VALUE eCurlErrMalformedURLUser;
|
|
31
|
+
VALUE eCurlErrNotBuiltIn;
|
|
31
32
|
VALUE eCurlErrProxyResolution;
|
|
32
33
|
VALUE eCurlErrHostResolution;
|
|
33
34
|
VALUE eCurlErrConnectFailed;
|
|
@@ -141,9 +142,15 @@ VALUE rb_curl_easy_error(CURLcode code) {
|
|
|
141
142
|
case CURLE_URL_MALFORMAT: /* 3 */
|
|
142
143
|
exclz = eCurlErrMalformedURL;
|
|
143
144
|
break;
|
|
145
|
+
#ifdef HAVE_CURLE_NOT_BUILT_IN
|
|
146
|
+
case CURLE_NOT_BUILT_IN: /* 4 - [was obsoleted in August 2007 for 7.17.0, reused in April 2011 for 7.21.5] */
|
|
147
|
+
exclz = eCurlErrNotBuiltIn;
|
|
148
|
+
break;
|
|
149
|
+
#else
|
|
144
150
|
case CURLE_URL_MALFORMAT_USER: /* 4 (NOT USED) */
|
|
145
151
|
exclz = eCurlErrMalformedURLUser;
|
|
146
152
|
break;
|
|
153
|
+
#endif
|
|
147
154
|
case CURLE_COULDNT_RESOLVE_PROXY: /* 5 */
|
|
148
155
|
exclz = eCurlErrProxyResolution;
|
|
149
156
|
break;
|
|
@@ -279,9 +286,11 @@ VALUE rb_curl_easy_error(CURLcode code) {
|
|
|
279
286
|
case CURLE_TELNET_OPTION_SYNTAX: /* 49 - Malformed telnet option */
|
|
280
287
|
exclz = eCurlErrTelnetBadOptionSyntax;
|
|
281
288
|
break;
|
|
289
|
+
#ifdef HAVE_CURLE_OBSOLETE
|
|
282
290
|
case CURLE_OBSOLETE: /* 50 - NOT USED */
|
|
283
291
|
exclz = eCurlErrObsolete;
|
|
284
292
|
break;
|
|
293
|
+
#endif
|
|
285
294
|
case CURLE_SSL_PEER_CERTIFICATE: /* 51 - peer's certificate wasn't ok */
|
|
286
295
|
exclz = eCurlErrSSLPeerCertificate;
|
|
287
296
|
break;
|
|
@@ -518,6 +527,7 @@ void init_curb_errors() {
|
|
|
518
527
|
eCurlErrUnsupportedProtocol = rb_define_class_under(mCurlErr, "UnsupportedProtocolError", eCurlErrError);
|
|
519
528
|
eCurlErrFailedInit = rb_define_class_under(mCurlErr, "FailedInitError", eCurlErrError);
|
|
520
529
|
eCurlErrMalformedURL = rb_define_class_under(mCurlErr, "MalformedURLError", eCurlErrError);
|
|
530
|
+
eCurlErrNotBuiltIn = rb_define_class_under(mCurlErr, "NotBuiltInError", eCurlErrError);
|
|
521
531
|
eCurlErrMalformedURLUser = rb_define_class_under(mCurlErr, "MalformedURLUserError", eCurlErrError);
|
|
522
532
|
eCurlErrProxyResolution = rb_define_class_under(mCurlErr, "ProxyResolutionError", eCurlErrError);
|
|
523
533
|
eCurlErrHostResolution = rb_define_class_under(mCurlErr, "HostResolutionError", eCurlErrError);
|
data/ext/curb_macros.h
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#ifndef __CURB_MACROS_H
|
|
9
9
|
#define __CURB_MACROS_H
|
|
10
10
|
|
|
11
|
+
#define rb_easy_sym(sym) ID2SYM(rb_intern(sym))
|
|
11
12
|
#define rb_easy_hkey(key) ID2SYM(rb_intern(key))
|
|
12
13
|
#define rb_easy_set(key,val) rb_hash_aset(rbce->opts, rb_easy_hkey(key) , val)
|
|
13
14
|
#define rb_easy_get(key) rb_hash_aref(rbce->opts, rb_easy_hkey(key))
|
|
@@ -152,4 +153,7 @@
|
|
|
152
153
|
return INT2FIX(ptr->attr); \
|
|
153
154
|
}
|
|
154
155
|
|
|
156
|
+
#define CURB_DEFINE(name) \
|
|
157
|
+
rb_define_const(mCurl, #name, INT2FIX(name))
|
|
158
|
+
|
|
155
159
|
#endif
|
data/ext/curb_multi.c
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the Ruby License. See LICENSE for details.
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
#include "curb_config.h"
|
|
8
7
|
#ifdef HAVE_RUBY19_ST_H
|
|
9
8
|
#include <ruby.h>
|
|
@@ -39,13 +38,12 @@ static void rb_curl_multi_remove(ruby_curl_multi *rbcm, VALUE easy);
|
|
|
39
38
|
static void rb_curl_multi_read_info(VALUE self, CURLM *mptr);
|
|
40
39
|
static void rb_curl_multi_run(VALUE self, CURLM *multi_handle, int *still_running);
|
|
41
40
|
|
|
42
|
-
static
|
|
43
|
-
|
|
44
|
-
}
|
|
41
|
+
static VALUE callback_exception(VALUE unused) {
|
|
42
|
+
return Qfalse;
|
|
43
|
+
}
|
|
45
44
|
|
|
46
45
|
static void curl_multi_mark(ruby_curl_multi *rbcm) {
|
|
47
46
|
rb_gc_mark(rbcm->requests);
|
|
48
|
-
rb_hash_foreach( rbcm->requests, (int (*)())rb_curl_multi_mark_all_easy, (VALUE)rbcm );
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
static void curl_multi_flush_easy(VALUE key, VALUE easy, ruby_curl_multi *rbcm) {
|
|
@@ -245,8 +243,6 @@ VALUE ruby_curl_multi_add(VALUE self, VALUE easy) {
|
|
|
245
243
|
|
|
246
244
|
rb_hash_aset( rbcm->requests, easy, easy );
|
|
247
245
|
|
|
248
|
-
rb_curl_multi_run( self, rbcm->handle, &(rbcm->running) );
|
|
249
|
-
|
|
250
246
|
return self;
|
|
251
247
|
}
|
|
252
248
|
|
|
@@ -323,11 +319,20 @@ static VALUE ruby_curl_multi_cancel(VALUE self) {
|
|
|
323
319
|
return self;
|
|
324
320
|
}
|
|
325
321
|
|
|
322
|
+
// on_success, on_failure, on_complete
|
|
323
|
+
static VALUE call_status_handler1(VALUE ary) {
|
|
324
|
+
return rb_funcall(rb_ary_entry(ary, 0), idCall, 1, rb_ary_entry(ary, 1));
|
|
325
|
+
}
|
|
326
|
+
static VALUE call_status_handler2(VALUE ary) {
|
|
327
|
+
return rb_funcall(rb_ary_entry(ary, 0), idCall, 2, rb_ary_entry(ary, 1), rb_ary_entry(ary, 2));
|
|
328
|
+
}
|
|
329
|
+
|
|
326
330
|
static void rb_curl_mutli_handle_complete(VALUE self, CURL *easy_handle, int result) {
|
|
327
331
|
|
|
328
332
|
long response_code = -1;
|
|
329
333
|
VALUE easy;
|
|
330
334
|
ruby_curl_easy *rbce = NULL;
|
|
335
|
+
VALUE callargs, val = Qtrue;
|
|
331
336
|
|
|
332
337
|
CURLcode ecode = curl_easy_getinfo(easy_handle, CURLINFO_PRIVATE, (char**)&easy);
|
|
333
338
|
|
|
@@ -348,24 +353,48 @@ static void rb_curl_mutli_handle_complete(VALUE self, CURL *easy_handle, int res
|
|
|
348
353
|
}
|
|
349
354
|
|
|
350
355
|
if (!rb_easy_nil("complete_proc")) {
|
|
351
|
-
|
|
356
|
+
callargs = rb_ary_new3(2, rb_easy_get("complete_proc"), easy);
|
|
357
|
+
val = rb_rescue(call_status_handler1, callargs, callback_exception, Qnil);
|
|
358
|
+
//rb_funcall( rb_easy_get("complete_proc"), idCall, 1, easy );
|
|
352
359
|
}
|
|
353
360
|
|
|
354
361
|
curl_easy_getinfo(rbce->curl, CURLINFO_RESPONSE_CODE, &response_code);
|
|
355
362
|
|
|
356
363
|
if (result != 0) {
|
|
357
364
|
if (!rb_easy_nil("failure_proc")) {
|
|
358
|
-
|
|
365
|
+
callargs = rb_ary_new3(3, rb_easy_get("failure_proc"), easy, rb_curl_easy_error(result));
|
|
366
|
+
val = rb_rescue(call_status_handler2, callargs, callback_exception, Qnil);
|
|
367
|
+
//rb_funcall( rb_easy_get("failure_proc"), idCall, 2, easy, rb_curl_easy_error(result) );
|
|
359
368
|
}
|
|
360
369
|
}
|
|
361
370
|
else if (!rb_easy_nil("success_proc") &&
|
|
362
371
|
((response_code >= 200 && response_code < 300) || response_code == 0)) {
|
|
363
372
|
/* NOTE: we allow response_code == 0, in the case of non http requests e.g. reading from disk */
|
|
364
|
-
|
|
373
|
+
callargs = rb_ary_new3(2, rb_easy_get("success_proc"), easy);
|
|
374
|
+
val = rb_rescue(call_status_handler1, callargs, callback_exception, Qnil);
|
|
375
|
+
//rb_funcall( rb_easy_get("success_proc"), idCall, 1, easy );
|
|
376
|
+
}
|
|
377
|
+
else if (!rb_easy_nil("redirect_proc") &&
|
|
378
|
+
(response_code >= 300 && response_code < 400)) {
|
|
379
|
+
callargs = rb_ary_new3(3, rb_easy_get("redirect_proc"), easy, rb_curl_easy_error(result));
|
|
380
|
+
val = rb_rescue(call_status_handler2, callargs, callback_exception, Qnil);
|
|
381
|
+
}
|
|
382
|
+
else if (!rb_easy_nil("missing_proc") &&
|
|
383
|
+
(response_code >= 400 && response_code < 500)) {
|
|
384
|
+
callargs = rb_ary_new3(3, rb_easy_get("missing_proc"), easy, rb_curl_easy_error(result));
|
|
385
|
+
val = rb_rescue(call_status_handler2, callargs, callback_exception, Qnil);
|
|
365
386
|
}
|
|
366
387
|
else if (!rb_easy_nil("failure_proc") &&
|
|
367
|
-
(response_code >=
|
|
368
|
-
|
|
388
|
+
(response_code >= 500 && response_code <= 999)) {
|
|
389
|
+
callargs = rb_ary_new3(3, rb_easy_get("failure_proc"), easy, rb_curl_easy_error(result));
|
|
390
|
+
val = rb_rescue(call_status_handler2, callargs, callback_exception, Qnil);
|
|
391
|
+
//rb_funcall( rb_easy_get("failure_proc"), idCall, 2, easy, rb_curl_easy_error(result) );
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
if (val == Qfalse) {
|
|
395
|
+
rb_warn("uncaught exception from callback");
|
|
396
|
+
// exception was raised?
|
|
397
|
+
//fprintf(stderr, "exception raised from callback\n");
|
|
369
398
|
}
|
|
370
399
|
|
|
371
400
|
}
|
|
@@ -430,6 +459,20 @@ void cleanup_crt_fd(fd_set *os_set, fd_set *crt_set)
|
|
|
430
459
|
}
|
|
431
460
|
#endif
|
|
432
461
|
|
|
462
|
+
#ifdef HAVE_RB_THREAD_BLOCKING_REGION
|
|
463
|
+
struct _select_set {
|
|
464
|
+
int maxfd;
|
|
465
|
+
fd_set *fdread, *fdwrite, *fdexcep;
|
|
466
|
+
struct timeval *tv;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
static VALUE curb_select(void *args) {
|
|
470
|
+
struct _select_set* set = args;
|
|
471
|
+
int rc = select(set->maxfd, set->fdread, set->fdwrite, set->fdexcep, set->tv);
|
|
472
|
+
return INT2FIX(rc);
|
|
473
|
+
}
|
|
474
|
+
#endif
|
|
475
|
+
|
|
433
476
|
/*
|
|
434
477
|
* call-seq:
|
|
435
478
|
* multi = Curl::Multi.new
|
|
@@ -453,10 +496,12 @@ VALUE ruby_curl_multi_perform(int argc, VALUE *argv, VALUE self) {
|
|
|
453
496
|
#ifdef _WIN32
|
|
454
497
|
fd_set crt_fdread, crt_fdwrite, crt_fdexcep;
|
|
455
498
|
#endif
|
|
456
|
-
|
|
457
499
|
long timeout_milliseconds;
|
|
458
500
|
struct timeval tv = {0, 0};
|
|
459
501
|
VALUE block = Qnil;
|
|
502
|
+
#ifdef HAVE_RB_THREAD_BLOCKING_REGION
|
|
503
|
+
struct _select_set fdset_args;
|
|
504
|
+
#endif
|
|
460
505
|
|
|
461
506
|
rb_scan_args(argc, argv, "0&", &block);
|
|
462
507
|
|
|
@@ -465,6 +510,8 @@ VALUE ruby_curl_multi_perform(int argc, VALUE *argv, VALUE self) {
|
|
|
465
510
|
timeout_milliseconds = cCurlMutiDefaulttimeout;
|
|
466
511
|
|
|
467
512
|
rb_curl_multi_run( self, rbcm->handle, &(rbcm->running) );
|
|
513
|
+
rb_curl_multi_read_info( self, rbcm->handle );
|
|
514
|
+
if (block != Qnil) { rb_funcall(block, rb_intern("call"), 1, self); }
|
|
468
515
|
|
|
469
516
|
do {
|
|
470
517
|
while (rbcm->running) {
|
|
@@ -511,7 +558,16 @@ VALUE ruby_curl_multi_perform(int argc, VALUE *argv, VALUE self) {
|
|
|
511
558
|
create_crt_fd(&fdexcep, &crt_fdexcep);
|
|
512
559
|
#endif
|
|
513
560
|
|
|
561
|
+
#ifdef HAVE_RB_THREAD_BLOCKING_REGION
|
|
562
|
+
fdset_args.maxfd = maxfd+1;
|
|
563
|
+
fdset_args.fdread = &fdread;
|
|
564
|
+
fdset_args.fdwrite = &fdwrite;
|
|
565
|
+
fdset_args.fdexcep = &fdexcep;
|
|
566
|
+
fdset_args.tv = &tv;
|
|
567
|
+
rc = rb_thread_blocking_region(curb_select, &fdset_args, RUBY_UBF_IO, 0);
|
|
568
|
+
#else
|
|
514
569
|
rc = rb_thread_select(maxfd+1, &fdread, &fdwrite, &fdexcep, &tv);
|
|
570
|
+
#endif
|
|
515
571
|
|
|
516
572
|
#ifdef _WIN32
|
|
517
573
|
cleanup_crt_fd(&fdread, &crt_fdread);
|
data/ext/extconf.rb
CHANGED
|
@@ -35,16 +35,17 @@ end
|
|
|
35
35
|
# puts "Selected arch: #{archs.first}"
|
|
36
36
|
#end
|
|
37
37
|
|
|
38
|
-
def define(s)
|
|
39
|
-
$defs.push( format("-D HAVE_%s", s.to_s.upcase) )
|
|
38
|
+
def define(s, v=1)
|
|
39
|
+
$defs.push( format("-D HAVE_%s=%d", s.to_s.upcase, v) )
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def have_constant(name)
|
|
43
|
+
sname = name.is_a?(Symbol) ? name.to_s : name.upcase
|
|
43
44
|
checking_for name do
|
|
44
45
|
src = %{
|
|
45
46
|
#include <curl/curl.h>
|
|
46
47
|
int main() {
|
|
47
|
-
int test = (int)#{
|
|
48
|
+
int test = (int)#{sname};
|
|
48
49
|
return 0;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -52,6 +53,7 @@ def have_constant(name)
|
|
|
52
53
|
define name
|
|
53
54
|
true
|
|
54
55
|
else
|
|
56
|
+
#define name, 0
|
|
55
57
|
false
|
|
56
58
|
end
|
|
57
59
|
end
|
|
@@ -99,6 +101,13 @@ have_constant "curle_login_denied"
|
|
|
99
101
|
# older than 7.16.3
|
|
100
102
|
have_constant "curlmopt_maxconnects"
|
|
101
103
|
|
|
104
|
+
have_constant "curlopt_seekfunction"
|
|
105
|
+
have_constant "curlopt_seekdata"
|
|
106
|
+
have_constant "curlopt_sockoptfunction"
|
|
107
|
+
have_constant "curlopt_sockoptdata"
|
|
108
|
+
have_constant "curlopt_opensocketfunction"
|
|
109
|
+
have_constant "curlopt_opensocketdata"
|
|
110
|
+
|
|
102
111
|
# additional consts
|
|
103
112
|
have_constant "curle_conv_failed"
|
|
104
113
|
have_constant "curle_conv_reqd"
|
|
@@ -130,6 +139,215 @@ have_func("curl_multi_timeout")
|
|
|
130
139
|
have_func("curl_multi_fdset")
|
|
131
140
|
have_func("curl_multi_perform")
|
|
132
141
|
|
|
142
|
+
# constants
|
|
143
|
+
have_constant "curlopt_interleavefunction"
|
|
144
|
+
have_constant "curlopt_interleavedata"
|
|
145
|
+
have_constant "curlopt_chunk_bgn_function"
|
|
146
|
+
have_constant "curlopt_chunk_end_function"
|
|
147
|
+
have_constant "curlopt_chunk_data"
|
|
148
|
+
have_constant "curlopt_fnmatch_function"
|
|
149
|
+
have_constant "curlopt_fnmatch_data"
|
|
150
|
+
have_constant "curlopt_errorbuffer"
|
|
151
|
+
have_constant "curlopt_stderr"
|
|
152
|
+
have_constant "curlopt_failonerror"
|
|
153
|
+
have_constant "curlopt_url"
|
|
154
|
+
have_constant "curlopt_protocols"
|
|
155
|
+
have_constant "curlopt_redir_protocols"
|
|
156
|
+
have_constant "curlopt_proxy"
|
|
157
|
+
have_constant "curlopt_proxyport"
|
|
158
|
+
have_constant "curlopt_proxytype"
|
|
159
|
+
have_constant "curlopt_noproxy"
|
|
160
|
+
have_constant "curlopt_httpproxytunnel"
|
|
161
|
+
have_constant "curlopt_socks5_gssapi_service"
|
|
162
|
+
have_constant "curlopt_socks5_gssapi_nec"
|
|
163
|
+
have_constant "curlopt_interface"
|
|
164
|
+
have_constant "curlopt_localport"
|
|
165
|
+
have_constant "curlopt_dns_cache_timeout"
|
|
166
|
+
have_constant "curlopt_dns_use_global_cache"
|
|
167
|
+
have_constant "curlopt_buffersize"
|
|
168
|
+
have_constant "curlopt_port"
|
|
169
|
+
have_constant "curlopt_tcp_nodelay"
|
|
170
|
+
have_constant "curlopt_address_scope"
|
|
171
|
+
have_constant "curlopt_netrc"
|
|
172
|
+
have_constant "curl_netrc_optional"
|
|
173
|
+
have_constant "curl_netrc_ignored"
|
|
174
|
+
have_constant "curl_netrc_required"
|
|
175
|
+
have_constant "curlopt_netrc_file"
|
|
176
|
+
have_constant "curlopt_userpwd"
|
|
177
|
+
have_constant "curlopt_proxyuserpwd"
|
|
178
|
+
have_constant "curlopt_username"
|
|
179
|
+
have_constant "curlopt_password"
|
|
180
|
+
have_constant "curlopt_password"
|
|
181
|
+
have_constant "curlopt_password"
|
|
182
|
+
have_constant "curlopt_httpauth"
|
|
183
|
+
have_constant "curlauth_digest_ie"
|
|
184
|
+
have_constant "curlauth_only"
|
|
185
|
+
have_constant "curlopt_tlsauth_type"
|
|
186
|
+
have_constant "curlopt_tlsauth_srp"
|
|
187
|
+
have_constant "curlopt_tlsauth_username"
|
|
188
|
+
have_constant "curlopt_tlsauth_password"
|
|
189
|
+
have_constant "curlopt_proxyauth"
|
|
190
|
+
have_constant "curlopt_autoreferer"
|
|
191
|
+
have_constant "curlopt_encoding"
|
|
192
|
+
have_constant "curlopt_followlocation"
|
|
193
|
+
have_constant "curlopt_unrestricted_auth"
|
|
194
|
+
have_constant "curlopt_maxredirs"
|
|
195
|
+
have_constant "curlopt_postredir"
|
|
196
|
+
have_constant "curlopt_put"
|
|
197
|
+
have_constant "curlopt_post"
|
|
198
|
+
have_constant "curlopt_postfields"
|
|
199
|
+
have_constant "curlopt_postfieldsize"
|
|
200
|
+
have_constant "curlopt_postfieldsize_large"
|
|
201
|
+
have_constant "curlopt_copypostfields"
|
|
202
|
+
have_constant "curlopt_httppost"
|
|
203
|
+
have_constant "curlopt_referer"
|
|
204
|
+
have_constant "curlopt_useragent"
|
|
205
|
+
have_constant "curlopt_httpheader"
|
|
206
|
+
have_constant "curlopt_http200aliases"
|
|
207
|
+
have_constant "curlopt_cookie"
|
|
208
|
+
have_constant "curlopt_cookiefile"
|
|
209
|
+
have_constant "curlopt_cookiejar"
|
|
210
|
+
have_constant "curlopt_cookiesession"
|
|
211
|
+
have_constant "curlopt_cookielist"
|
|
212
|
+
have_constant "curlopt_httpget"
|
|
213
|
+
have_constant "curlopt_http_version"
|
|
214
|
+
have_constant "curl_http_version_none"
|
|
215
|
+
have_constant "curl_http_version_1_0"
|
|
216
|
+
have_constant "curl_http_version_1_1"
|
|
217
|
+
have_constant "curlopt_ignore_content_length"
|
|
218
|
+
have_constant "curlopt_http_content_decoding"
|
|
219
|
+
have_constant "curlopt_http_transfer_decoding"
|
|
220
|
+
have_constant "curlopt_mail_from"
|
|
221
|
+
have_constant "curlopt_mail_rcpt"
|
|
222
|
+
have_constant "curlopt_tftp_blksize"
|
|
223
|
+
have_constant "curlopt_ftpport"
|
|
224
|
+
have_constant "curlopt_quote"
|
|
225
|
+
have_constant "curlopt_postquote"
|
|
226
|
+
have_constant "curlopt_prequote"
|
|
227
|
+
have_constant "curlopt_dirlistonly"
|
|
228
|
+
have_constant "curlopt_append"
|
|
229
|
+
have_constant "curlopt_ftp_use_eprt"
|
|
230
|
+
have_constant "curlopt_ftp_use_epsv"
|
|
231
|
+
have_constant "curlopt_ftp_use_pret"
|
|
232
|
+
have_constant "curlopt_ftp_create_missing_dirs"
|
|
233
|
+
have_constant "curlopt_ftp_response_timeout"
|
|
234
|
+
have_constant "curlopt_ftp_alternative_to_user"
|
|
235
|
+
have_constant "curlopt_ftp_skip_pasv_ip"
|
|
236
|
+
have_constant "curlopt_ftpsslauth"
|
|
237
|
+
have_constant "curlftpauth_default"
|
|
238
|
+
have_constant "curlftpauth_ssl"
|
|
239
|
+
have_constant "curlftpauth_tls"
|
|
240
|
+
have_constant "curlopt_ftp_ssl_ccc"
|
|
241
|
+
have_constant "curlftpssl_ccc_none"
|
|
242
|
+
have_constant "curlftpssl_ccc_passive"
|
|
243
|
+
have_constant "curlftpssl_ccc_active"
|
|
244
|
+
have_constant "curlopt_ftp_account"
|
|
245
|
+
have_constant "curlopt_ftp_filemethod"
|
|
246
|
+
have_constant "curlftpmethod_multicwd"
|
|
247
|
+
have_constant "curlftpmethod_nocwd"
|
|
248
|
+
have_constant "curlftpmethod_singlecwd"
|
|
249
|
+
have_constant "curlopt_rtsp_request"
|
|
250
|
+
have_constant "curl_rtspreq_options"
|
|
251
|
+
have_constant "curl_rtspreq_describe"
|
|
252
|
+
have_constant "curl_rtspreq_announce"
|
|
253
|
+
have_constant "curl_rtspreq_setup"
|
|
254
|
+
have_constant "curl_rtspreq_play"
|
|
255
|
+
have_constant "curl_rtspreq_pause"
|
|
256
|
+
have_constant "curl_rtspreq_teardown"
|
|
257
|
+
have_constant "curl_rtspreq_get_parameter"
|
|
258
|
+
have_constant "curl_rtspreq_set_parameter"
|
|
259
|
+
have_constant "curl_rtspreq_record"
|
|
260
|
+
have_constant "curl_rtspreq_receive"
|
|
261
|
+
have_constant "curlopt_rtsp_session_id"
|
|
262
|
+
have_constant "curlopt_rtsp_stream_uri"
|
|
263
|
+
have_constant "curlopt_rtsp_transport"
|
|
264
|
+
have_constant "curlopt_rtsp_header"
|
|
265
|
+
have_constant "curlopt_rtsp_client_cseq"
|
|
266
|
+
have_constant "curlopt_rtsp_server_cseq"
|
|
267
|
+
have_constant "curlopt_transfertext"
|
|
268
|
+
have_constant "curlopt_proxy_transfer_mode"
|
|
269
|
+
have_constant "curlopt_crlf"
|
|
270
|
+
have_constant "curlopt_range"
|
|
271
|
+
have_constant "curlopt_resume_from"
|
|
272
|
+
have_constant "curlopt_resume_from_large"
|
|
273
|
+
have_constant "curlopt_customrequest"
|
|
274
|
+
have_constant "curlopt_filetime"
|
|
275
|
+
have_constant "curlopt_nobody"
|
|
276
|
+
have_constant "curlopt_infilesize"
|
|
277
|
+
have_constant "curlopt_infilesize_large"
|
|
278
|
+
have_constant "curlopt_upload"
|
|
279
|
+
have_constant "curlopt_maxfilesize"
|
|
280
|
+
have_constant "curlopt_maxfilesize_large"
|
|
281
|
+
have_constant "curlopt_timecondition"
|
|
282
|
+
have_constant "curlopt_timevalue"
|
|
283
|
+
have_constant "curlopt_timeout"
|
|
284
|
+
have_constant "curlopt_timeout_ms"
|
|
285
|
+
have_constant "curlopt_low_speed_limit"
|
|
286
|
+
have_constant "curlopt_low_speed_time"
|
|
287
|
+
have_constant "curlopt_max_send_speed_large"
|
|
288
|
+
have_constant "curlopt_max_recv_speed_large"
|
|
289
|
+
have_constant "curlopt_maxconnects"
|
|
290
|
+
have_constant "curlopt_closepolicy"
|
|
291
|
+
have_constant "curlopt_fresh_connect"
|
|
292
|
+
have_constant "curlopt_forbid_reuse"
|
|
293
|
+
have_constant "curlopt_connecttimeout"
|
|
294
|
+
have_constant "curlopt_connecttimeout_ms"
|
|
295
|
+
have_constant "curlopt_ipresolve"
|
|
296
|
+
have_constant "curl_ipresolve_whatever"
|
|
297
|
+
have_constant "curl_ipresolve_v4"
|
|
298
|
+
have_constant "curl_ipresolve_v6"
|
|
299
|
+
have_constant "curlopt_connect_only"
|
|
300
|
+
have_constant "curlopt_use_ssl"
|
|
301
|
+
have_constant "curlusessl_none"
|
|
302
|
+
have_constant "curlusessl_try"
|
|
303
|
+
have_constant "curlusessl_control"
|
|
304
|
+
have_constant "curlusessl_all"
|
|
305
|
+
have_constant "curlopt_resolve"
|
|
306
|
+
have_constant "curlopt_sslcert"
|
|
307
|
+
have_constant "curlopt_sslcerttype"
|
|
308
|
+
have_constant "curlopt_sslkey"
|
|
309
|
+
have_constant "curlopt_sslkeytype"
|
|
310
|
+
have_constant "curlopt_keypasswd"
|
|
311
|
+
have_constant "curlopt_sslengine"
|
|
312
|
+
have_constant "curlopt_sslengine_default"
|
|
313
|
+
have_constant "curlopt_sslversion"
|
|
314
|
+
have_constant "curl_sslversion_default"
|
|
315
|
+
have_constant :CURL_SSLVERSION_TLSv1
|
|
316
|
+
have_constant :CURL_SSLVERSION_SSLv2
|
|
317
|
+
have_constant :CURL_SSLVERSION_SSLv3
|
|
318
|
+
have_constant "curlopt_ssl_verifypeer"
|
|
319
|
+
have_constant "curlopt_cainfo"
|
|
320
|
+
have_constant "curlopt_issuercert"
|
|
321
|
+
have_constant "curlopt_capath"
|
|
322
|
+
have_constant "curlopt_crlfile"
|
|
323
|
+
have_constant "curlopt_ssl_verifyhost"
|
|
324
|
+
have_constant "curlopt_certinfo"
|
|
325
|
+
have_constant "curlopt_random_file"
|
|
326
|
+
have_constant "curlopt_egdsocket"
|
|
327
|
+
have_constant "curlopt_ssl_cipher_list"
|
|
328
|
+
have_constant "curlopt_ssl_sessionid_cache"
|
|
329
|
+
have_constant "curlopt_krblevel"
|
|
330
|
+
have_constant "curlopt_ssh_auth_types"
|
|
331
|
+
have_constant "curlopt_ssh_host_public_key_md5"
|
|
332
|
+
have_constant "curlopt_ssh_public_keyfile"
|
|
333
|
+
have_constant "curlopt_ssh_private_keyfile"
|
|
334
|
+
have_constant "curlopt_ssh_knownhosts"
|
|
335
|
+
have_constant "curlopt_ssh_keyfunction"
|
|
336
|
+
have_constant "curlkhstat_fine_add_to_file"
|
|
337
|
+
have_constant "curlkhstat_fine"
|
|
338
|
+
have_constant "curlkhstat_reject"
|
|
339
|
+
have_constant "curlkhstat_defer"
|
|
340
|
+
have_constant "curlopt_ssh_keydata"
|
|
341
|
+
have_constant "curlopt_private"
|
|
342
|
+
have_constant "curlopt_share"
|
|
343
|
+
have_constant "curlopt_new_file_perms"
|
|
344
|
+
have_constant "curlopt_new_directory_perms"
|
|
345
|
+
have_constant "curlopt_telnetoptions"
|
|
346
|
+
# was obsoleted in August 2007 for 7.17.0, reused in April 2011 for 7.21.5
|
|
347
|
+
have_constant "curle_not_built_in"
|
|
348
|
+
|
|
349
|
+
have_constant "curle_obsolete" # removed in 7.24 ?
|
|
350
|
+
|
|
133
351
|
if try_compile('int main() { return 0; }','-Wall')
|
|
134
352
|
$CFLAGS << ' -Wall'
|
|
135
353
|
end
|
|
@@ -172,5 +390,7 @@ test_for("curl_easy_escape", "CURL_EASY_ESCAPE", %{
|
|
|
172
390
|
}
|
|
173
391
|
})
|
|
174
392
|
|
|
393
|
+
have_func('rb_thread_blocking_region')
|
|
394
|
+
|
|
175
395
|
create_header('curb_config.h')
|
|
176
396
|
create_makefile('curb_core')
|