curb 0.7.15 → 0.8.4
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 +18 -1
- data/Rakefile +7 -3
- data/ext/curb.c +604 -0
- data/ext/curb.h +5 -5
- data/ext/curb_easy.c +407 -490
- data/ext/curb_easy.h +3 -0
- data/ext/curb_errors.c +14 -2
- data/ext/curb_macros.h +4 -0
- data/ext/curb_multi.c +85 -15
- data/ext/extconf.rb +226 -3
- data/lib/curb.rb +1 -308
- data/lib/curl/easy.rb +468 -0
- data/lib/curl/multi.rb +248 -0
- data/lib/curl.rb +62 -1
- data/tests/bug_crash_on_debug.rb +39 -0
- data/tests/bug_crash_on_progress.rb +33 -0
- data/tests/bug_curb_easy_blocks_ruby_threads.rb +2 -2
- data/tests/bug_issue102.rb +17 -0
- data/tests/bug_require_last_or_segfault.rb +1 -1
- data/tests/helper.rb +21 -5
- data/tests/signals.rb +33 -0
- data/tests/tc_curl.rb +39 -0
- data/tests/tc_curl_easy.rb +139 -10
- data/tests/tc_curl_easy_setopt.rb +31 -0
- data/tests/tc_curl_multi.rb +21 -2
- metadata +43 -39
data/ext/curb_easy.h
CHANGED
|
@@ -56,6 +56,7 @@ typedef struct {
|
|
|
56
56
|
long ssl_version;
|
|
57
57
|
long use_ssl;
|
|
58
58
|
long ftp_filemethod;
|
|
59
|
+
unsigned short resolve_mode;
|
|
59
60
|
|
|
60
61
|
/* bool flags */
|
|
61
62
|
char proxy_tunnel;
|
|
@@ -70,6 +71,8 @@ typedef struct {
|
|
|
70
71
|
char multipart_form_post;
|
|
71
72
|
char enable_cookies;
|
|
72
73
|
char ignore_content_length;
|
|
74
|
+
char callback_active;
|
|
75
|
+
|
|
73
76
|
struct curl_slist *curl_headers;
|
|
74
77
|
struct curl_slist *curl_ftp_commands;
|
|
75
78
|
|
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;
|
|
@@ -450,7 +459,8 @@ VALUE rb_curl_easy_error(CURLcode code) {
|
|
|
450
459
|
/* rb_raise an approriate exception for the supplied CURLcode */
|
|
451
460
|
void raise_curl_easy_error_exception(CURLcode code) {
|
|
452
461
|
VALUE obj = rb_curl_easy_error(code);
|
|
453
|
-
|
|
462
|
+
VALUE exmsg = rb_ary_entry(obj,1);
|
|
463
|
+
rb_raise(rb_ary_entry(obj,0), "CURLError: %s", StringValueCStr(exmsg));
|
|
454
464
|
}
|
|
455
465
|
VALUE rb_curl_multi_error(CURLMcode code) {
|
|
456
466
|
VALUE exclz;
|
|
@@ -500,7 +510,8 @@ VALUE rb_curl_multi_error(CURLMcode code) {
|
|
|
500
510
|
}
|
|
501
511
|
void raise_curl_multi_error_exception(CURLMcode code) {
|
|
502
512
|
VALUE obj = rb_curl_multi_error(code);
|
|
503
|
-
|
|
513
|
+
VALUE exmsg = rb_ary_entry(obj,1);
|
|
514
|
+
rb_raise(rb_ary_entry(obj,0), "CURLError: %s", StringValueCStr(exmsg));
|
|
504
515
|
}
|
|
505
516
|
|
|
506
517
|
void init_curb_errors() {
|
|
@@ -518,6 +529,7 @@ void init_curb_errors() {
|
|
|
518
529
|
eCurlErrUnsupportedProtocol = rb_define_class_under(mCurlErr, "UnsupportedProtocolError", eCurlErrError);
|
|
519
530
|
eCurlErrFailedInit = rb_define_class_under(mCurlErr, "FailedInitError", eCurlErrError);
|
|
520
531
|
eCurlErrMalformedURL = rb_define_class_under(mCurlErr, "MalformedURLError", eCurlErrError);
|
|
532
|
+
eCurlErrNotBuiltIn = rb_define_class_under(mCurlErr, "NotBuiltInError", eCurlErrError);
|
|
521
533
|
eCurlErrMalformedURLUser = rb_define_class_under(mCurlErr, "MalformedURLUserError", eCurlErrError);
|
|
522
534
|
eCurlErrProxyResolution = rb_define_class_under(mCurlErr, "ProxyResolutionError", eCurlErrError);
|
|
523
535
|
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,60 @@ 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
|
+
rbce->callback_active = 1;
|
|
358
|
+
val = rb_rescue(call_status_handler1, callargs, callback_exception, Qnil);
|
|
359
|
+
rbce->callback_active = 0;
|
|
360
|
+
//rb_funcall( rb_easy_get("complete_proc"), idCall, 1, easy );
|
|
352
361
|
}
|
|
353
362
|
|
|
354
363
|
curl_easy_getinfo(rbce->curl, CURLINFO_RESPONSE_CODE, &response_code);
|
|
355
364
|
|
|
356
365
|
if (result != 0) {
|
|
357
366
|
if (!rb_easy_nil("failure_proc")) {
|
|
358
|
-
|
|
367
|
+
callargs = rb_ary_new3(3, rb_easy_get("failure_proc"), easy, rb_curl_easy_error(result));
|
|
368
|
+
rbce->callback_active = 1;
|
|
369
|
+
val = rb_rescue(call_status_handler2, callargs, callback_exception, Qnil);
|
|
370
|
+
rbce->callback_active = 0;
|
|
371
|
+
//rb_funcall( rb_easy_get("failure_proc"), idCall, 2, easy, rb_curl_easy_error(result) );
|
|
359
372
|
}
|
|
360
373
|
}
|
|
361
374
|
else if (!rb_easy_nil("success_proc") &&
|
|
362
375
|
((response_code >= 200 && response_code < 300) || response_code == 0)) {
|
|
363
376
|
/* NOTE: we allow response_code == 0, in the case of non http requests e.g. reading from disk */
|
|
364
|
-
|
|
377
|
+
callargs = rb_ary_new3(2, rb_easy_get("success_proc"), easy);
|
|
378
|
+
rbce->callback_active = 1;
|
|
379
|
+
val = rb_rescue(call_status_handler1, callargs, callback_exception, Qnil);
|
|
380
|
+
rbce->callback_active = 0;
|
|
381
|
+
//rb_funcall( rb_easy_get("success_proc"), idCall, 1, easy );
|
|
382
|
+
}
|
|
383
|
+
else if (!rb_easy_nil("redirect_proc") &&
|
|
384
|
+
(response_code >= 300 && response_code < 400)) {
|
|
385
|
+
rbce->callback_active = 1;
|
|
386
|
+
callargs = rb_ary_new3(3, rb_easy_get("redirect_proc"), easy, rb_curl_easy_error(result));
|
|
387
|
+
rbce->callback_active = 0;
|
|
388
|
+
val = rb_rescue(call_status_handler2, callargs, callback_exception, Qnil);
|
|
389
|
+
}
|
|
390
|
+
else if (!rb_easy_nil("missing_proc") &&
|
|
391
|
+
(response_code >= 400 && response_code < 500)) {
|
|
392
|
+
rbce->callback_active = 1;
|
|
393
|
+
callargs = rb_ary_new3(3, rb_easy_get("missing_proc"), easy, rb_curl_easy_error(result));
|
|
394
|
+
rbce->callback_active = 0;
|
|
395
|
+
val = rb_rescue(call_status_handler2, callargs, callback_exception, Qnil);
|
|
365
396
|
}
|
|
366
397
|
else if (!rb_easy_nil("failure_proc") &&
|
|
367
|
-
(response_code >=
|
|
368
|
-
|
|
398
|
+
(response_code >= 500 && response_code <= 999)) {
|
|
399
|
+
callargs = rb_ary_new3(3, rb_easy_get("failure_proc"), easy, rb_curl_easy_error(result));
|
|
400
|
+
rbce->callback_active = 1;
|
|
401
|
+
val = rb_rescue(call_status_handler2, callargs, callback_exception, Qnil);
|
|
402
|
+
rbce->callback_active = 0;
|
|
403
|
+
//rb_funcall( rb_easy_get("failure_proc"), idCall, 2, easy, rb_curl_easy_error(result) );
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
if (val == Qfalse) {
|
|
407
|
+
rb_warn("uncaught exception from callback");
|
|
408
|
+
// exception was raised?
|
|
409
|
+
//fprintf(stderr, "exception raised from callback\n");
|
|
369
410
|
}
|
|
370
411
|
|
|
371
412
|
}
|
|
@@ -430,6 +471,20 @@ void cleanup_crt_fd(fd_set *os_set, fd_set *crt_set)
|
|
|
430
471
|
}
|
|
431
472
|
#endif
|
|
432
473
|
|
|
474
|
+
#ifdef HAVE_RB_THREAD_BLOCKING_REGION
|
|
475
|
+
struct _select_set {
|
|
476
|
+
int maxfd;
|
|
477
|
+
fd_set *fdread, *fdwrite, *fdexcep;
|
|
478
|
+
struct timeval *tv;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
static VALUE curb_select(void *args) {
|
|
482
|
+
struct _select_set* set = args;
|
|
483
|
+
int rc = select(set->maxfd, set->fdread, set->fdwrite, set->fdexcep, set->tv);
|
|
484
|
+
return INT2FIX(rc);
|
|
485
|
+
}
|
|
486
|
+
#endif
|
|
487
|
+
|
|
433
488
|
/*
|
|
434
489
|
* call-seq:
|
|
435
490
|
* multi = Curl::Multi.new
|
|
@@ -453,10 +508,12 @@ VALUE ruby_curl_multi_perform(int argc, VALUE *argv, VALUE self) {
|
|
|
453
508
|
#ifdef _WIN32
|
|
454
509
|
fd_set crt_fdread, crt_fdwrite, crt_fdexcep;
|
|
455
510
|
#endif
|
|
456
|
-
|
|
457
511
|
long timeout_milliseconds;
|
|
458
512
|
struct timeval tv = {0, 0};
|
|
459
513
|
VALUE block = Qnil;
|
|
514
|
+
#ifdef HAVE_RB_THREAD_BLOCKING_REGION
|
|
515
|
+
struct _select_set fdset_args;
|
|
516
|
+
#endif
|
|
460
517
|
|
|
461
518
|
rb_scan_args(argc, argv, "0&", &block);
|
|
462
519
|
|
|
@@ -465,6 +522,8 @@ VALUE ruby_curl_multi_perform(int argc, VALUE *argv, VALUE self) {
|
|
|
465
522
|
timeout_milliseconds = cCurlMutiDefaulttimeout;
|
|
466
523
|
|
|
467
524
|
rb_curl_multi_run( self, rbcm->handle, &(rbcm->running) );
|
|
525
|
+
rb_curl_multi_read_info( self, rbcm->handle );
|
|
526
|
+
if (block != Qnil) { rb_funcall(block, rb_intern("call"), 1, self); }
|
|
468
527
|
|
|
469
528
|
do {
|
|
470
529
|
while (rbcm->running) {
|
|
@@ -511,7 +570,16 @@ VALUE ruby_curl_multi_perform(int argc, VALUE *argv, VALUE self) {
|
|
|
511
570
|
create_crt_fd(&fdexcep, &crt_fdexcep);
|
|
512
571
|
#endif
|
|
513
572
|
|
|
573
|
+
#ifdef HAVE_RB_THREAD_BLOCKING_REGION
|
|
574
|
+
fdset_args.maxfd = maxfd+1;
|
|
575
|
+
fdset_args.fdread = &fdread;
|
|
576
|
+
fdset_args.fdwrite = &fdwrite;
|
|
577
|
+
fdset_args.fdexcep = &fdexcep;
|
|
578
|
+
fdset_args.tv = &tv;
|
|
579
|
+
rc = rb_thread_blocking_region(curb_select, &fdset_args, RUBY_UBF_IO, 0);
|
|
580
|
+
#else
|
|
514
581
|
rc = rb_thread_select(maxfd+1, &fdread, &fdwrite, &fdexcep, &tv);
|
|
582
|
+
#endif
|
|
515
583
|
|
|
516
584
|
#ifdef _WIN32
|
|
517
585
|
cleanup_crt_fd(&fdread, &crt_fdread);
|
|
@@ -521,8 +589,10 @@ VALUE ruby_curl_multi_perform(int argc, VALUE *argv, VALUE self) {
|
|
|
521
589
|
|
|
522
590
|
switch(rc) {
|
|
523
591
|
case -1:
|
|
524
|
-
|
|
525
|
-
|
|
592
|
+
if(errno != EINTR) {
|
|
593
|
+
rb_raise(rb_eRuntimeError, "select(): %s", strerror(errno));
|
|
594
|
+
break;
|
|
595
|
+
}
|
|
526
596
|
case 0: /* timeout */
|
|
527
597
|
default: /* action */
|
|
528
598
|
rb_curl_multi_run( self, rbcm->handle, &(rbcm->running) );
|
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"
|
|
@@ -110,6 +119,9 @@ have_constant "curle_again"
|
|
|
110
119
|
have_constant "curle_ssl_crl_badfile"
|
|
111
120
|
have_constant "curle_ssl_issuer_error"
|
|
112
121
|
|
|
122
|
+
# added in 7.18.2
|
|
123
|
+
have_constant "curlinfo_redirect_url"
|
|
124
|
+
|
|
113
125
|
# username/password added in 7.19.1
|
|
114
126
|
have_constant "curlopt_username"
|
|
115
127
|
have_constant "curlopt_password"
|
|
@@ -130,6 +142,215 @@ have_func("curl_multi_timeout")
|
|
|
130
142
|
have_func("curl_multi_fdset")
|
|
131
143
|
have_func("curl_multi_perform")
|
|
132
144
|
|
|
145
|
+
# constants
|
|
146
|
+
have_constant "curlopt_interleavefunction"
|
|
147
|
+
have_constant "curlopt_interleavedata"
|
|
148
|
+
have_constant "curlopt_chunk_bgn_function"
|
|
149
|
+
have_constant "curlopt_chunk_end_function"
|
|
150
|
+
have_constant "curlopt_chunk_data"
|
|
151
|
+
have_constant "curlopt_fnmatch_function"
|
|
152
|
+
have_constant "curlopt_fnmatch_data"
|
|
153
|
+
have_constant "curlopt_errorbuffer"
|
|
154
|
+
have_constant "curlopt_stderr"
|
|
155
|
+
have_constant "curlopt_failonerror"
|
|
156
|
+
have_constant "curlopt_url"
|
|
157
|
+
have_constant "curlopt_protocols"
|
|
158
|
+
have_constant "curlopt_redir_protocols"
|
|
159
|
+
have_constant "curlopt_proxy"
|
|
160
|
+
have_constant "curlopt_proxyport"
|
|
161
|
+
have_constant "curlopt_proxytype"
|
|
162
|
+
have_constant "curlopt_noproxy"
|
|
163
|
+
have_constant "curlopt_httpproxytunnel"
|
|
164
|
+
have_constant "curlopt_socks5_gssapi_service"
|
|
165
|
+
have_constant "curlopt_socks5_gssapi_nec"
|
|
166
|
+
have_constant "curlopt_interface"
|
|
167
|
+
have_constant "curlopt_localport"
|
|
168
|
+
have_constant "curlopt_dns_cache_timeout"
|
|
169
|
+
have_constant "curlopt_dns_use_global_cache"
|
|
170
|
+
have_constant "curlopt_buffersize"
|
|
171
|
+
have_constant "curlopt_port"
|
|
172
|
+
have_constant "curlopt_tcp_nodelay"
|
|
173
|
+
have_constant "curlopt_address_scope"
|
|
174
|
+
have_constant "curlopt_netrc"
|
|
175
|
+
have_constant "curl_netrc_optional"
|
|
176
|
+
have_constant "curl_netrc_ignored"
|
|
177
|
+
have_constant "curl_netrc_required"
|
|
178
|
+
have_constant "curlopt_netrc_file"
|
|
179
|
+
have_constant "curlopt_userpwd"
|
|
180
|
+
have_constant "curlopt_proxyuserpwd"
|
|
181
|
+
have_constant "curlopt_username"
|
|
182
|
+
have_constant "curlopt_password"
|
|
183
|
+
have_constant "curlopt_password"
|
|
184
|
+
have_constant "curlopt_password"
|
|
185
|
+
have_constant "curlopt_httpauth"
|
|
186
|
+
have_constant "curlauth_digest_ie"
|
|
187
|
+
have_constant "curlauth_only"
|
|
188
|
+
have_constant "curlopt_tlsauth_type"
|
|
189
|
+
have_constant "curlopt_tlsauth_srp"
|
|
190
|
+
have_constant "curlopt_tlsauth_username"
|
|
191
|
+
have_constant "curlopt_tlsauth_password"
|
|
192
|
+
have_constant "curlopt_proxyauth"
|
|
193
|
+
have_constant "curlopt_autoreferer"
|
|
194
|
+
have_constant "curlopt_encoding"
|
|
195
|
+
have_constant "curlopt_followlocation"
|
|
196
|
+
have_constant "curlopt_unrestricted_auth"
|
|
197
|
+
have_constant "curlopt_maxredirs"
|
|
198
|
+
have_constant "curlopt_postredir"
|
|
199
|
+
have_constant "curlopt_put"
|
|
200
|
+
have_constant "curlopt_post"
|
|
201
|
+
have_constant "curlopt_postfields"
|
|
202
|
+
have_constant "curlopt_postfieldsize"
|
|
203
|
+
have_constant "curlopt_postfieldsize_large"
|
|
204
|
+
have_constant "curlopt_copypostfields"
|
|
205
|
+
have_constant "curlopt_httppost"
|
|
206
|
+
have_constant "curlopt_referer"
|
|
207
|
+
have_constant "curlopt_useragent"
|
|
208
|
+
have_constant "curlopt_httpheader"
|
|
209
|
+
have_constant "curlopt_http200aliases"
|
|
210
|
+
have_constant "curlopt_cookie"
|
|
211
|
+
have_constant "curlopt_cookiefile"
|
|
212
|
+
have_constant "curlopt_cookiejar"
|
|
213
|
+
have_constant "curlopt_cookiesession"
|
|
214
|
+
have_constant "curlopt_cookielist"
|
|
215
|
+
have_constant "curlopt_httpget"
|
|
216
|
+
have_constant "curlopt_http_version"
|
|
217
|
+
have_constant "curl_http_version_none"
|
|
218
|
+
have_constant "curl_http_version_1_0"
|
|
219
|
+
have_constant "curl_http_version_1_1"
|
|
220
|
+
have_constant "curlopt_ignore_content_length"
|
|
221
|
+
have_constant "curlopt_http_content_decoding"
|
|
222
|
+
have_constant "curlopt_http_transfer_decoding"
|
|
223
|
+
have_constant "curlopt_mail_from"
|
|
224
|
+
have_constant "curlopt_mail_rcpt"
|
|
225
|
+
have_constant "curlopt_tftp_blksize"
|
|
226
|
+
have_constant "curlopt_ftpport"
|
|
227
|
+
have_constant "curlopt_quote"
|
|
228
|
+
have_constant "curlopt_postquote"
|
|
229
|
+
have_constant "curlopt_prequote"
|
|
230
|
+
have_constant "curlopt_dirlistonly"
|
|
231
|
+
have_constant "curlopt_append"
|
|
232
|
+
have_constant "curlopt_ftp_use_eprt"
|
|
233
|
+
have_constant "curlopt_ftp_use_epsv"
|
|
234
|
+
have_constant "curlopt_ftp_use_pret"
|
|
235
|
+
have_constant "curlopt_ftp_create_missing_dirs"
|
|
236
|
+
have_constant "curlopt_ftp_response_timeout"
|
|
237
|
+
have_constant "curlopt_ftp_alternative_to_user"
|
|
238
|
+
have_constant "curlopt_ftp_skip_pasv_ip"
|
|
239
|
+
have_constant "curlopt_ftpsslauth"
|
|
240
|
+
have_constant "curlftpauth_default"
|
|
241
|
+
have_constant "curlftpauth_ssl"
|
|
242
|
+
have_constant "curlftpauth_tls"
|
|
243
|
+
have_constant "curlopt_ftp_ssl_ccc"
|
|
244
|
+
have_constant "curlftpssl_ccc_none"
|
|
245
|
+
have_constant "curlftpssl_ccc_passive"
|
|
246
|
+
have_constant "curlftpssl_ccc_active"
|
|
247
|
+
have_constant "curlopt_ftp_account"
|
|
248
|
+
have_constant "curlopt_ftp_filemethod"
|
|
249
|
+
have_constant "curlftpmethod_multicwd"
|
|
250
|
+
have_constant "curlftpmethod_nocwd"
|
|
251
|
+
have_constant "curlftpmethod_singlecwd"
|
|
252
|
+
have_constant "curlopt_rtsp_request"
|
|
253
|
+
have_constant "curl_rtspreq_options"
|
|
254
|
+
have_constant "curl_rtspreq_describe"
|
|
255
|
+
have_constant "curl_rtspreq_announce"
|
|
256
|
+
have_constant "curl_rtspreq_setup"
|
|
257
|
+
have_constant "curl_rtspreq_play"
|
|
258
|
+
have_constant "curl_rtspreq_pause"
|
|
259
|
+
have_constant "curl_rtspreq_teardown"
|
|
260
|
+
have_constant "curl_rtspreq_get_parameter"
|
|
261
|
+
have_constant "curl_rtspreq_set_parameter"
|
|
262
|
+
have_constant "curl_rtspreq_record"
|
|
263
|
+
have_constant "curl_rtspreq_receive"
|
|
264
|
+
have_constant "curlopt_rtsp_session_id"
|
|
265
|
+
have_constant "curlopt_rtsp_stream_uri"
|
|
266
|
+
have_constant "curlopt_rtsp_transport"
|
|
267
|
+
have_constant "curlopt_rtsp_header"
|
|
268
|
+
have_constant "curlopt_rtsp_client_cseq"
|
|
269
|
+
have_constant "curlopt_rtsp_server_cseq"
|
|
270
|
+
have_constant "curlopt_transfertext"
|
|
271
|
+
have_constant "curlopt_proxy_transfer_mode"
|
|
272
|
+
have_constant "curlopt_crlf"
|
|
273
|
+
have_constant "curlopt_range"
|
|
274
|
+
have_constant "curlopt_resume_from"
|
|
275
|
+
have_constant "curlopt_resume_from_large"
|
|
276
|
+
have_constant "curlopt_customrequest"
|
|
277
|
+
have_constant "curlopt_filetime"
|
|
278
|
+
have_constant "curlopt_nobody"
|
|
279
|
+
have_constant "curlopt_infilesize"
|
|
280
|
+
have_constant "curlopt_infilesize_large"
|
|
281
|
+
have_constant "curlopt_upload"
|
|
282
|
+
have_constant "curlopt_maxfilesize"
|
|
283
|
+
have_constant "curlopt_maxfilesize_large"
|
|
284
|
+
have_constant "curlopt_timecondition"
|
|
285
|
+
have_constant "curlopt_timevalue"
|
|
286
|
+
have_constant "curlopt_timeout"
|
|
287
|
+
have_constant "curlopt_timeout_ms"
|
|
288
|
+
have_constant "curlopt_low_speed_limit"
|
|
289
|
+
have_constant "curlopt_low_speed_time"
|
|
290
|
+
have_constant "curlopt_max_send_speed_large"
|
|
291
|
+
have_constant "curlopt_max_recv_speed_large"
|
|
292
|
+
have_constant "curlopt_maxconnects"
|
|
293
|
+
have_constant "curlopt_closepolicy"
|
|
294
|
+
have_constant "curlopt_fresh_connect"
|
|
295
|
+
have_constant "curlopt_forbid_reuse"
|
|
296
|
+
have_constant "curlopt_connecttimeout"
|
|
297
|
+
have_constant "curlopt_connecttimeout_ms"
|
|
298
|
+
have_constant "curlopt_ipresolve"
|
|
299
|
+
have_constant "curl_ipresolve_whatever"
|
|
300
|
+
have_constant "curl_ipresolve_v4"
|
|
301
|
+
have_constant "curl_ipresolve_v6"
|
|
302
|
+
have_constant "curlopt_connect_only"
|
|
303
|
+
have_constant "curlopt_use_ssl"
|
|
304
|
+
have_constant "curlusessl_none"
|
|
305
|
+
have_constant "curlusessl_try"
|
|
306
|
+
have_constant "curlusessl_control"
|
|
307
|
+
have_constant "curlusessl_all"
|
|
308
|
+
have_constant "curlopt_resolve"
|
|
309
|
+
have_constant "curlopt_sslcert"
|
|
310
|
+
have_constant "curlopt_sslcerttype"
|
|
311
|
+
have_constant "curlopt_sslkey"
|
|
312
|
+
have_constant "curlopt_sslkeytype"
|
|
313
|
+
have_constant "curlopt_keypasswd"
|
|
314
|
+
have_constant "curlopt_sslengine"
|
|
315
|
+
have_constant "curlopt_sslengine_default"
|
|
316
|
+
have_constant "curlopt_sslversion"
|
|
317
|
+
have_constant "curl_sslversion_default"
|
|
318
|
+
have_constant :CURL_SSLVERSION_TLSv1
|
|
319
|
+
have_constant :CURL_SSLVERSION_SSLv2
|
|
320
|
+
have_constant :CURL_SSLVERSION_SSLv3
|
|
321
|
+
have_constant "curlopt_ssl_verifypeer"
|
|
322
|
+
have_constant "curlopt_cainfo"
|
|
323
|
+
have_constant "curlopt_issuercert"
|
|
324
|
+
have_constant "curlopt_capath"
|
|
325
|
+
have_constant "curlopt_crlfile"
|
|
326
|
+
have_constant "curlopt_ssl_verifyhost"
|
|
327
|
+
have_constant "curlopt_certinfo"
|
|
328
|
+
have_constant "curlopt_random_file"
|
|
329
|
+
have_constant "curlopt_egdsocket"
|
|
330
|
+
have_constant "curlopt_ssl_cipher_list"
|
|
331
|
+
have_constant "curlopt_ssl_sessionid_cache"
|
|
332
|
+
have_constant "curlopt_krblevel"
|
|
333
|
+
have_constant "curlopt_ssh_auth_types"
|
|
334
|
+
have_constant "curlopt_ssh_host_public_key_md5"
|
|
335
|
+
have_constant "curlopt_ssh_public_keyfile"
|
|
336
|
+
have_constant "curlopt_ssh_private_keyfile"
|
|
337
|
+
have_constant "curlopt_ssh_knownhosts"
|
|
338
|
+
have_constant "curlopt_ssh_keyfunction"
|
|
339
|
+
have_constant "curlkhstat_fine_add_to_file"
|
|
340
|
+
have_constant "curlkhstat_fine"
|
|
341
|
+
have_constant "curlkhstat_reject"
|
|
342
|
+
have_constant "curlkhstat_defer"
|
|
343
|
+
have_constant "curlopt_ssh_keydata"
|
|
344
|
+
have_constant "curlopt_private"
|
|
345
|
+
have_constant "curlopt_share"
|
|
346
|
+
have_constant "curlopt_new_file_perms"
|
|
347
|
+
have_constant "curlopt_new_directory_perms"
|
|
348
|
+
have_constant "curlopt_telnetoptions"
|
|
349
|
+
# was obsoleted in August 2007 for 7.17.0, reused in April 2011 for 7.21.5
|
|
350
|
+
have_constant "curle_not_built_in"
|
|
351
|
+
|
|
352
|
+
have_constant "curle_obsolete" # removed in 7.24 ?
|
|
353
|
+
|
|
133
354
|
if try_compile('int main() { return 0; }','-Wall')
|
|
134
355
|
$CFLAGS << ' -Wall'
|
|
135
356
|
end
|
|
@@ -172,5 +393,7 @@ test_for("curl_easy_escape", "CURL_EASY_ESCAPE", %{
|
|
|
172
393
|
}
|
|
173
394
|
})
|
|
174
395
|
|
|
396
|
+
have_func('rb_thread_blocking_region')
|
|
397
|
+
|
|
175
398
|
create_header('curb_config.h')
|
|
176
399
|
create_makefile('curb_core')
|