curb 0.8.4 → 1.3.5
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.
- checksums.yaml +7 -0
- data/README.md +522 -0
- data/Rakefile +79 -26
- data/ext/banned.h +32 -0
- data/ext/curb.c +549 -230
- data/ext/curb.h +19 -10
- data/ext/curb_easy.c +1935 -366
- data/ext/curb_easy.h +16 -0
- data/ext/curb_errors.c +115 -18
- data/ext/curb_errors.h +8 -5
- data/ext/curb_macros.h +33 -21
- data/ext/curb_multi.c +1858 -272
- data/ext/curb_multi.h +10 -3
- data/ext/curb_postfield.c +149 -77
- data/ext/curb_postfield.h +1 -0
- data/ext/curb_upload.c +38 -11
- data/ext/curb_upload.h +2 -0
- data/ext/extconf.rb +353 -35
- data/lib/curb.rb +1 -0
- data/lib/curl/easy.rb +314 -78
- data/lib/curl/multi.rb +134 -28
- data/lib/curl.rb +217 -11
- data/tests/bug_crash_on_debug.rb +14 -28
- data/tests/bug_crash_on_progress.rb +32 -16
- data/tests/bug_curb_easy_blocks_ruby_threads.rb +10 -15
- data/tests/bug_curb_easy_post_with_string_no_content_length_header.rb +6 -30
- data/tests/bug_follow_redirect_288.rb +83 -0
- data/tests/bug_instance_post_differs_from_class_post.rb +3 -5
- data/tests/bug_issue102.rb +1 -1
- data/tests/bug_issue_noproxy.rb +56 -0
- data/tests/bug_issue_post_redirect.rb +93 -0
- data/tests/bug_issue_spnego.rb +41 -0
- data/tests/bug_multi_segfault.rb +1 -0
- data/tests/bug_raise_on_callback.rb +30 -0
- data/tests/helper.rb +400 -44
- data/tests/leak_trace.rb +237 -0
- data/tests/mem_check.rb +3 -0
- data/tests/tc_curl.rb +31 -1
- data/tests/tc_curl_download.rb +12 -7
- data/tests/tc_curl_easy.rb +911 -63
- data/tests/tc_curl_easy_cookielist.rb +277 -0
- data/tests/tc_curl_easy_request_target.rb +41 -0
- data/tests/tc_curl_easy_resolve.rb +48 -0
- data/tests/tc_curl_maxfilesize.rb +12 -0
- data/tests/tc_curl_multi.rb +855 -53
- data/tests/tc_curl_native_coverage.rb +145 -0
- data/tests/tc_curl_postfield.rb +207 -30
- data/tests/tc_curl_protocols.rb +37 -0
- data/tests/tc_fiber_scheduler.rb +543 -0
- data/tests/tc_ftp_options.rb +39 -0
- data/tests/tc_gc_compact.rb +223 -0
- data/tests/tc_test_server_methods.rb +110 -0
- data/tests/timeout.rb +30 -6
- metadata +59 -36
- data/README +0 -194
data/ext/curb.c
CHANGED
|
@@ -143,12 +143,14 @@ static VALUE ruby_curl_asyncdns_q(VALUE mod) {
|
|
|
143
143
|
* in RFC 2478). For libcurl versions < 7.10.8, always returns false.
|
|
144
144
|
*/
|
|
145
145
|
static VALUE ruby_curl_spnego_q(VALUE mod) {
|
|
146
|
-
#ifdef HAVE_CURL_VERSION_SPNEGO
|
|
147
146
|
curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
return Qfalse;
|
|
147
|
+
#ifdef HAVE_CURL_VERSION_SPNEGO
|
|
148
|
+
if (ver->features & CURL_VERSION_SPNEGO) return Qtrue;
|
|
151
149
|
#endif
|
|
150
|
+
#ifdef HAVE_CURL_VERSION_GSSNEGOTIATE
|
|
151
|
+
if (ver->features & CURL_VERSION_GSSNEGOTIATE) return Qtrue;
|
|
152
|
+
#endif
|
|
153
|
+
return Qfalse;
|
|
152
154
|
}
|
|
153
155
|
|
|
154
156
|
/*
|
|
@@ -219,12 +221,32 @@ static VALUE ruby_curl_conv_q(VALUE mod) {
|
|
|
219
221
|
#endif
|
|
220
222
|
}
|
|
221
223
|
|
|
224
|
+
/*
|
|
225
|
+
* call-seq:
|
|
226
|
+
* Curl.http2? => true or false
|
|
227
|
+
*
|
|
228
|
+
* Returns true if the installed libcurl was built with support for HTTP2.
|
|
229
|
+
* For libcurl versions < 7.33.0, always returns false.
|
|
230
|
+
*/
|
|
231
|
+
static VALUE ruby_curl_http2_q(VALUE mod) {
|
|
232
|
+
#ifdef HAVE_CURL_VERSION_HTTP2
|
|
233
|
+
curl_version_info_data *ver = curl_version_info(CURLVERSION_NOW);
|
|
234
|
+
return((ver->features & CURL_VERSION_HTTP2) ? Qtrue : Qfalse);
|
|
235
|
+
#else
|
|
236
|
+
return Qfalse;
|
|
237
|
+
#endif
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
static void finalize_curb_core(VALUE data) {
|
|
241
|
+
curl_global_cleanup();
|
|
242
|
+
}
|
|
243
|
+
|
|
222
244
|
void Init_curb_core() {
|
|
223
|
-
// TODO we need to call curl_global_cleanup at exit!
|
|
224
245
|
curl_version_info_data *ver;
|
|
225
246
|
VALUE curlver, curllongver, curlvernum;
|
|
226
247
|
|
|
227
248
|
curl_global_init(CURL_GLOBAL_ALL);
|
|
249
|
+
rb_set_end_proc(finalize_curb_core, Qnil);
|
|
228
250
|
ver = curl_version_info(CURLVERSION_NOW);
|
|
229
251
|
|
|
230
252
|
mCurl = rb_define_module("Curl");
|
|
@@ -242,306 +264,407 @@ void Init_curb_core() {
|
|
|
242
264
|
rb_define_const(mCurl, "CURL_LONG_VERSION", curllongver);
|
|
243
265
|
|
|
244
266
|
/* Passed to on_debug handler to indicate that the data is informational text. */
|
|
245
|
-
rb_define_const(mCurl, "CURLINFO_TEXT",
|
|
267
|
+
rb_define_const(mCurl, "CURLINFO_TEXT", LONG2NUM(CURLINFO_TEXT));
|
|
246
268
|
|
|
247
269
|
/* Passed to on_debug handler to indicate that the data is header (or header-like) data received from the peer. */
|
|
248
|
-
rb_define_const(mCurl, "CURLINFO_HEADER_IN",
|
|
270
|
+
rb_define_const(mCurl, "CURLINFO_HEADER_IN", LONG2NUM(CURLINFO_HEADER_IN));
|
|
249
271
|
|
|
250
272
|
/* Passed to on_debug handler to indicate that the data is header (or header-like) data sent to the peer. */
|
|
251
|
-
rb_define_const(mCurl, "CURLINFO_HEADER_OUT",
|
|
273
|
+
rb_define_const(mCurl, "CURLINFO_HEADER_OUT", LONG2NUM(CURLINFO_HEADER_OUT));
|
|
252
274
|
|
|
253
275
|
/* Passed to on_debug handler to indicate that the data is protocol data received from the peer. */
|
|
254
|
-
rb_define_const(mCurl, "CURLINFO_DATA_IN",
|
|
276
|
+
rb_define_const(mCurl, "CURLINFO_DATA_IN", LONG2NUM(CURLINFO_DATA_IN));
|
|
255
277
|
|
|
256
278
|
/* Passed to on_debug handler to indicate that the data is protocol data sent to the peer. */
|
|
257
|
-
rb_define_const(mCurl, "CURLINFO_DATA_OUT",
|
|
279
|
+
rb_define_const(mCurl, "CURLINFO_DATA_OUT", LONG2NUM(CURLINFO_DATA_OUT));
|
|
258
280
|
|
|
259
|
-
#ifdef HAVE_CURLFTPMETHOD_MULTICWD
|
|
260
|
-
rb_define_const(mCurl, "CURL_MULTICWD",
|
|
281
|
+
#ifdef HAVE_CURLFTPMETHOD_MULTICWD
|
|
282
|
+
rb_define_const(mCurl, "CURL_MULTICWD", LONG2NUM(CURLFTPMETHOD_MULTICWD));
|
|
261
283
|
#endif
|
|
262
284
|
|
|
263
|
-
#ifdef HAVE_CURLFTPMETHOD_NOCWD
|
|
264
|
-
rb_define_const(mCurl, "CURL_NOCWD",
|
|
285
|
+
#ifdef HAVE_CURLFTPMETHOD_NOCWD
|
|
286
|
+
rb_define_const(mCurl, "CURL_NOCWD", LONG2NUM(CURLFTPMETHOD_NOCWD));
|
|
265
287
|
#endif
|
|
266
288
|
|
|
267
|
-
#ifdef HAVE_CURLFTPMETHOD_SINGLECWD
|
|
268
|
-
rb_define_const(mCurl, "CURL_SINGLECWD",
|
|
289
|
+
#ifdef HAVE_CURLFTPMETHOD_SINGLECWD
|
|
290
|
+
rb_define_const(mCurl, "CURL_SINGLECWD", LONG2NUM(CURLFTPMETHOD_SINGLECWD));
|
|
269
291
|
#endif
|
|
270
292
|
|
|
271
293
|
/* When passed to Curl::Easy#proxy_type , indicates that the proxy is an HTTP proxy. (libcurl >= 7.10) */
|
|
272
294
|
#ifdef HAVE_CURLPROXY_HTTP
|
|
273
|
-
rb_define_const(mCurl, "CURLPROXY_HTTP",
|
|
295
|
+
rb_define_const(mCurl, "CURLPROXY_HTTP", LONG2NUM(CURLPROXY_HTTP));
|
|
274
296
|
#else
|
|
275
|
-
rb_define_const(mCurl, "CURLPROXY_HTTP",
|
|
297
|
+
rb_define_const(mCurl, "CURLPROXY_HTTP", LONG2NUM(-1));
|
|
276
298
|
#endif
|
|
277
299
|
|
|
278
300
|
#ifdef CURL_VERSION_SSL
|
|
279
|
-
rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT",
|
|
280
|
-
rb_define_const(mCurl, "
|
|
281
|
-
rb_define_const(mCurl, "
|
|
282
|
-
rb_define_const(mCurl, "
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
rb_define_const(mCurl, "
|
|
286
|
-
rb_define_const(mCurl, "
|
|
287
|
-
|
|
301
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT", LONG2NUM(CURL_SSLVERSION_DEFAULT));
|
|
302
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_MAX_DEFAULT", LONG2NUM(CURL_SSLVERSION_MAX_DEFAULT));
|
|
303
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", LONG2NUM(CURL_SSLVERSION_TLSv1));
|
|
304
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", LONG2NUM(CURL_SSLVERSION_SSLv2));
|
|
305
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", LONG2NUM(CURL_SSLVERSION_SSLv3));
|
|
306
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSV1_0
|
|
307
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_0", LONG2NUM(CURL_SSLVERSION_TLSv1_0));
|
|
308
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_0", LONG2NUM(CURL_SSLVERSION_MAX_TLSv1_0));
|
|
309
|
+
#endif
|
|
310
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSV1_1
|
|
311
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_1", LONG2NUM(CURL_SSLVERSION_TLSv1_1));
|
|
312
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_1", LONG2NUM(CURL_SSLVERSION_MAX_TLSv1_1));
|
|
313
|
+
#endif
|
|
314
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSV1_2
|
|
315
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_2", LONG2NUM(CURL_SSLVERSION_TLSv1_2));
|
|
316
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_2", LONG2NUM(CURL_SSLVERSION_MAX_TLSv1_2));
|
|
317
|
+
#endif
|
|
318
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSV1_3
|
|
319
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_3", LONG2NUM(CURL_SSLVERSION_TLSv1_3));
|
|
320
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_3", LONG2NUM(CURL_SSLVERSION_MAX_TLSv1_3));
|
|
321
|
+
#endif
|
|
322
|
+
|
|
323
|
+
rb_define_const(mCurl, "CURL_USESSL_CONTROL", LONG2NUM(CURB_FTPSSL_CONTROL));
|
|
324
|
+
rb_define_const(mCurl, "CURL_USESSL_NONE", LONG2NUM(CURB_FTPSSL_NONE));
|
|
325
|
+
rb_define_const(mCurl, "CURL_USESSL_TRY", LONG2NUM(CURB_FTPSSL_TRY));
|
|
326
|
+
rb_define_const(mCurl, "CURL_USESSL_ALL", LONG2NUM(CURB_FTPSSL_ALL));
|
|
288
327
|
#else
|
|
289
|
-
rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT",
|
|
290
|
-
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1",
|
|
291
|
-
rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2",
|
|
292
|
-
rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3",
|
|
328
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_DEFAULT", LONG2NUM(-1));
|
|
329
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1", LONG2NUM(-1));
|
|
330
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_SSLv2", LONG2NUM(-1));
|
|
331
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_SSLv3", LONG2NUM(-1));
|
|
332
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSv1_0
|
|
333
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_0", LONG2NUM(-1));
|
|
334
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_0", LONG2NUM(-1));
|
|
335
|
+
#endif
|
|
336
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSv1_1
|
|
337
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_1", LONG2NUM(-1));
|
|
338
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_1", LONG2NUM(-1));
|
|
339
|
+
#endif
|
|
340
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSv1_2
|
|
341
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_2", LONG2NUM(-1));
|
|
342
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_2", LONG2NUM(-1));
|
|
343
|
+
#endif
|
|
344
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSv1_3
|
|
345
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_TLSv1_3", LONG2NUM(-1));
|
|
346
|
+
rb_define_const(mCurl, "CURL_SSLVERSION_MAX_TLSv1_3", LONG2NUM(-1));
|
|
347
|
+
#endif
|
|
293
348
|
|
|
294
|
-
rb_define_const(mCurl, "CURL_USESSL_CONTROL",
|
|
295
|
-
rb_define_const(mCurl, "CURL_USESSL_NONE",
|
|
296
|
-
rb_define_const(mCurl, "CURL_USESSL_TRY",
|
|
297
|
-
rb_define_const(mCurl, "CURL_USESSL_ALL",
|
|
349
|
+
rb_define_const(mCurl, "CURL_USESSL_CONTROL", LONG2NUM(-1));
|
|
350
|
+
rb_define_const(mCurl, "CURL_USESSL_NONE", LONG2NUM(-1));
|
|
351
|
+
rb_define_const(mCurl, "CURL_USESSL_TRY", LONG2NUM(-1));
|
|
352
|
+
rb_define_const(mCurl, "CURL_USESSL_ALL", LONG2NUM(-1));
|
|
298
353
|
#endif
|
|
299
354
|
|
|
300
355
|
/* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS4 proxy. (libcurl >= 7.15.2) */
|
|
301
356
|
#ifdef HAVE_CURLPROXY_SOCKS4
|
|
302
|
-
rb_define_const(mCurl, "CURLPROXY_SOCKS4",
|
|
357
|
+
rb_define_const(mCurl, "CURLPROXY_SOCKS4", LONG2NUM(CURLPROXY_SOCKS4));
|
|
303
358
|
#else
|
|
304
|
-
rb_define_const(mCurl, "CURLPROXY_SOCKS4",
|
|
359
|
+
rb_define_const(mCurl, "CURLPROXY_SOCKS4", LONG2NUM(-2));
|
|
360
|
+
#endif
|
|
361
|
+
|
|
362
|
+
/* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS4A proxy. (libcurl >= 7.18.0) */
|
|
363
|
+
#ifdef HAVE_CURLPROXY_SOCKS4A
|
|
364
|
+
rb_define_const(mCurl, "CURLPROXY_SOCKS4A", LONG2NUM(CURLPROXY_SOCKS4A));
|
|
365
|
+
#else
|
|
366
|
+
rb_define_const(mCurl, "CURLPROXY_SOCKS4A", LONG2NUM(-2));
|
|
305
367
|
#endif
|
|
306
368
|
|
|
307
369
|
/* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS5 proxy. (libcurl >= 7.10) */
|
|
308
370
|
#ifdef HAVE_CURLPROXY_SOCKS5
|
|
309
|
-
rb_define_const(mCurl, "CURLPROXY_SOCKS5",
|
|
371
|
+
rb_define_const(mCurl, "CURLPROXY_SOCKS5", LONG2NUM(CURLPROXY_SOCKS5));
|
|
310
372
|
#else
|
|
311
|
-
rb_define_const(mCurl, "CURLPROXY_SOCKS5",
|
|
373
|
+
rb_define_const(mCurl, "CURLPROXY_SOCKS5", LONG2NUM(-2));
|
|
374
|
+
#endif
|
|
375
|
+
|
|
376
|
+
/* When passed to Curl::Easy#proxy_type , indicates that the proxy is a SOCKS5 proxy (and that the proxy should resolve the hostname). (libcurl >= 7.17.2) */
|
|
377
|
+
#ifdef HAVE_CURLPROXY_SOCKS5_HOSTNAME
|
|
378
|
+
rb_define_const(mCurl, "CURLPROXY_SOCKS5_HOSTNAME", LONG2NUM(CURLPROXY_SOCKS5_HOSTNAME));
|
|
379
|
+
#else
|
|
380
|
+
rb_define_const(mCurl, "CURLPROXY_SOCKS5_HOSTNAME", LONG2NUM(-2));
|
|
312
381
|
#endif
|
|
313
382
|
|
|
314
383
|
/* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use Basic authentication. */
|
|
315
384
|
#ifdef HAVE_CURLAUTH_BASIC
|
|
316
|
-
rb_define_const(mCurl, "CURLAUTH_BASIC",
|
|
385
|
+
rb_define_const(mCurl, "CURLAUTH_BASIC", LONG2NUM(CURLAUTH_BASIC));
|
|
317
386
|
#else
|
|
318
|
-
rb_define_const(mCurl, "CURLAUTH_BASIC",
|
|
387
|
+
rb_define_const(mCurl, "CURLAUTH_BASIC", LONG2NUM(0));
|
|
319
388
|
#endif
|
|
320
389
|
|
|
321
390
|
/* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use Digest authentication. */
|
|
322
391
|
#ifdef HAVE_CURLAUTH_DIGEST
|
|
323
|
-
rb_define_const(mCurl, "CURLAUTH_DIGEST",
|
|
392
|
+
rb_define_const(mCurl, "CURLAUTH_DIGEST", LONG2NUM(CURLAUTH_DIGEST));
|
|
324
393
|
#else
|
|
325
|
-
rb_define_const(mCurl, "CURLAUTH_DIGEST",
|
|
394
|
+
rb_define_const(mCurl, "CURLAUTH_DIGEST", LONG2NUM(0));
|
|
326
395
|
#endif
|
|
327
396
|
|
|
328
397
|
/* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use GSS Negotiate authentication. Requires a suitable GSS-API library. */
|
|
329
398
|
#ifdef HAVE_CURLAUTH_GSSNEGOTIATE
|
|
330
|
-
rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE",
|
|
399
|
+
rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE", LONG2NUM(CURLAUTH_GSSNEGOTIATE));
|
|
331
400
|
#else
|
|
332
|
-
rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE",
|
|
401
|
+
rb_define_const(mCurl, "CURLAUTH_GSSNEGOTIATE", LONG2NUM(0));
|
|
333
402
|
#endif
|
|
334
403
|
|
|
335
404
|
/* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, directs libcurl to use HTTP NTLM authentication. Requires MS Windows or OpenSSL support. */
|
|
336
405
|
#ifdef HAVE_CURLAUTH_NTLM
|
|
337
|
-
rb_define_const(mCurl, "CURLAUTH_NTLM",
|
|
406
|
+
rb_define_const(mCurl, "CURLAUTH_NTLM", LONG2NUM(CURLAUTH_NTLM));
|
|
338
407
|
#else
|
|
339
|
-
rb_define_const(mCurl, "CURLAUTH_NTLM",
|
|
408
|
+
rb_define_const(mCurl, "CURLAUTH_NTLM", LONG2NUM(0));
|
|
340
409
|
#endif
|
|
341
410
|
|
|
342
411
|
/* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, allows libcurl to select any suitable authentication method except basic. */
|
|
343
412
|
#ifdef HAVE_CURLAUTH_ANYSAFE
|
|
344
|
-
rb_define_const(mCurl, "CURLAUTH_ANYSAFE",
|
|
413
|
+
rb_define_const(mCurl, "CURLAUTH_ANYSAFE", LONG2NUM(CURLAUTH_ANYSAFE));
|
|
345
414
|
#else
|
|
346
|
-
rb_define_const(mCurl, "CURLAUTH_ANYSAFE",
|
|
415
|
+
rb_define_const(mCurl, "CURLAUTH_ANYSAFE", LONG2NUM(0));
|
|
347
416
|
#endif
|
|
348
417
|
|
|
349
418
|
/* When passed to Curl::Easy#http_auth_types or Curl::Easy#proxy_auth_types, allows libcurl to select any suitable authentication method. */
|
|
350
419
|
#ifdef HAVE_CURLAUTH_ANY
|
|
351
|
-
rb_define_const(mCurl, "CURLAUTH_ANY",
|
|
420
|
+
rb_define_const(mCurl, "CURLAUTH_ANY", LONG2NUM(CURLAUTH_ANY));
|
|
352
421
|
#else
|
|
353
|
-
rb_define_const(mCurl, "CURLAUTH_ANY",
|
|
422
|
+
rb_define_const(mCurl, "CURLAUTH_ANY", LONG2NUM(0));
|
|
354
423
|
#endif
|
|
355
424
|
|
|
356
425
|
CURB_DEFINE(CURLOPT_VERBOSE);
|
|
357
426
|
CURB_DEFINE(CURLOPT_HEADER);
|
|
358
427
|
CURB_DEFINE(CURLOPT_NOPROGRESS);
|
|
359
428
|
CURB_DEFINE(CURLOPT_NOSIGNAL);
|
|
429
|
+
#ifdef HAVE_CURLOPT_PATH_AS_IS
|
|
430
|
+
CURB_DEFINE(CURLOPT_PATH_AS_IS);
|
|
431
|
+
#endif
|
|
360
432
|
CURB_DEFINE(CURLOPT_WRITEFUNCTION);
|
|
361
433
|
CURB_DEFINE(CURLOPT_WRITEDATA);
|
|
362
434
|
CURB_DEFINE(CURLOPT_READFUNCTION);
|
|
363
435
|
CURB_DEFINE(CURLOPT_READDATA);
|
|
436
|
+
/* CURLOPT_IOCTLFUNCTION/DATA deprecated since 7.18.0, use SEEKFUNCTION/DATA */
|
|
437
|
+
#ifdef HAVE_CURLOPT_IOCTLFUNCTION
|
|
364
438
|
CURB_DEFINE(CURLOPT_IOCTLFUNCTION);
|
|
439
|
+
#endif
|
|
440
|
+
#ifdef HAVE_CURLOPT_IOCTLDATA
|
|
365
441
|
CURB_DEFINE(CURLOPT_IOCTLDATA);
|
|
366
|
-
#
|
|
442
|
+
#endif
|
|
443
|
+
#ifdef HAVE_CURLOPT_SEEKFUNCTION
|
|
367
444
|
CURB_DEFINE(CURLOPT_SEEKFUNCTION);
|
|
368
445
|
#endif
|
|
369
|
-
#
|
|
446
|
+
#ifdef HAVE_CURLOPT_SEEKDATA
|
|
370
447
|
CURB_DEFINE(CURLOPT_SEEKDATA);
|
|
371
448
|
#endif
|
|
372
|
-
#
|
|
449
|
+
#ifdef HAVE_CURLOPT_SOCKOPTFUNCTION
|
|
373
450
|
CURB_DEFINE(CURLOPT_SOCKOPTFUNCTION);
|
|
374
451
|
#endif
|
|
375
|
-
#
|
|
452
|
+
#ifdef HAVE_CURLOPT_SOCKOPTDATA
|
|
376
453
|
CURB_DEFINE(CURLOPT_SOCKOPTDATA);
|
|
377
454
|
#endif
|
|
378
|
-
#
|
|
455
|
+
#ifdef HAVE_CURLOPT_OPENSOCKETFUNCTION
|
|
379
456
|
CURB_DEFINE(CURLOPT_OPENSOCKETFUNCTION);
|
|
380
457
|
#endif
|
|
381
|
-
#
|
|
458
|
+
#ifdef HAVE_CURLOPT_OPENSOCKETDATA
|
|
382
459
|
CURB_DEFINE(CURLOPT_OPENSOCKETDATA);
|
|
383
460
|
#endif
|
|
461
|
+
/* CURLOPT_PROGRESSFUNCTION deprecated since 7.32.0, use XFERINFOFUNCTION */
|
|
462
|
+
#ifdef HAVE_CURLOPT_PROGRESSFUNCTION
|
|
384
463
|
CURB_DEFINE(CURLOPT_PROGRESSFUNCTION);
|
|
464
|
+
#endif
|
|
465
|
+
#ifdef HAVE_CURLOPT_PROGRESSDATA
|
|
385
466
|
CURB_DEFINE(CURLOPT_PROGRESSDATA);
|
|
467
|
+
#endif
|
|
468
|
+
#ifdef HAVE_CURLOPT_XFERINFOFUNCTION
|
|
469
|
+
CURB_DEFINE(CURLOPT_XFERINFOFUNCTION);
|
|
470
|
+
#endif
|
|
471
|
+
#ifdef HAVE_CURLOPT_XFERINFODATA
|
|
472
|
+
CURB_DEFINE(CURLOPT_XFERINFODATA);
|
|
473
|
+
#endif
|
|
386
474
|
CURB_DEFINE(CURLOPT_HEADERFUNCTION);
|
|
387
475
|
CURB_DEFINE(CURLOPT_WRITEHEADER);
|
|
388
476
|
CURB_DEFINE(CURLOPT_DEBUGFUNCTION);
|
|
389
477
|
CURB_DEFINE(CURLOPT_DEBUGDATA);
|
|
390
478
|
CURB_DEFINE(CURLOPT_SSL_CTX_FUNCTION);
|
|
391
479
|
CURB_DEFINE(CURLOPT_SSL_CTX_DATA);
|
|
480
|
+
/* CURLOPT_CONV_* deprecated since 7.82.0, serve no purpose anymore */
|
|
481
|
+
#ifdef HAVE_CURLOPT_CONV_TO_NETWORK_FUNCTION
|
|
392
482
|
CURB_DEFINE(CURLOPT_CONV_TO_NETWORK_FUNCTION);
|
|
483
|
+
#endif
|
|
484
|
+
#ifdef HAVE_CURLOPT_CONV_FROM_NETWORK_FUNCTION
|
|
393
485
|
CURB_DEFINE(CURLOPT_CONV_FROM_NETWORK_FUNCTION);
|
|
486
|
+
#endif
|
|
487
|
+
#ifdef HAVE_CURLOPT_CONV_FROM_UTF8_FUNCTION
|
|
394
488
|
CURB_DEFINE(CURLOPT_CONV_FROM_UTF8_FUNCTION);
|
|
489
|
+
#endif
|
|
395
490
|
|
|
396
|
-
#
|
|
491
|
+
#ifdef HAVE_CURLOPT_INTERLEAVEFUNCTION
|
|
397
492
|
CURB_DEFINE(CURLOPT_INTERLEAVEFUNCTION);
|
|
398
493
|
#endif
|
|
399
|
-
#
|
|
494
|
+
#ifdef HAVE_CURLOPT_INTERLEAVEDATA
|
|
400
495
|
CURB_DEFINE(CURLOPT_INTERLEAVEDATA);
|
|
401
496
|
#endif
|
|
402
|
-
#
|
|
497
|
+
#ifdef HAVE_CURLOPT_CHUNK_BGN_FUNCTION
|
|
403
498
|
CURB_DEFINE(CURLOPT_CHUNK_BGN_FUNCTION);
|
|
404
499
|
#endif
|
|
405
|
-
#
|
|
500
|
+
#ifdef HAVE_CURLOPT_CHUNK_END_FUNCTION
|
|
406
501
|
CURB_DEFINE(CURLOPT_CHUNK_END_FUNCTION);
|
|
407
502
|
#endif
|
|
408
|
-
#
|
|
503
|
+
#ifdef HAVE_CURLOPT_CHUNK_DATA
|
|
409
504
|
CURB_DEFINE(CURLOPT_CHUNK_DATA);
|
|
410
505
|
#endif
|
|
411
|
-
#
|
|
506
|
+
#ifdef HAVE_CURLOPT_FNMATCH_FUNCTION
|
|
412
507
|
CURB_DEFINE(CURLOPT_FNMATCH_FUNCTION);
|
|
413
508
|
#endif
|
|
414
|
-
#
|
|
509
|
+
#ifdef HAVE_CURLOPT_FNMATCH_DATA
|
|
415
510
|
CURB_DEFINE(CURLOPT_FNMATCH_DATA);
|
|
416
511
|
#endif
|
|
417
|
-
#
|
|
512
|
+
#ifdef HAVE_CURLOPT_ERRORBUFFER
|
|
418
513
|
CURB_DEFINE(CURLOPT_ERRORBUFFER);
|
|
419
514
|
#endif
|
|
420
|
-
#
|
|
515
|
+
#ifdef HAVE_CURLOPT_STDERR
|
|
421
516
|
CURB_DEFINE(CURLOPT_STDERR);
|
|
422
517
|
#endif
|
|
423
|
-
#
|
|
518
|
+
#ifdef HAVE_CURLOPT_FAILONERROR
|
|
424
519
|
CURB_DEFINE(CURLOPT_FAILONERROR);
|
|
425
520
|
#endif
|
|
426
521
|
CURB_DEFINE(CURLOPT_URL);
|
|
427
|
-
|
|
522
|
+
/* CURLOPT_PROTOCOLS deprecated since 7.85.0, use CURLOPT_PROTOCOLS_STR */
|
|
523
|
+
#ifdef HAVE_CURLOPT_PROTOCOLS
|
|
428
524
|
CURB_DEFINE(CURLOPT_PROTOCOLS);
|
|
429
525
|
#endif
|
|
430
|
-
#
|
|
526
|
+
#ifdef HAVE_CURLOPT_PROTOCOLS_STR
|
|
527
|
+
CURB_DEFINE(CURLOPT_PROTOCOLS_STR);
|
|
528
|
+
#endif
|
|
529
|
+
/* CURLOPT_REDIR_PROTOCOLS deprecated since 7.85.0, use CURLOPT_REDIR_PROTOCOLS_STR */
|
|
530
|
+
#ifdef HAVE_CURLOPT_REDIR_PROTOCOLS
|
|
431
531
|
CURB_DEFINE(CURLOPT_REDIR_PROTOCOLS);
|
|
532
|
+
#endif
|
|
533
|
+
#ifdef HAVE_CURLOPT_REDIR_PROTOCOLS_STR
|
|
534
|
+
CURB_DEFINE(CURLOPT_REDIR_PROTOCOLS_STR);
|
|
432
535
|
#endif
|
|
433
536
|
CURB_DEFINE(CURLOPT_PROXY);
|
|
434
537
|
CURB_DEFINE(CURLOPT_PROXYPORT);
|
|
435
|
-
#
|
|
538
|
+
#ifdef HAVE_CURLOPT_PROXYTYPE
|
|
436
539
|
CURB_DEFINE(CURLOPT_PROXYTYPE);
|
|
437
540
|
#endif
|
|
438
|
-
#
|
|
541
|
+
#ifdef HAVE_CURLOPT_NOPROXY
|
|
439
542
|
CURB_DEFINE(CURLOPT_NOPROXY);
|
|
440
543
|
#endif
|
|
441
544
|
CURB_DEFINE(CURLOPT_HTTPPROXYTUNNEL);
|
|
442
|
-
|
|
545
|
+
/* CURLOPT_SOCKS5_GSSAPI_SERVICE deprecated since 7.49.0, use CURLOPT_PROXY_SERVICE_NAME */
|
|
546
|
+
#ifdef HAVE_CURLOPT_SOCKS5_GSSAPI_SERVICE
|
|
443
547
|
CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_SERVICE);
|
|
444
548
|
#endif
|
|
445
|
-
#
|
|
549
|
+
#ifdef HAVE_CURLOPT_PROXY_SERVICE_NAME
|
|
550
|
+
CURB_DEFINE(CURLOPT_PROXY_SERVICE_NAME);
|
|
551
|
+
#endif
|
|
552
|
+
#ifdef HAVE_CURLOPT_SOCKS5_GSSAPI_NEC
|
|
446
553
|
CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_NEC);
|
|
447
554
|
#endif
|
|
448
555
|
CURB_DEFINE(CURLOPT_INTERFACE);
|
|
449
|
-
#
|
|
556
|
+
#ifdef HAVE_CURLOPT_LOCALPORT
|
|
450
557
|
CURB_DEFINE(CURLOPT_LOCALPORT);
|
|
451
558
|
#endif
|
|
452
559
|
CURB_DEFINE(CURLOPT_DNS_CACHE_TIMEOUT);
|
|
560
|
+
/* CURLOPT_DNS_USE_GLOBAL_CACHE deprecated since 7.11.1, does nothing since 7.62.0 */
|
|
561
|
+
#ifdef HAVE_CURLOPT_DNS_USE_GLOBAL_CACHE
|
|
453
562
|
CURB_DEFINE(CURLOPT_DNS_USE_GLOBAL_CACHE);
|
|
563
|
+
#endif
|
|
454
564
|
CURB_DEFINE(CURLOPT_BUFFERSIZE);
|
|
455
565
|
CURB_DEFINE(CURLOPT_PORT);
|
|
456
566
|
CURB_DEFINE(CURLOPT_TCP_NODELAY);
|
|
457
|
-
#
|
|
567
|
+
#ifdef HAVE_CURLOPT_ADDRESS_SCOPE
|
|
458
568
|
CURB_DEFINE(CURLOPT_ADDRESS_SCOPE);
|
|
459
569
|
#endif
|
|
460
570
|
CURB_DEFINE(CURLOPT_NETRC);
|
|
461
571
|
CURB_DEFINE(CURL_NETRC_OPTIONAL);
|
|
462
572
|
CURB_DEFINE(CURL_NETRC_IGNORED);
|
|
463
573
|
CURB_DEFINE(CURL_NETRC_REQUIRED);
|
|
464
|
-
#
|
|
574
|
+
#ifdef HAVE_CURLOPT_NETRC_FILE
|
|
465
575
|
CURB_DEFINE(CURLOPT_NETRC_FILE);
|
|
466
576
|
#endif
|
|
467
577
|
CURB_DEFINE(CURLOPT_USERPWD);
|
|
468
578
|
CURB_DEFINE(CURLOPT_PROXYUSERPWD);
|
|
469
|
-
#
|
|
579
|
+
#ifdef HAVE_CURLOPT_USERNAME
|
|
470
580
|
CURB_DEFINE(CURLOPT_USERNAME);
|
|
471
581
|
#endif
|
|
472
|
-
#
|
|
582
|
+
#ifdef HAVE_CURLOPT_PASSWORD
|
|
473
583
|
CURB_DEFINE(CURLOPT_PASSWORD);
|
|
474
584
|
#endif
|
|
475
|
-
#
|
|
585
|
+
#ifdef HAVE_CURLOPT_PROXYUSERNAME
|
|
476
586
|
CURB_DEFINE(CURLOPT_PASSWORD);
|
|
477
587
|
#endif
|
|
478
|
-
#
|
|
588
|
+
#ifdef HAVE_CURLOPT_PROXYPASSWORD
|
|
479
589
|
CURB_DEFINE(CURLOPT_PASSWORD);
|
|
480
590
|
#endif
|
|
481
591
|
|
|
482
|
-
#
|
|
592
|
+
#ifdef HAVE_CURLOPT_HTTPAUTH
|
|
483
593
|
CURB_DEFINE(CURLOPT_HTTPAUTH);
|
|
484
594
|
#endif
|
|
485
|
-
#
|
|
595
|
+
#ifdef HAVE_CURLAUTH_DIGEST_IE
|
|
486
596
|
CURB_DEFINE(CURLAUTH_DIGEST_IE);
|
|
487
597
|
#endif
|
|
488
|
-
#
|
|
598
|
+
#ifdef HAVE_CURLAUTH_ONLY
|
|
489
599
|
CURB_DEFINE(CURLAUTH_ONLY);
|
|
490
600
|
#endif
|
|
491
|
-
#
|
|
601
|
+
#ifdef HAVE_CURLOPT_TLSAUTH_TYPE
|
|
492
602
|
CURB_DEFINE(CURLOPT_TLSAUTH_TYPE);
|
|
493
603
|
#endif
|
|
494
|
-
#
|
|
604
|
+
#ifdef HAVE_CURLOPT_TLSAUTH_SRP
|
|
495
605
|
CURB_DEFINE(CURLOPT_TLSAUTH_SRP);
|
|
496
606
|
#endif
|
|
497
|
-
#
|
|
607
|
+
#ifdef HAVE_CURLOPT_TLSAUTH_USERNAME
|
|
498
608
|
CURB_DEFINE(CURLOPT_TLSAUTH_USERNAME);
|
|
499
609
|
#endif
|
|
500
|
-
#
|
|
610
|
+
#ifdef HAVE_CURLOPT_TLSAUTH_PASSWORD
|
|
501
611
|
CURB_DEFINE(CURLOPT_TLSAUTH_PASSWORD);
|
|
502
612
|
#endif
|
|
503
|
-
#
|
|
613
|
+
#ifdef HAVE_CURLOPT_PROXYAUTH
|
|
504
614
|
CURB_DEFINE(CURLOPT_PROXYAUTH);
|
|
505
615
|
#endif
|
|
506
|
-
#
|
|
616
|
+
#ifdef HAVE_CURLOPT_AUTOREFERER
|
|
507
617
|
CURB_DEFINE(CURLOPT_AUTOREFERER);
|
|
508
618
|
#endif
|
|
509
|
-
#
|
|
619
|
+
#ifdef HAVE_CURLOPT_ENCODING
|
|
510
620
|
CURB_DEFINE(CURLOPT_ENCODING);
|
|
511
621
|
#endif
|
|
512
|
-
#
|
|
622
|
+
#ifdef HAVE_CURLOPT_FOLLOWLOCATION
|
|
513
623
|
CURB_DEFINE(CURLOPT_FOLLOWLOCATION);
|
|
514
624
|
#endif
|
|
515
|
-
#
|
|
625
|
+
#ifdef HAVE_CURLOPT_UNRESTRICTED_AUTH
|
|
516
626
|
CURB_DEFINE(CURLOPT_UNRESTRICTED_AUTH);
|
|
517
627
|
#endif
|
|
518
|
-
#
|
|
628
|
+
#ifdef HAVE_CURLOPT_MAXREDIRS
|
|
519
629
|
CURB_DEFINE(CURLOPT_MAXREDIRS);
|
|
520
630
|
#endif
|
|
521
|
-
#
|
|
631
|
+
#ifdef HAVE_CURLOPT_POSTREDIR
|
|
522
632
|
CURB_DEFINE(CURLOPT_POSTREDIR);
|
|
523
633
|
#endif
|
|
524
|
-
|
|
634
|
+
/* CURLOPT_PUT deprecated since 7.12.1, use CURLOPT_UPLOAD */
|
|
635
|
+
#ifdef HAVE_CURLOPT_PUT
|
|
525
636
|
CURB_DEFINE(CURLOPT_PUT);
|
|
526
637
|
#endif
|
|
527
|
-
#
|
|
638
|
+
#ifdef HAVE_CURLOPT_POST
|
|
528
639
|
CURB_DEFINE(CURLOPT_POST);
|
|
529
640
|
#endif
|
|
530
641
|
CURB_DEFINE(CURLOPT_POSTFIELDS);
|
|
531
642
|
CURB_DEFINE(CURLOPT_POSTFIELDSIZE);
|
|
532
|
-
#
|
|
643
|
+
#ifdef HAVE_CURLOPT_POSTFIELDSIZE_LARGE
|
|
533
644
|
CURB_DEFINE(CURLOPT_POSTFIELDSIZE_LARGE);
|
|
534
645
|
#endif
|
|
535
|
-
#
|
|
646
|
+
#ifdef HAVE_CURLOPT_COPYPOSTFIELDS
|
|
536
647
|
CURB_DEFINE(CURLOPT_COPYPOSTFIELDS);
|
|
537
648
|
#endif
|
|
538
|
-
|
|
649
|
+
/* CURLOPT_HTTPPOST deprecated since 7.56.0, use CURLOPT_MIMEPOST */
|
|
650
|
+
#ifdef HAVE_CURLOPT_HTTPPOST
|
|
539
651
|
CURB_DEFINE(CURLOPT_HTTPPOST);
|
|
652
|
+
#endif
|
|
653
|
+
#ifdef HAVE_CURLOPT_MIMEPOST
|
|
654
|
+
CURB_DEFINE(CURLOPT_MIMEPOST);
|
|
540
655
|
#endif
|
|
541
656
|
CURB_DEFINE(CURLOPT_REFERER);
|
|
542
657
|
CURB_DEFINE(CURLOPT_USERAGENT);
|
|
543
658
|
CURB_DEFINE(CURLOPT_HTTPHEADER);
|
|
544
|
-
#
|
|
659
|
+
#ifdef HAVE_CURLOPT_PROXYHEADER
|
|
660
|
+
CURB_DEFINE(CURLOPT_PROXYHEADER);
|
|
661
|
+
#endif
|
|
662
|
+
#ifdef HAVE_CURLOPT_REQUEST_TARGET
|
|
663
|
+
/* Allows overriding the Request-URI target used in the request line.
|
|
664
|
+
* Useful for absolute-form requests or special targets like "*". */
|
|
665
|
+
CURB_DEFINE(CURLOPT_REQUEST_TARGET);
|
|
666
|
+
#endif
|
|
667
|
+
#ifdef HAVE_CURLOPT_HTTP200ALIASES
|
|
545
668
|
CURB_DEFINE(CURLOPT_HTTP200ALIASES);
|
|
546
669
|
#endif
|
|
547
670
|
|
|
@@ -549,412 +672,607 @@ void Init_curb_core() {
|
|
|
549
672
|
CURB_DEFINE(CURLOPT_COOKIEFILE);
|
|
550
673
|
CURB_DEFINE(CURLOPT_COOKIEJAR);
|
|
551
674
|
|
|
552
|
-
#
|
|
675
|
+
#ifdef HAVE_CURLOPT_COOKIESESSION
|
|
553
676
|
CURB_DEFINE(CURLOPT_COOKIESESSION);
|
|
554
677
|
#endif
|
|
555
|
-
#
|
|
678
|
+
#ifdef HAVE_CURLOPT_COOKIELIST
|
|
556
679
|
CURB_DEFINE(CURLOPT_COOKIELIST);
|
|
557
680
|
#endif
|
|
558
|
-
#
|
|
681
|
+
#ifdef HAVE_CURLOPT_HTTPGET
|
|
559
682
|
CURB_DEFINE(CURLOPT_HTTPGET);
|
|
560
683
|
#endif
|
|
561
684
|
CURB_DEFINE(CURLOPT_HTTP_VERSION);
|
|
562
685
|
CURB_DEFINE(CURL_HTTP_VERSION_NONE);
|
|
563
686
|
CURB_DEFINE(CURL_HTTP_VERSION_1_0);
|
|
564
687
|
CURB_DEFINE(CURL_HTTP_VERSION_1_1);
|
|
565
|
-
#if
|
|
688
|
+
#if LIBCURL_VERSION_NUM >= 0x072100 /* 7.33.0 */
|
|
689
|
+
CURB_DEFINE(CURL_HTTP_VERSION_2_0);
|
|
690
|
+
#endif
|
|
691
|
+
#if LIBCURL_VERSION_NUM >= 0x072f00 /* 7.47.0 */
|
|
692
|
+
CURB_DEFINE(CURL_HTTP_VERSION_2TLS);
|
|
693
|
+
#endif
|
|
694
|
+
#ifdef HAVE_CURLOPT_IGNORE_CONTENT_LENGTH
|
|
566
695
|
CURB_DEFINE(CURLOPT_IGNORE_CONTENT_LENGTH);
|
|
567
696
|
#endif
|
|
568
|
-
#
|
|
697
|
+
#ifdef HAVE_CURLOPT_HTTP_CONTENT_DECODING
|
|
569
698
|
CURB_DEFINE(CURLOPT_HTTP_CONTENT_DECODING);
|
|
570
699
|
#endif
|
|
571
|
-
#
|
|
700
|
+
#ifdef HAVE_CURLOPT_HTTP_TRANSFER_DECODING
|
|
572
701
|
CURB_DEFINE(CURLOPT_HTTP_TRANSFER_DECODING);
|
|
573
702
|
#endif
|
|
574
|
-
#
|
|
703
|
+
#ifdef HAVE_CURLOPT_MAIL_FROM
|
|
575
704
|
CURB_DEFINE(CURLOPT_MAIL_FROM);
|
|
576
705
|
#endif
|
|
577
|
-
#
|
|
706
|
+
#ifdef HAVE_CURLOPT_MAIL_RCPT
|
|
578
707
|
CURB_DEFINE(CURLOPT_MAIL_RCPT);
|
|
579
708
|
#endif
|
|
580
|
-
#
|
|
709
|
+
#ifdef HAVE_CURLOPT_TFTP_BLKSIZE
|
|
581
710
|
CURB_DEFINE(CURLOPT_TFTP_BLKSIZE);
|
|
582
711
|
#endif
|
|
583
|
-
#
|
|
712
|
+
#ifdef HAVE_CURLOPT_FTPPORT
|
|
584
713
|
CURB_DEFINE(CURLOPT_FTPPORT);
|
|
585
714
|
#endif
|
|
586
|
-
#
|
|
715
|
+
#ifdef HAVE_CURLOPT_QUOTE
|
|
587
716
|
CURB_DEFINE(CURLOPT_QUOTE);
|
|
588
717
|
#endif
|
|
589
|
-
#
|
|
718
|
+
#ifdef HAVE_CURLOPT_POSTQUOTE
|
|
590
719
|
CURB_DEFINE(CURLOPT_POSTQUOTE);
|
|
591
720
|
#endif
|
|
592
|
-
#
|
|
721
|
+
#ifdef HAVE_CURLOPT_PREQUOTE
|
|
593
722
|
CURB_DEFINE(CURLOPT_PREQUOTE);
|
|
594
723
|
#endif
|
|
595
|
-
#
|
|
724
|
+
#ifdef HAVE_CURLOPT_DIRLISTONLY
|
|
596
725
|
CURB_DEFINE(CURLOPT_DIRLISTONLY);
|
|
597
726
|
#endif
|
|
598
|
-
#
|
|
727
|
+
#ifdef HAVE_CURLOPT_APPEND
|
|
599
728
|
CURB_DEFINE(CURLOPT_APPEND);
|
|
600
729
|
#endif
|
|
601
|
-
#
|
|
730
|
+
#ifdef HAVE_CURLOPT_FTP_USE_EPRT
|
|
602
731
|
CURB_DEFINE(CURLOPT_FTP_USE_EPRT);
|
|
603
732
|
#endif
|
|
604
|
-
#
|
|
733
|
+
#ifdef HAVE_CURLOPT_FTP_USE_EPSV
|
|
605
734
|
CURB_DEFINE(CURLOPT_FTP_USE_EPSV);
|
|
606
735
|
#endif
|
|
607
|
-
#
|
|
736
|
+
#ifdef HAVE_CURLOPT_FTP_USE_PRET
|
|
608
737
|
CURB_DEFINE(CURLOPT_FTP_USE_PRET);
|
|
609
738
|
#endif
|
|
610
|
-
#
|
|
739
|
+
#ifdef HAVE_CURLOPT_FTP_CREATE_MISSING_DIRS
|
|
611
740
|
CURB_DEFINE(CURLOPT_FTP_CREATE_MISSING_DIRS);
|
|
612
741
|
#endif
|
|
613
|
-
#
|
|
742
|
+
#ifdef HAVE_CURLOPT_FTP_RESPONSE_TIMEOUT
|
|
614
743
|
CURB_DEFINE(CURLOPT_FTP_RESPONSE_TIMEOUT);
|
|
615
744
|
#endif
|
|
616
|
-
#
|
|
745
|
+
#ifdef HAVE_CURLOPT_FTP_ALTERNATIVE_TO_USER
|
|
617
746
|
CURB_DEFINE(CURLOPT_FTP_ALTERNATIVE_TO_USER);
|
|
618
747
|
#endif
|
|
619
|
-
#
|
|
748
|
+
#ifdef HAVE_CURLOPT_FTP_SKIP_PASV_IP
|
|
620
749
|
CURB_DEFINE(CURLOPT_FTP_SKIP_PASV_IP);
|
|
621
750
|
#endif
|
|
622
|
-
#
|
|
751
|
+
#ifdef HAVE_CURLOPT_FTPSSLAUTH
|
|
623
752
|
CURB_DEFINE(CURLOPT_FTPSSLAUTH);
|
|
624
753
|
#endif
|
|
625
|
-
#
|
|
754
|
+
#ifdef HAVE_CURLFTPAUTH_DEFAULT
|
|
626
755
|
CURB_DEFINE(CURLFTPAUTH_DEFAULT);
|
|
627
756
|
#endif
|
|
628
|
-
#
|
|
757
|
+
#ifdef HAVE_CURLFTPAUTH_SSL
|
|
629
758
|
CURB_DEFINE(CURLFTPAUTH_SSL);
|
|
630
759
|
#endif
|
|
631
|
-
#
|
|
760
|
+
#ifdef HAVE_CURLFTPAUTH_TLS
|
|
632
761
|
CURB_DEFINE(CURLFTPAUTH_TLS);
|
|
633
762
|
#endif
|
|
634
|
-
#
|
|
763
|
+
#ifdef HAVE_CURLOPT_FTP_SSL_CCC
|
|
635
764
|
CURB_DEFINE(CURLOPT_FTP_SSL_CCC);
|
|
636
765
|
#endif
|
|
637
|
-
#
|
|
766
|
+
#ifdef HAVE_CURLFTPSSL_CCC_NONE
|
|
638
767
|
CURB_DEFINE(CURLFTPSSL_CCC_NONE);
|
|
639
768
|
#endif
|
|
640
|
-
#
|
|
769
|
+
#ifdef HAVE_CURLFTPSSL_CCC_PASSIVE
|
|
641
770
|
CURB_DEFINE(CURLFTPSSL_CCC_PASSIVE);
|
|
642
771
|
#endif
|
|
643
|
-
#
|
|
772
|
+
#ifdef HAVE_CURLFTPSSL_CCC_ACTIVE
|
|
644
773
|
CURB_DEFINE(CURLFTPSSL_CCC_ACTIVE);
|
|
645
774
|
#endif
|
|
646
|
-
#
|
|
775
|
+
#ifdef HAVE_CURLOPT_FTP_ACCOUNT
|
|
647
776
|
CURB_DEFINE(CURLOPT_FTP_ACCOUNT);
|
|
648
777
|
#endif
|
|
649
|
-
#
|
|
778
|
+
#ifdef HAVE_CURLOPT_FTP_FILEMETHOD
|
|
650
779
|
CURB_DEFINE(CURLOPT_FTP_FILEMETHOD);
|
|
651
780
|
#endif
|
|
652
|
-
#
|
|
781
|
+
#ifdef HAVE_CURLFTPMETHOD_MULTICWD
|
|
653
782
|
CURB_DEFINE(CURLFTPMETHOD_MULTICWD);
|
|
654
783
|
#endif
|
|
655
|
-
#
|
|
784
|
+
#ifdef HAVE_CURLFTPMETHOD_NOCWD
|
|
656
785
|
CURB_DEFINE(CURLFTPMETHOD_NOCWD);
|
|
657
786
|
#endif
|
|
658
|
-
#
|
|
787
|
+
#ifdef HAVE_CURLFTPMETHOD_SINGLECWD
|
|
659
788
|
CURB_DEFINE(CURLFTPMETHOD_SINGLECWD);
|
|
660
789
|
#endif
|
|
661
|
-
#
|
|
790
|
+
#ifdef HAVE_CURLOPT_RTSP_REQUEST
|
|
662
791
|
CURB_DEFINE(CURLOPT_RTSP_REQUEST);
|
|
663
792
|
#endif
|
|
664
|
-
#
|
|
793
|
+
#ifdef HAVE_CURL_RTSPREQ_OPTIONS
|
|
665
794
|
CURB_DEFINE(CURL_RTSPREQ_OPTIONS);
|
|
666
795
|
#endif
|
|
667
|
-
#
|
|
796
|
+
#ifdef HAVE_CURL_RTSPREQ_DESCRIBE
|
|
668
797
|
CURB_DEFINE(CURL_RTSPREQ_DESCRIBE);
|
|
669
798
|
#endif
|
|
670
|
-
#
|
|
799
|
+
#ifdef HAVE_CURL_RTSPREQ_ANNOUNCE
|
|
671
800
|
CURB_DEFINE(CURL_RTSPREQ_ANNOUNCE);
|
|
672
801
|
#endif
|
|
673
|
-
#
|
|
802
|
+
#ifdef HAVE_CURL_RTSPREQ_SETUP
|
|
674
803
|
CURB_DEFINE(CURL_RTSPREQ_SETUP);
|
|
675
804
|
#endif
|
|
676
|
-
#
|
|
805
|
+
#ifdef HAVE_CURL_RTSPREQ_PLAY
|
|
677
806
|
CURB_DEFINE(CURL_RTSPREQ_PLAY);
|
|
678
807
|
#endif
|
|
679
|
-
#
|
|
808
|
+
#ifdef HAVE_CURL_RTSPREQ_PAUSE
|
|
680
809
|
CURB_DEFINE(CURL_RTSPREQ_PAUSE);
|
|
681
810
|
#endif
|
|
682
|
-
#
|
|
811
|
+
#ifdef HAVE_CURL_RTSPREQ_TEARDOWN
|
|
683
812
|
CURB_DEFINE(CURL_RTSPREQ_TEARDOWN);
|
|
684
813
|
#endif
|
|
685
|
-
#
|
|
814
|
+
#ifdef HAVE_CURL_RTSPREQ_GET_PARAMETER
|
|
686
815
|
CURB_DEFINE(CURL_RTSPREQ_GET_PARAMETER);
|
|
687
816
|
#endif
|
|
688
|
-
#
|
|
817
|
+
#ifdef HAVE_CURL_RTSPREQ_SET_PARAMETER
|
|
689
818
|
CURB_DEFINE(CURL_RTSPREQ_SET_PARAMETER);
|
|
690
819
|
#endif
|
|
691
|
-
#
|
|
820
|
+
#ifdef HAVE_CURL_RTSPREQ_RECORD
|
|
692
821
|
CURB_DEFINE(CURL_RTSPREQ_RECORD);
|
|
693
822
|
#endif
|
|
694
|
-
#
|
|
823
|
+
#ifdef HAVE_CURL_RTSPREQ_RECEIVE
|
|
695
824
|
CURB_DEFINE(CURL_RTSPREQ_RECEIVE);
|
|
696
825
|
#endif
|
|
697
|
-
#
|
|
826
|
+
#ifdef HAVE_CURLOPT_RTSP_SESSION_ID
|
|
698
827
|
CURB_DEFINE(CURLOPT_RTSP_SESSION_ID);
|
|
699
828
|
#endif
|
|
700
|
-
#
|
|
829
|
+
#ifdef HAVE_CURLOPT_RTSP_STREAM_URI
|
|
701
830
|
CURB_DEFINE(CURLOPT_RTSP_STREAM_URI);
|
|
702
831
|
#endif
|
|
703
|
-
#
|
|
832
|
+
#ifdef HAVE_CURLOPT_RTSP_TRANSPORT
|
|
704
833
|
CURB_DEFINE(CURLOPT_RTSP_TRANSPORT);
|
|
705
834
|
#endif
|
|
706
|
-
#
|
|
835
|
+
#ifdef HAVE_CURLOPT_RTSP_HEADER
|
|
707
836
|
CURB_DEFINE(CURLOPT_RTSP_HEADER);
|
|
708
837
|
#endif
|
|
709
|
-
#
|
|
838
|
+
#ifdef HAVE_CURLOPT_RTSP_CLIENT_CSEQ
|
|
710
839
|
CURB_DEFINE(CURLOPT_RTSP_CLIENT_CSEQ);
|
|
711
840
|
#endif
|
|
712
|
-
#
|
|
841
|
+
#ifdef HAVE_CURLOPT_RTSP_SERVER_CSEQ
|
|
713
842
|
CURB_DEFINE(CURLOPT_RTSP_SERVER_CSEQ);
|
|
714
843
|
#endif
|
|
715
844
|
|
|
716
845
|
CURB_DEFINE(CURLOPT_TRANSFERTEXT);
|
|
717
|
-
#
|
|
846
|
+
#ifdef HAVE_CURLOPT_PROXY_TRANSFER_MODE
|
|
718
847
|
CURB_DEFINE(CURLOPT_PROXY_TRANSFER_MODE);
|
|
719
848
|
#endif
|
|
720
|
-
#
|
|
849
|
+
#ifdef HAVE_CURLOPT_CRLF
|
|
721
850
|
CURB_DEFINE(CURLOPT_CRLF);
|
|
722
851
|
#endif
|
|
723
|
-
#
|
|
852
|
+
#ifdef HAVE_CURLOPT_RANGE
|
|
724
853
|
CURB_DEFINE(CURLOPT_RANGE);
|
|
725
854
|
#endif
|
|
726
|
-
#
|
|
855
|
+
#ifdef HAVE_CURLOPT_RESUME_FROM
|
|
727
856
|
CURB_DEFINE(CURLOPT_RESUME_FROM);
|
|
728
857
|
#endif
|
|
729
|
-
#
|
|
858
|
+
#ifdef HAVE_CURLOPT_RESUME_FROM_LARGE
|
|
730
859
|
CURB_DEFINE(CURLOPT_RESUME_FROM_LARGE);
|
|
731
860
|
#endif
|
|
732
|
-
#
|
|
861
|
+
#ifdef HAVE_CURLOPT_CUSTOMREQUEST
|
|
733
862
|
CURB_DEFINE(CURLOPT_CUSTOMREQUEST);
|
|
734
863
|
#endif
|
|
735
|
-
#
|
|
864
|
+
#ifdef HAVE_CURLOPT_FILETIME
|
|
736
865
|
CURB_DEFINE(CURLOPT_FILETIME);
|
|
737
866
|
#endif
|
|
738
|
-
#
|
|
867
|
+
#ifdef HAVE_CURLOPT_NOBODY
|
|
739
868
|
CURB_DEFINE(CURLOPT_NOBODY);
|
|
740
869
|
#endif
|
|
741
|
-
#
|
|
870
|
+
#ifdef HAVE_CURLOPT_INFILESIZE
|
|
742
871
|
CURB_DEFINE(CURLOPT_INFILESIZE);
|
|
743
872
|
#endif
|
|
744
|
-
#
|
|
873
|
+
#ifdef HAVE_CURLOPT_INFILESIZE_LARGE
|
|
745
874
|
CURB_DEFINE(CURLOPT_INFILESIZE_LARGE);
|
|
746
875
|
#endif
|
|
747
|
-
#
|
|
876
|
+
#ifdef HAVE_CURLOPT_UPLOAD
|
|
748
877
|
CURB_DEFINE(CURLOPT_UPLOAD);
|
|
749
878
|
#endif
|
|
750
|
-
#
|
|
879
|
+
#ifdef HAVE_CURLOPT_MAXFILESIZE
|
|
751
880
|
CURB_DEFINE(CURLOPT_MAXFILESIZE);
|
|
752
881
|
#endif
|
|
753
|
-
#
|
|
882
|
+
#ifdef HAVE_CURLOPT_MAXFILESIZE_LARGE
|
|
754
883
|
CURB_DEFINE(CURLOPT_MAXFILESIZE_LARGE);
|
|
755
884
|
#endif
|
|
756
|
-
#
|
|
885
|
+
#ifdef HAVE_CURLOPT_TIMECONDITION
|
|
757
886
|
CURB_DEFINE(CURLOPT_TIMECONDITION);
|
|
758
887
|
#endif
|
|
759
|
-
#
|
|
888
|
+
#ifdef HAVE_CURLOPT_TIMEVALUE
|
|
760
889
|
CURB_DEFINE(CURLOPT_TIMEVALUE);
|
|
761
890
|
#endif
|
|
762
891
|
|
|
763
|
-
#
|
|
892
|
+
#ifdef HAVE_CURLOPT_TIMEOUT
|
|
764
893
|
CURB_DEFINE(CURLOPT_TIMEOUT);
|
|
765
894
|
#endif
|
|
766
|
-
#
|
|
895
|
+
#ifdef HAVE_CURLOPT_TIMEOUT_MS
|
|
767
896
|
CURB_DEFINE(CURLOPT_TIMEOUT_MS);
|
|
768
897
|
#endif
|
|
769
|
-
#
|
|
898
|
+
#ifdef HAVE_CURLOPT_LOW_SPEED_LIMIT
|
|
770
899
|
CURB_DEFINE(CURLOPT_LOW_SPEED_LIMIT);
|
|
771
900
|
#endif
|
|
772
|
-
#
|
|
901
|
+
#ifdef HAVE_CURLOPT_LOW_SPEED_TIME
|
|
773
902
|
CURB_DEFINE(CURLOPT_LOW_SPEED_TIME);
|
|
774
903
|
#endif
|
|
775
|
-
#
|
|
904
|
+
#ifdef HAVE_CURLOPT_MAX_SEND_SPEED_LARGE
|
|
776
905
|
CURB_DEFINE(CURLOPT_MAX_SEND_SPEED_LARGE);
|
|
777
906
|
#endif
|
|
778
|
-
#
|
|
907
|
+
#ifdef HAVE_CURLOPT_MAX_RECV_SPEED_LARGE
|
|
779
908
|
CURB_DEFINE(CURLOPT_MAX_RECV_SPEED_LARGE);
|
|
780
909
|
#endif
|
|
781
|
-
#
|
|
910
|
+
#ifdef HAVE_CURLOPT_MAXCONNECTS
|
|
782
911
|
CURB_DEFINE(CURLOPT_MAXCONNECTS);
|
|
783
912
|
#endif
|
|
784
|
-
#
|
|
913
|
+
#ifdef HAVE_CURLOPT_CLOSEPOLICY
|
|
785
914
|
CURB_DEFINE(CURLOPT_CLOSEPOLICY);
|
|
786
915
|
#endif
|
|
787
|
-
#
|
|
916
|
+
#ifdef HAVE_CURLOPT_FRESH_CONNECT
|
|
788
917
|
CURB_DEFINE(CURLOPT_FRESH_CONNECT);
|
|
789
918
|
#endif
|
|
790
|
-
#
|
|
919
|
+
#ifdef HAVE_CURLOPT_FORBID_REUSE
|
|
791
920
|
CURB_DEFINE(CURLOPT_FORBID_REUSE);
|
|
792
921
|
#endif
|
|
793
|
-
#
|
|
922
|
+
#ifdef HAVE_CURLOPT_CONNECTTIMEOUT
|
|
794
923
|
CURB_DEFINE(CURLOPT_CONNECTTIMEOUT);
|
|
795
924
|
#endif
|
|
796
|
-
#
|
|
925
|
+
#ifdef HAVE_CURLOPT_CONNECTTIMEOUT_MS
|
|
797
926
|
CURB_DEFINE(CURLOPT_CONNECTTIMEOUT_MS);
|
|
798
927
|
#endif
|
|
799
|
-
#
|
|
928
|
+
#ifdef HAVE_CURLOPT_IPRESOLVE
|
|
800
929
|
CURB_DEFINE(CURLOPT_IPRESOLVE);
|
|
801
930
|
#endif
|
|
802
|
-
#
|
|
931
|
+
#ifdef HAVE_CURL_IPRESOLVE_WHATEVER
|
|
803
932
|
CURB_DEFINE(CURL_IPRESOLVE_WHATEVER);
|
|
804
933
|
#endif
|
|
805
|
-
#
|
|
934
|
+
#ifdef HAVE_CURL_IPRESOLVE_V4
|
|
806
935
|
CURB_DEFINE(CURL_IPRESOLVE_V4);
|
|
807
936
|
#endif
|
|
808
|
-
#
|
|
937
|
+
#ifdef HAVE_CURL_IPRESOLVE_V6
|
|
809
938
|
CURB_DEFINE(CURL_IPRESOLVE_V6);
|
|
810
939
|
#endif
|
|
811
|
-
#
|
|
940
|
+
#ifdef HAVE_CURLOPT_CONNECT_ONLY
|
|
812
941
|
CURB_DEFINE(CURLOPT_CONNECT_ONLY);
|
|
813
942
|
#endif
|
|
814
|
-
#
|
|
943
|
+
#ifdef HAVE_CURLOPT_USE_SSL
|
|
815
944
|
CURB_DEFINE(CURLOPT_USE_SSL);
|
|
816
945
|
#endif
|
|
817
|
-
#
|
|
946
|
+
#ifdef HAVE_CURLUSESSL_NONE
|
|
818
947
|
CURB_DEFINE(CURLUSESSL_NONE);
|
|
819
948
|
#endif
|
|
820
|
-
#
|
|
949
|
+
#ifdef HAVE_CURLUSESSL_TRY
|
|
821
950
|
CURB_DEFINE(CURLUSESSL_TRY);
|
|
822
951
|
#endif
|
|
823
|
-
#
|
|
952
|
+
#ifdef HAVE_CURLUSESSL_CONTROL
|
|
824
953
|
CURB_DEFINE(CURLUSESSL_CONTROL);
|
|
825
954
|
#endif
|
|
826
|
-
#
|
|
955
|
+
#ifdef HAVE_CURLUSESSL_ALL
|
|
827
956
|
CURB_DEFINE(CURLUSESSL_ALL);
|
|
828
957
|
#endif
|
|
829
|
-
#
|
|
958
|
+
#ifdef HAVE_CURLOPT_RESOLVE
|
|
830
959
|
CURB_DEFINE(CURLOPT_RESOLVE);
|
|
831
960
|
#endif
|
|
832
961
|
|
|
833
|
-
#
|
|
962
|
+
#ifdef HAVE_CURLOPT_SSLCERT
|
|
834
963
|
CURB_DEFINE(CURLOPT_SSLCERT);
|
|
835
964
|
#endif
|
|
836
|
-
#
|
|
965
|
+
#ifdef HAVE_CURLOPT_SSLCERTTYPE
|
|
837
966
|
CURB_DEFINE(CURLOPT_SSLCERTTYPE);
|
|
838
967
|
#endif
|
|
839
|
-
#
|
|
968
|
+
#ifdef HAVE_CURLOPT_SSLKEY
|
|
840
969
|
CURB_DEFINE(CURLOPT_SSLKEY);
|
|
841
970
|
#endif
|
|
842
|
-
#
|
|
971
|
+
#ifdef HAVE_CURLOPT_SSLKEYTYPE
|
|
843
972
|
CURB_DEFINE(CURLOPT_SSLKEYTYPE);
|
|
844
973
|
#endif
|
|
845
|
-
#
|
|
974
|
+
#ifdef HAVE_CURLOPT_KEYPASSWD
|
|
846
975
|
CURB_DEFINE(CURLOPT_KEYPASSWD);
|
|
847
976
|
#endif
|
|
848
|
-
#
|
|
977
|
+
#ifdef HAVE_CURLOPT_SSLENGINE
|
|
849
978
|
CURB_DEFINE(CURLOPT_SSLENGINE);
|
|
850
979
|
#endif
|
|
851
|
-
#
|
|
980
|
+
#ifdef HAVE_CURLOPT_SSLENGINE_DEFAULT
|
|
852
981
|
CURB_DEFINE(CURLOPT_SSLENGINE_DEFAULT);
|
|
853
982
|
#endif
|
|
854
|
-
#
|
|
983
|
+
#ifdef HAVE_CURLOPT_SSLVERSION
|
|
855
984
|
CURB_DEFINE(CURLOPT_SSLVERSION);
|
|
856
985
|
#endif
|
|
857
|
-
#
|
|
986
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSv1
|
|
858
987
|
CURB_DEFINE(CURL_SSLVERSION_TLSv1);
|
|
859
988
|
#endif
|
|
860
|
-
#
|
|
989
|
+
#ifdef HAVE_CURL_SSLVERSION_SSLv2
|
|
861
990
|
CURB_DEFINE(CURL_SSLVERSION_SSLv2);
|
|
862
991
|
#endif
|
|
863
|
-
#
|
|
992
|
+
#ifdef HAVE_CURL_SSLVERSION_SSLv3
|
|
864
993
|
CURB_DEFINE(CURL_SSLVERSION_SSLv3);
|
|
865
994
|
#endif
|
|
866
|
-
#
|
|
995
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSv1_0
|
|
996
|
+
CURB_DEFINE(CURL_SSLVERSION_TLSv1_0);
|
|
997
|
+
CURB_DEFINE(CURL_SSLVERSION_MAX_TLSv1_0);
|
|
998
|
+
#endif
|
|
999
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSv1_1
|
|
1000
|
+
CURB_DEFINE(CURL_SSLVERSION_TLSv1_1);
|
|
1001
|
+
CURB_DEFINE(CURL_SSLVERSION_MAX_TLSv1_1);
|
|
1002
|
+
#endif
|
|
1003
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSv1_2
|
|
1004
|
+
CURB_DEFINE(CURL_SSLVERSION_TLSv1_2);
|
|
1005
|
+
CURB_DEFINE(CURL_SSLVERSION_MAX_TLSv1_2);
|
|
1006
|
+
#endif
|
|
1007
|
+
#ifdef HAVE_CURL_SSLVERSION_TLSv1_3
|
|
1008
|
+
CURB_DEFINE(CURL_SSLVERSION_TLSv1_3);
|
|
1009
|
+
CURB_DEFINE(CURL_SSLVERSION_MAX_TLSv1_3);
|
|
1010
|
+
#endif
|
|
1011
|
+
#ifdef HAVE_CURLOPT_SSL_VERIFYPEER
|
|
867
1012
|
CURB_DEFINE(CURLOPT_SSL_VERIFYPEER);
|
|
868
1013
|
#endif
|
|
869
|
-
#
|
|
1014
|
+
#ifdef HAVE_CURLOPT_CAINFO
|
|
870
1015
|
CURB_DEFINE(CURLOPT_CAINFO);
|
|
871
1016
|
#endif
|
|
872
|
-
#
|
|
1017
|
+
#ifdef HAVE_CURLOPT_ISSUERCERT
|
|
873
1018
|
CURB_DEFINE(CURLOPT_ISSUERCERT);
|
|
874
1019
|
#endif
|
|
875
|
-
#
|
|
1020
|
+
#ifdef HAVE_CURLOPT_CAPATH
|
|
876
1021
|
CURB_DEFINE(CURLOPT_CAPATH);
|
|
877
1022
|
#endif
|
|
878
|
-
#
|
|
1023
|
+
#ifdef HAVE_CURLOPT_CRLFILE
|
|
879
1024
|
CURB_DEFINE(CURLOPT_CRLFILE);
|
|
880
1025
|
#endif
|
|
881
|
-
#
|
|
1026
|
+
#ifdef HAVE_CURLOPT_SSL_VERIFYHOST
|
|
882
1027
|
CURB_DEFINE(CURLOPT_SSL_VERIFYHOST);
|
|
883
1028
|
#endif
|
|
884
|
-
#
|
|
1029
|
+
#ifdef HAVE_CURLOPT_CERTINFO
|
|
885
1030
|
CURB_DEFINE(CURLOPT_CERTINFO);
|
|
886
1031
|
#endif
|
|
887
|
-
|
|
1032
|
+
/* CURLOPT_RANDOM_FILE deprecated since 7.84.0, serves no purpose */
|
|
1033
|
+
#ifdef HAVE_CURLOPT_RANDOM_FILE
|
|
888
1034
|
CURB_DEFINE(CURLOPT_RANDOM_FILE);
|
|
889
1035
|
#endif
|
|
890
|
-
|
|
1036
|
+
/* CURLOPT_EGDSOCKET deprecated since 7.84.0, serves no purpose */
|
|
1037
|
+
#ifdef HAVE_CURLOPT_EGDSOCKET
|
|
891
1038
|
CURB_DEFINE(CURLOPT_EGDSOCKET);
|
|
892
1039
|
#endif
|
|
893
|
-
#
|
|
1040
|
+
#ifdef HAVE_CURLOPT_SSL_CIPHER_LIST
|
|
894
1041
|
CURB_DEFINE(CURLOPT_SSL_CIPHER_LIST);
|
|
895
1042
|
#endif
|
|
896
|
-
#
|
|
1043
|
+
#ifdef HAVE_CURLOPT_SSL_SESSIONID_CACHE
|
|
897
1044
|
CURB_DEFINE(CURLOPT_SSL_SESSIONID_CACHE);
|
|
898
1045
|
#endif
|
|
899
|
-
#
|
|
1046
|
+
#ifdef HAVE_CURLOPT_KRBLEVEL
|
|
900
1047
|
CURB_DEFINE(CURLOPT_KRBLEVEL);
|
|
901
1048
|
#endif
|
|
902
1049
|
|
|
903
|
-
#
|
|
1050
|
+
#ifdef HAVE_CURLOPT_SSH_AUTH_TYPES
|
|
904
1051
|
CURB_DEFINE(CURLOPT_SSH_AUTH_TYPES);
|
|
905
1052
|
#endif
|
|
906
|
-
#
|
|
1053
|
+
#ifdef HAVE_CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
|
|
907
1054
|
CURB_DEFINE(CURLOPT_SSH_HOST_PUBLIC_KEY_MD5);
|
|
908
1055
|
#endif
|
|
909
|
-
#
|
|
1056
|
+
#ifdef HAVE_CURLOPT_SSH_PUBLIC_KEYFILE
|
|
910
1057
|
CURB_DEFINE(CURLOPT_SSH_PUBLIC_KEYFILE);
|
|
911
1058
|
#endif
|
|
912
|
-
#
|
|
1059
|
+
#ifdef HAVE_CURLOPT_SSH_PRIVATE_KEYFILE
|
|
913
1060
|
CURB_DEFINE(CURLOPT_SSH_PRIVATE_KEYFILE);
|
|
914
1061
|
#endif
|
|
915
|
-
#
|
|
1062
|
+
#ifdef HAVE_CURLOPT_SSH_KNOWNHOSTS
|
|
916
1063
|
CURB_DEFINE(CURLOPT_SSH_KNOWNHOSTS);
|
|
917
1064
|
#endif
|
|
918
|
-
#
|
|
1065
|
+
#ifdef HAVE_CURLOPT_SSH_KEYFUNCTION
|
|
919
1066
|
CURB_DEFINE(CURLOPT_SSH_KEYFUNCTION);
|
|
920
1067
|
#endif
|
|
921
|
-
#
|
|
1068
|
+
#ifdef HAVE_CURLKHSTAT_FINE_ADD_TO_FILE
|
|
922
1069
|
CURB_DEFINE(CURLKHSTAT_FINE_ADD_TO_FILE);
|
|
923
1070
|
#endif
|
|
924
|
-
#
|
|
1071
|
+
#ifdef HAVE_CURLKHSTAT_FINE
|
|
925
1072
|
CURB_DEFINE(CURLKHSTAT_FINE);
|
|
926
1073
|
#endif
|
|
927
|
-
#
|
|
1074
|
+
#ifdef HAVE_CURLKHSTAT_REJECT
|
|
928
1075
|
CURB_DEFINE(CURLKHSTAT_REJECT);
|
|
929
1076
|
#endif
|
|
930
|
-
#
|
|
1077
|
+
#ifdef HAVE_CURLKHSTAT_DEFER
|
|
931
1078
|
CURB_DEFINE(CURLKHSTAT_DEFER);
|
|
932
1079
|
#endif
|
|
933
|
-
#
|
|
1080
|
+
#ifdef HAVE_CURLOPT_SSH_KEYDATA
|
|
934
1081
|
CURB_DEFINE(CURLOPT_SSH_KEYDATA);
|
|
935
1082
|
#endif
|
|
936
1083
|
|
|
937
|
-
#
|
|
1084
|
+
#ifdef HAVE_CURLOPT_PRIVATE
|
|
938
1085
|
CURB_DEFINE(CURLOPT_PRIVATE);
|
|
939
1086
|
#endif
|
|
940
|
-
#
|
|
1087
|
+
#ifdef HAVE_CURLOPT_SHARE
|
|
941
1088
|
CURB_DEFINE(CURLOPT_SHARE);
|
|
942
1089
|
#endif
|
|
943
|
-
#
|
|
1090
|
+
#ifdef HAVE_CURLOPT_NEW_FILE_PERMS
|
|
944
1091
|
CURB_DEFINE(CURLOPT_NEW_FILE_PERMS);
|
|
945
1092
|
#endif
|
|
946
|
-
#
|
|
1093
|
+
#ifdef HAVE_CURLOPT_NEW_DIRECTORY_PERMS
|
|
947
1094
|
CURB_DEFINE(CURLOPT_NEW_DIRECTORY_PERMS);
|
|
948
1095
|
#endif
|
|
949
1096
|
|
|
950
|
-
#
|
|
1097
|
+
#ifdef HAVE_CURLOPT_TELNETOPTIONS
|
|
951
1098
|
CURB_DEFINE(CURLOPT_TELNETOPTIONS);
|
|
952
1099
|
#endif
|
|
953
1100
|
|
|
1101
|
+
#ifdef HAVE_CURLOPT_GSSAPI_DELEGATION
|
|
1102
|
+
CURB_DEFINE(CURLOPT_GSSAPI_DELEGATION);
|
|
1103
|
+
#endif
|
|
1104
|
+
|
|
1105
|
+
#ifdef HAVE_CURLGSSAPI_DELEGATION_FLAG
|
|
1106
|
+
CURB_DEFINE(CURLGSSAPI_DELEGATION_FLAG);
|
|
1107
|
+
#endif
|
|
1108
|
+
|
|
1109
|
+
#ifdef HAVE_CURLGSSAPI_DELEGATION_POLICY_FLAG
|
|
1110
|
+
CURB_DEFINE(CURLGSSAPI_DELEGATION_POLICY_FLAG);
|
|
1111
|
+
#endif
|
|
1112
|
+
|
|
1113
|
+
#ifdef HAVE_CURLOPT_UNIX_SOCKET_PATH
|
|
1114
|
+
CURB_DEFINE(CURLOPT_UNIX_SOCKET_PATH);
|
|
1115
|
+
#endif
|
|
1116
|
+
|
|
1117
|
+
#ifdef HAVE_CURLOPT_PIPEWAIT
|
|
1118
|
+
CURB_DEFINE(CURLOPT_PIPEWAIT);
|
|
1119
|
+
#endif
|
|
1120
|
+
|
|
1121
|
+
#ifdef HAVE_CURLOPT_TCP_KEEPALIVE
|
|
1122
|
+
CURB_DEFINE(CURLOPT_TCP_KEEPALIVE);
|
|
1123
|
+
CURB_DEFINE(CURLOPT_TCP_KEEPIDLE);
|
|
1124
|
+
CURB_DEFINE(CURLOPT_TCP_KEEPINTVL);
|
|
1125
|
+
#endif
|
|
1126
|
+
|
|
1127
|
+
#ifdef HAVE_CURLOPT_HAPROXYPROTOCOL
|
|
1128
|
+
CURB_DEFINE(CURLOPT_HAPROXYPROTOCOL);
|
|
1129
|
+
#endif
|
|
1130
|
+
|
|
1131
|
+
#ifdef HAVE_CURLOPT_PROXY_SSL_VERIFYHOST
|
|
1132
|
+
CURB_DEFINE(CURLOPT_PROXY_SSL_VERIFYHOST);
|
|
1133
|
+
#endif
|
|
1134
|
+
|
|
1135
|
+
#ifdef HAVE_CURLPROTO_RTMPTE
|
|
1136
|
+
CURB_DEFINE(CURLPROTO_RTMPTE);
|
|
1137
|
+
#endif
|
|
1138
|
+
|
|
1139
|
+
#ifdef HAVE_CURLPROTO_RTMPTS
|
|
1140
|
+
CURB_DEFINE(CURLPROTO_RTMPTS);
|
|
1141
|
+
#endif
|
|
1142
|
+
|
|
1143
|
+
#ifdef HAVE_CURLPROTO_SMBS
|
|
1144
|
+
CURB_DEFINE(CURLPROTO_SMBS);
|
|
1145
|
+
#endif
|
|
1146
|
+
|
|
1147
|
+
#ifdef HAVE_CURLPROTO_LDAP
|
|
1148
|
+
CURB_DEFINE(CURLPROTO_LDAP);
|
|
1149
|
+
#endif
|
|
1150
|
+
|
|
1151
|
+
#ifdef HAVE_CURLPROTO_FTP
|
|
1152
|
+
CURB_DEFINE(CURLPROTO_FTP);
|
|
1153
|
+
#endif
|
|
1154
|
+
|
|
1155
|
+
#ifdef HAVE_CURLPROTO_SMTPS
|
|
1156
|
+
CURB_DEFINE(CURLPROTO_SMTPS);
|
|
1157
|
+
#endif
|
|
1158
|
+
|
|
1159
|
+
#ifdef HAVE_CURLPROTO_HTTP
|
|
1160
|
+
CURB_DEFINE(CURLPROTO_HTTP);
|
|
1161
|
+
#endif
|
|
1162
|
+
|
|
1163
|
+
#ifdef HAVE_CURLPROTO_SMTP
|
|
1164
|
+
CURB_DEFINE(CURLPROTO_SMTP);
|
|
1165
|
+
#endif
|
|
1166
|
+
|
|
1167
|
+
#ifdef HAVE_CURLPROTO_TFTP
|
|
1168
|
+
CURB_DEFINE(CURLPROTO_TFTP);
|
|
1169
|
+
#endif
|
|
1170
|
+
|
|
1171
|
+
#ifdef HAVE_CURLPROTO_LDAPS
|
|
1172
|
+
CURB_DEFINE(CURLPROTO_LDAPS);
|
|
1173
|
+
#endif
|
|
1174
|
+
|
|
1175
|
+
#ifdef HAVE_CURLPROTO_IMAPS
|
|
1176
|
+
CURB_DEFINE(CURLPROTO_IMAPS);
|
|
1177
|
+
#endif
|
|
1178
|
+
|
|
1179
|
+
#ifdef HAVE_CURLPROTO_SCP
|
|
1180
|
+
CURB_DEFINE(CURLPROTO_SCP);
|
|
1181
|
+
#endif
|
|
1182
|
+
|
|
1183
|
+
#ifdef HAVE_CURLPROTO_SFTP
|
|
1184
|
+
CURB_DEFINE(CURLPROTO_SFTP);
|
|
1185
|
+
#endif
|
|
1186
|
+
|
|
1187
|
+
#ifdef HAVE_CURLPROTO_TELNET
|
|
1188
|
+
CURB_DEFINE(CURLPROTO_TELNET);
|
|
1189
|
+
#endif
|
|
1190
|
+
|
|
1191
|
+
#ifdef HAVE_CURLPROTO_FILE
|
|
1192
|
+
CURB_DEFINE(CURLPROTO_FILE);
|
|
1193
|
+
#endif
|
|
1194
|
+
|
|
1195
|
+
#ifdef HAVE_CURLPROTO_FTPS
|
|
1196
|
+
CURB_DEFINE(CURLPROTO_FTPS);
|
|
1197
|
+
#endif
|
|
1198
|
+
|
|
1199
|
+
#ifdef HAVE_CURLPROTO_HTTPS
|
|
1200
|
+
CURB_DEFINE(CURLPROTO_HTTPS);
|
|
1201
|
+
#endif
|
|
1202
|
+
|
|
1203
|
+
#ifdef HAVE_CURLPROTO_IMAP
|
|
1204
|
+
CURB_DEFINE(CURLPROTO_IMAP);
|
|
1205
|
+
#endif
|
|
1206
|
+
|
|
1207
|
+
#ifdef HAVE_CURLPROTO_POP3
|
|
1208
|
+
CURB_DEFINE(CURLPROTO_POP3);
|
|
1209
|
+
#endif
|
|
1210
|
+
|
|
1211
|
+
#ifdef HAVE_CURLPROTO_GOPHER
|
|
1212
|
+
CURB_DEFINE(CURLPROTO_GOPHER);
|
|
1213
|
+
#endif
|
|
1214
|
+
|
|
1215
|
+
#ifdef HAVE_CURLPROTO_DICT
|
|
1216
|
+
CURB_DEFINE(CURLPROTO_DICT);
|
|
1217
|
+
#endif
|
|
1218
|
+
|
|
1219
|
+
#ifdef HAVE_CURLPROTO_SMB
|
|
1220
|
+
CURB_DEFINE(CURLPROTO_SMB);
|
|
1221
|
+
#endif
|
|
1222
|
+
|
|
1223
|
+
#ifdef HAVE_CURLPROTO_RTMP
|
|
1224
|
+
CURB_DEFINE(CURLPROTO_RTMP);
|
|
1225
|
+
#endif
|
|
1226
|
+
|
|
1227
|
+
#ifdef HAVE_CURLPROTO_ALL
|
|
1228
|
+
CURB_DEFINE(CURLPROTO_ALL);
|
|
1229
|
+
#endif
|
|
1230
|
+
|
|
1231
|
+
#ifdef HAVE_CURLPROTO_RTMPE
|
|
1232
|
+
CURB_DEFINE(CURLPROTO_RTMPE);
|
|
1233
|
+
#endif
|
|
1234
|
+
|
|
1235
|
+
#ifdef HAVE_CURLPROTO_RTMPS
|
|
1236
|
+
CURB_DEFINE(CURLPROTO_RTMPS);
|
|
1237
|
+
#endif
|
|
1238
|
+
|
|
1239
|
+
#ifdef HAVE_CURLPROTO_RTMPT
|
|
1240
|
+
CURB_DEFINE(CURLPROTO_RTMPT);
|
|
1241
|
+
#endif
|
|
1242
|
+
|
|
1243
|
+
#ifdef HAVE_CURLPROTO_POP3S
|
|
1244
|
+
CURB_DEFINE(CURLPROTO_POP3S);
|
|
1245
|
+
#endif
|
|
1246
|
+
|
|
1247
|
+
#ifdef HAVE_CURLPROTO_RTSP
|
|
1248
|
+
CURB_DEFINE(CURLPROTO_RTSP);
|
|
1249
|
+
#endif
|
|
1250
|
+
|
|
1251
|
+
#if LIBCURL_VERSION_NUM >= 0x072B00 /* 7.43.0 */
|
|
1252
|
+
CURB_DEFINE(CURLPIPE_NOTHING);
|
|
1253
|
+
CURB_DEFINE(CURLPIPE_HTTP1);
|
|
1254
|
+
CURB_DEFINE(CURLPIPE_MULTIPLEX);
|
|
1255
|
+
|
|
1256
|
+
rb_define_const(mCurl, "PIPE_NOTHING", LONG2NUM(CURLPIPE_NOTHING));
|
|
1257
|
+
rb_define_const(mCurl, "PIPE_HTTP1", LONG2NUM(CURLPIPE_HTTP1));
|
|
1258
|
+
rb_define_const(mCurl, "PIPE_MULTIPLEX", LONG2NUM(CURLPIPE_MULTIPLEX));
|
|
1259
|
+
#endif
|
|
1260
|
+
|
|
1261
|
+
#if LIBCURL_VERSION_NUM >= 0x072100 /* 7.33.0 */
|
|
1262
|
+
rb_define_const(mCurl, "HTTP_2_0", LONG2NUM(CURL_HTTP_VERSION_2_0));
|
|
1263
|
+
#endif
|
|
1264
|
+
#ifdef CURL_HTTP_VERSION_2TLS
|
|
1265
|
+
rb_define_const(mCurl, "HTTP_2TLS", LONG2NUM(CURL_HTTP_VERSION_2TLS));
|
|
1266
|
+
#endif
|
|
1267
|
+
#ifdef CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
|
|
1268
|
+
rb_define_const(mCurl, "HTTP_2_PRIOR_KNOWLEDGE", LONG2NUM(CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE));
|
|
1269
|
+
#endif
|
|
954
1270
|
rb_define_const(mCurl, "HTTP_1_1", LONG2NUM(CURL_HTTP_VERSION_1_1));
|
|
955
1271
|
rb_define_const(mCurl, "HTTP_1_0", LONG2NUM(CURL_HTTP_VERSION_1_0));
|
|
956
1272
|
rb_define_const(mCurl, "HTTP_NONE", LONG2NUM(CURL_HTTP_VERSION_NONE));
|
|
957
1273
|
|
|
1274
|
+
|
|
1275
|
+
|
|
958
1276
|
rb_define_singleton_method(mCurl, "ipv6?", ruby_curl_ipv6_q, 0);
|
|
959
1277
|
rb_define_singleton_method(mCurl, "kerberos4?", ruby_curl_kerberos4_q, 0);
|
|
960
1278
|
rb_define_singleton_method(mCurl, "ssl?", ruby_curl_ssl_q, 0);
|
|
@@ -968,6 +1286,7 @@ void Init_curb_core() {
|
|
|
968
1286
|
rb_define_singleton_method(mCurl, "idn?", ruby_curl_idn_q, 0);
|
|
969
1287
|
rb_define_singleton_method(mCurl, "sspi?", ruby_curl_sspi_q, 0);
|
|
970
1288
|
rb_define_singleton_method(mCurl, "conv?", ruby_curl_conv_q, 0);
|
|
1289
|
+
rb_define_singleton_method(mCurl, "http2?", ruby_curl_http2_q, 0);
|
|
971
1290
|
|
|
972
1291
|
init_curb_errors();
|
|
973
1292
|
init_curb_easy();
|