szbalint / www--curl Goto Github PK
View Code? Open in Web Editor NEWPerl binding for libcurl
Home Page: http://curl.haxx.se
License: Other
Perl binding for libcurl
Home Page: http://curl.haxx.se
License: Other
#!perl
use strict;
use WWW::Curl::Easy;
use HTTP::Headers;
use HTTP::Request;
use HTTP::Response;
my $host = $ARGV[0] || 'www.google.com';
my $req = HTTP::Request->new( GET => 'http://'. $host .'/' );
my $curl = WWW::Curl::Easy->new();
my $url = $req->uri->as_string;
$curl->setopt(CURLOPT_URL, $url);
$curl->setopt(CURLOPT_CUSTOMREQUEST, $req->method);
my @headers;
foreach my $h (+$req->headers->header_field_names) {
push(@headers, "$h: " . $req->header($h));
}
$curl->setopt(CURLOPT_HTTPHEADER, \@headers) if ($#headers >= 0);
my $dns = [ $host.':80:127.0.0.1' ];
$curl->setopt(CURLOPT_RESOLVE, $dns);
my ($body, $head);
open (my $fileb, ">", \$body);
$curl->setopt(CURLOPT_WRITEDATA,$fileb);
open (my $fileh, ">", \$head);
$curl->setopt(CURLOPT_WRITEHEADER,$fileh);
my $retcode = $curl->perform;
my $response;
if ($retcode == 0) {
$response = HTTP::Response->parse($head . "\r" . $body);
$response->request($req);
$response->content($body);
} else {
die "An error happened: ".$curl->strerror($retcode)." ($retcode)\n";
}
warn "----\nGot response: ".$response->as_string()."\n";
This causes a core dump when you do a "perform".
Here's a stack trace in case this helps:
> gdb `which perl` perl.core
...
(gdb) bt
#0 0x0000000804e1bde9 in ?? () from /usr/local/lib/libcurl.so.7
#1 0x0000000804e3a64e in curl_mvsnprintf () from /usr/local/lib/libcurl.so.7
#2 0x0000000804e4377c in curl_multi_fdset () from /usr/local/lib/libcurl.so.7
#3 0x0000000804e44b7b in curl_multi_perform () from /usr/local/lib/libcurl.so.7
#4 0x0000000804e3c3ef in curl_easy_perform () from /usr/local/lib/libcurl.so.7
#5 0x0000000804c0a3df in XS_WWW__Curl__Easy_perform () from /usr/local/lib/perl5/site_perl/5.16/mach/auto/WWW/Curl/Curl.so
#6 0x00000008008d75b0 in Perl_pp_entersub () from /usr/local/lib/perl5/5.16/mach/CORE/libperl.so
#7 0x00000008008d5b6e in Perl_runops_standard () from /usr/local/lib/perl5/5.16/mach/CORE/libperl.so
#8 0x000000080086a4cc in perl_run () from /usr/local/lib/perl5/5.16/mach/CORE/libperl.so
#9 0x0000000000400f3b in main ()
After many changes and errors I changed my Makefile to this list to make sure that it compiles correctly
for my $e (sort @syms) { if($e =~ /(OBSOLETE|^CURL_EXTERN|_LAST\z|_LASTENTRY\z|CURL_DID_MEMORY_FUNC_TYPEDEFS\z|^CURL_STRICTER\z)/) {
however on make test it fails as it says
Bareword "CURLOPT_TIMEOUT" not allowed while "strict subs" in use at t/21write-to-scalar.t line 15.
And this is for all the constants that are being defined. Module is installed but not working.
I'm working on MacOS Sierra 10.12.4
Any thoughts?
Hi,
I would like to use curl perl command but the authentification on my website use SPNEGO (kerberos).
What is your script support SPNEGO authentification for a website HTTPS ?
The linux command support SPNEGO see http://www.cloudera.com/content/www/en-us/documentation/archive/cdh/4-x/4-2-0/CDH4-Security-Guide/cdh4sg_topic_7_2.html
Thx
without CURLPROXY_* numeric values must be used. They seem very stable, but would be nicer to use constants instead.
Anyone still working, supporting this module or simple it is not maintained anymore ?
Does WWW::Curl offer any support for using cookies ? Any examples or code around it ?
Looks like module no longer builds against latest curl 7.88.1
+ /usr/bin/perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 'OPTIMIZE=-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1'
include /home/tkloczko/rpmbuild/BUILD/WWW-Curl-4.17/inc/Module/Install.pm
include inc/Module/Install/Metadata.pm
include inc/Module/Install/Base.pm
include inc/Module/Install/External.pm
include inc/Module/Install/Can.pm
Locating bin:curl-config... found at /usr/bin/curl-config.
The version is libcurl 7.88.1
Found curl.h in /usr/include/curl/curl.h
Building curlopt-constants.c for your libcurl version
Building Easy.pm constants for your libcurl version
Building Share.pm constants for your libcurl version
include inc/Module/Install/MakeMaker.pm
include inc/Module/Install/Makefile.pm
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for WWW::Curl
Writing MYMETA.yml and MYMETA.json
Writing META.yml
+ /usr/bin/make -O -j48 V=1 VERBOSE=1
Running Mkbootstrap for Curl ()
chmod 644 "Curl.bs"
"/usr/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Curl.bs blib/arch/auto/WWW/Curl/Curl.bs 644
cp lib/WWW/Curl.pm blib/lib/WWW/Curl.pm
cp lib/WWW/Curl/Share.pm blib/lib/WWW/Curl/Share.pm
cp lib/WWW/Curl/Form.pm blib/lib/WWW/Curl/Form.pm
cp lib/WWW/Curl/Multi.pm blib/lib/WWW/Curl/Multi.pm
cp lib/WWW/Curl/Easy.pm blib/lib/WWW/Curl/Easy.pm
"/usr/bin/perl" "-Iinc" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/ExtUtils/typemap' -typemap '/home/tkloczko/rpmbuild/BUILD/WWW-Curl-4.17/typemap' Curl.xs > Curl.xsc
mv Curl.xsc Curl.c
/usr/bin/gcc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1 -DVERSION=\"4.17\" -DXS_VERSION=\"4.17\" -fPIC "-I/usr/lib64/perl5/CORE" Curl.c
Curl.xs: In function 'callback_index':
Curl.xs:105:9: warning: 'CURLOPT_PROGRESSFUNCTION' is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations]
105 | case CURLOPT_PROGRESSFUNCTION:
| ^~~~
In file included from Curl.xs:17:
/usr/include/curl/curl.h:1295:3: note: declared here
1295 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
| ^~~~~~~~~~~~~~~~~
Curl.xs: In function 'perl_curl_form_delete':
Curl.xs:227:9: warning: 'curl_formfree' is deprecated: since 7.56.0. Use curl_mime_free() [-Wdeprecated-declarations]
227 | curl_formfree(self->post);
| ^~~~~~~~~~~~~
/usr/include/curl/curl.h:2611:1: note: declared here
2611 | curl_formfree(struct curl_httppost *form);
| ^~~~~~~~~~~~~
Curl.xs: In function 'fwrite_wrapper2':
Curl.xs:363:13: warning: unused variable 'sv' [-Wunused-variable]
363 | SV *sv;
| ^~
In file included from Curl.xs:574:
curlopt-constants.c: In function 'constant':
curlopt-constants.c:19:51: error: 'CURL_DEPRECATED' undeclared (first use in this function)
19 | if (strEQ(name, "DEPRECATED")) return CURL_DEPRECATED;
| ^~~~~~~~~~~~~~~
curlopt-constants.c:19:51: note: each undeclared identifier is reported only once for each function it appears in
curlopt-constants.c:20:58: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
20 | if (strEQ(name, "DID_MEMORY_FUNC_TYPEDEFS")) return CURL_DID_MEMORY_FUNC_TYPEDEFS;
| ^~~~~~
curlopt-constants.c:2:1: note: declared here
2 | constant(const char *name)
| ^~~~~~~~
curlopt-constants.c:29:13: warning: 'CURL_FORMADD_DISABLED' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
29 | if (strEQ(name, "FORMADD_DISABLED")) return CURL_FORMADD_DISABLED;
| ^~
/usr/include/curl/curl.h:2560:3: note: declared here
2560 | CURL_FORMADD_DISABLED CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:30:13: warning: 'CURL_FORMADD_ILLEGAL_ARRAY' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
30 | if (strEQ(name, "FORMADD_ILLEGAL_ARRAY")) return CURL_FORMADD_ILLEGAL_ARRAY;
| ^~
/usr/include/curl/curl.h:2558:3: note: declared here
2558 | CURL_FORMADD_ILLEGAL_ARRAY CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:31:13: warning: 'CURL_FORMADD_INCOMPLETE' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
31 | if (strEQ(name, "FORMADD_INCOMPLETE")) return CURL_FORMADD_INCOMPLETE;
| ^~
/usr/include/curl/curl.h:2557:3: note: declared here
2557 | CURL_FORMADD_INCOMPLETE CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:32:13: warning: 'CURL_FORMADD_MEMORY' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
32 | if (strEQ(name, "FORMADD_MEMORY")) return CURL_FORMADD_MEMORY;
| ^~
/usr/include/curl/curl.h:2553:3: note: declared here
2553 | CURL_FORMADD_MEMORY CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~~~~~~
curlopt-constants.c:33:13: warning: 'CURL_FORMADD_NULL' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
33 | if (strEQ(name, "FORMADD_NULL")) return CURL_FORMADD_NULL;
| ^~
/usr/include/curl/curl.h:2555:3: note: declared here
2555 | CURL_FORMADD_NULL CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:34:13: warning: 'CURL_FORMADD_OK' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
34 | if (strEQ(name, "FORMADD_OK")) return CURL_FORMADD_OK;
| ^~
/usr/include/curl/curl.h:2551:3: note: declared here
2551 | CURL_FORMADD_OK CURL_DEPRECATED(7.56.0, ""), /* 1st, no error */
| ^~~~~~~~~~~~~~~
curlopt-constants.c:35:13: warning: 'CURL_FORMADD_OPTION_TWICE' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
35 | if (strEQ(name, "FORMADD_OPTION_TWICE")) return CURL_FORMADD_OPTION_TWICE;
| ^~
/usr/include/curl/curl.h:2554:3: note: declared here
2554 | CURL_FORMADD_OPTION_TWICE CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:36:13: warning: 'CURL_FORMADD_UNKNOWN_OPTION' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
36 | if (strEQ(name, "FORMADD_UNKNOWN_OPTION")) return CURL_FORMADD_UNKNOWN_OPTION;
| ^~
/usr/include/curl/curl.h:2556:3: note: declared here
2556 | CURL_FORMADD_UNKNOWN_OPTION CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:67:59: error: 'CURL_IGNORE_DEPRECATION' undeclared (first use in this function)
67 | if (strEQ(name, "IGNORE_DEPRECATION")) return CURL_IGNORE_DEPRECATION;
| ^~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:195:46: error: 'CURL_WIN32' undeclared (first use in this function); did you mean 'CURLINFO'?
195 | if (strEQ(name, "WIN32")) return CURL_WIN32;
| ^~~~~~~~~~
| CURLINFO
curlopt-constants.c:202:56: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551615' to '-1' [-Woverflow]
202 | if (strEQ(name, "ZERO_TERMINATED")) return CURL_ZERO_TERMINATED;
| ^~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:545:13: warning: 'CURLSSLBACKEND_AXTLS' is deprecated: since 7.61.0. [-Wdeprecated-declarations]
545 | if (strEQ(name, "AXTLS")) return CURLSSLBACKEND_AXTLS;
| ^~
/usr/include/curl/curl.h:168:3: note: declared here
168 | CURLSSLBACKEND_AXTLS CURL_DEPRECATED(7.61.0, "") = 10,
| ^~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:572:13: warning: 'CURLSSLBACKEND_MESALINK' is deprecated: since 7.82.0. [-Wdeprecated-declarations]
572 | if (strEQ(name, "MESALINK")) return CURLSSLBACKEND_MESALINK;
| ^~
/usr/include/curl/curl.h:170:3: note: declared here
170 | CURLSSLBACKEND_MESALINK CURL_DEPRECATED(7.82.0, "") = 12,
| ^~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:582:13: warning: 'CURLSSLBACKEND_POLARSSL' is deprecated: since 7.69.0. [-Wdeprecated-declarations]
582 | if (strEQ(name, "POLARSSL")) return CURLSSLBACKEND_POLARSSL;
| ^~
/usr/include/curl/curl.h:164:3: note: declared here
164 | CURLSSLBACKEND_POLARSSL CURL_DEPRECATED(7.69.0, "") = 6,
| ^~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:1091:13: warning: 'CURLOPT_CONV_FROM_NETWORK_FUNCTION' is deprecated: since 7.82.0. Serves no purpose anymore [-Wdeprecated-declarations]
1091 | if (strEQ(name, "CONV_FROM_NETWORK_FUNCTION")) return CURLOPT_CONV_FROM_NETWORK_FUNCTION;
| ^~
/usr/include/curl/curl.h:1622:3: note: declared here
1622 | CURLOPTDEPRECATED(CURLOPT_CONV_FROM_NETWORK_FUNCTION,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1092:13: warning: 'CURLOPT_CONV_FROM_UTF8_FUNCTION' is deprecated: since 7.82.0. Serves no purpose anymore [-Wdeprecated-declarations]
1092 | if (strEQ(name, "CONV_FROM_UTF8_FUNCTION")) return CURLOPT_CONV_FROM_UTF8_FUNCTION;
| ^~
/usr/include/curl/curl.h:1635:3: note: declared here
1635 | CURLOPTDEPRECATED(CURLOPT_CONV_FROM_UTF8_FUNCTION,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1093:13: warning: 'CURLOPT_CONV_TO_NETWORK_FUNCTION' is deprecated: since 7.82.0. Serves no purpose anymore [-Wdeprecated-declarations]
1093 | if (strEQ(name, "CONV_TO_NETWORK_FUNCTION")) return CURLOPT_CONV_TO_NETWORK_FUNCTION;
| ^~
/usr/include/curl/curl.h:1628:3: note: declared here
1628 | CURLOPTDEPRECATED(CURLOPT_CONV_TO_NETWORK_FUNCTION,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1117:13: warning: 'CURLOPT_DNS_USE_GLOBAL_CACHE' is deprecated: since 7.11.1. Use CURLOPT_SHARE [-Wdeprecated-declarations]
1117 | if (strEQ(name, "DNS_USE_GLOBAL_CACHE")) return CURLOPT_DNS_USE_GLOBAL_CACHE;
| ^~
/usr/include/curl/curl.h:1424:3: note: declared here
1424 | CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1124:13: warning: 'CURLOPT_EGDSOCKET' is deprecated: since 7.84.0. Serves no purpose anymore [-Wdeprecated-declarations]
1124 | if (strEQ(name, "EGDSOCKET")) return CURLOPT_EGDSOCKET;
| ^~
/usr/include/curl/curl.h:1368:3: note: declared here
1368 | CURLOPTDEPRECATED(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1175:13: warning: 'CURLOPT_HTTPPOST' is deprecated: since 7.56.0. Use CURLOPT_MIMEPOST [-Wdeprecated-declarations]
1175 | if (strEQ(name, "HTTPPOST")) return CURLOPT_HTTPPOST;
| ^~
/usr/include/curl/curl.h:1195:3: note: declared here
1195 | CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1189:13: warning: 'CURLOPT_IOCTLDATA' is deprecated: since 7.18.0. Use CURLOPT_SEEKDATA [-Wdeprecated-declarations]
1189 | if (strEQ(name, "IOCTLDATA")) return CURLOPT_IOCTLDATA;
| ^~
/usr/include/curl/curl.h:1582:3: note: declared here
1582 | CURLOPTDEPRECATED(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1190:13: warning: 'CURLOPT_IOCTLFUNCTION' is deprecated: since 7.18.0. Use CURLOPT_SEEKFUNCTION [-Wdeprecated-declarations]
1190 | if (strEQ(name, "IOCTLFUNCTION")) return CURLOPT_IOCTLFUNCTION;
| ^~
/usr/include/curl/curl.h:1580:3: note: declared here
1580 | CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1258:13: warning: 'CURLOPT_PROGRESSFUNCTION' is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations]
1258 | if (strEQ(name, "PROGRESSFUNCTION")) return CURLOPT_PROGRESSFUNCTION;
| ^~
/usr/include/curl/curl.h:1295:3: note: declared here
1295 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1259:13: warning: 'CURLOPT_PROTOCOLS' is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Wdeprecated-declarations]
1259 | if (strEQ(name, "PROTOCOLS")) return CURLOPT_PROTOCOLS;
| ^~
/usr/include/curl/curl.h:1749:3: note: declared here
1749 | CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1294:13: warning: 'CURLOPT_PUT' is deprecated: since 7.12.1. Use CURLOPT_UPLOAD [-Wdeprecated-declarations]
1294 | if (strEQ(name, "PUT")) return CURLOPT_PUT;
| ^~
/usr/include/curl/curl.h:1286:3: note: declared here
1286 | CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1301:13: warning: 'CURLOPT_RANDOM_FILE' is deprecated: since 7.84.0. Serves no purpose anymore [-Wdeprecated-declarations]
1301 | if (strEQ(name, "RANDOM_FILE")) return CURLOPT_RANDOM_FILE;
| ^~
/usr/include/curl/curl.h:1364:3: note: declared here
1364 | CURLOPTDEPRECATED(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1305:13: warning: 'CURLOPT_REDIR_PROTOCOLS' is deprecated: since 7.85.0. Use CURLOPT_REDIR_PROTOCOLS_STR [-Wdeprecated-declarations]
1305 | if (strEQ(name, "REDIR_PROTOCOLS")) return CURLOPT_REDIR_PROTOCOLS;
| ^~
/usr/include/curl/curl.h:1755:3: note: declared here
1755 | CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1334:13: warning: 'CURLOPT_SOCKS5_GSSAPI_SERVICE' is deprecated: since 7.49.0. Use CURLOPT_PROXY_SERVICE_NAME [-Wdeprecated-declarations]
1334 | if (strEQ(name, "SOCKS5_GSSAPI_SERVICE")) return CURLOPT_SOCKS5_GSSAPI_SERVICE;
| ^~
/usr/include/curl/curl.h:1738:3: note: declared here
1738 | CURLOPTDEPRECATED(CURLOPT_SOCKS5_GSSAPI_SERVICE,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1362:13: warning: 'CURLOPT_SSL_ENABLE_NPN' is deprecated: since 7.86.0. Has no function [-Wdeprecated-declarations]
1362 | if (strEQ(name, "SSL_ENABLE_NPN")) return CURLOPT_SSL_ENABLE_NPN;
| ^~
/usr/include/curl/curl.h:1901:3: note: declared here
1901 | CURLOPTDEPRECATED(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225,
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1876:13: warning: 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' is deprecated: since 7.55.0. Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T [-Wdeprecated-declarations]
1876 | if (strEQ(name, "CONTENT_LENGTH_DOWNLOAD")) return CURLINFO_CONTENT_LENGTH_DOWNLOAD;
| ^~
/usr/include/curl/curl.h:2858:3: note: declared here
2858 | CURLINFO_CONTENT_LENGTH_DOWNLOAD
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:1878:13: warning: 'CURLINFO_CONTENT_LENGTH_UPLOAD' is deprecated: since 7.55.0. Use CURLINFO_CONTENT_LENGTH_UPLOAD_T [-Wdeprecated-declarations]
1878 | if (strEQ(name, "CONTENT_LENGTH_UPLOAD")) return CURLINFO_CONTENT_LENGTH_UPLOAD;
| ^~
/usr/include/curl/curl.h:2863:3: note: declared here
2863 | CURLINFO_CONTENT_LENGTH_UPLOAD
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:1913:13: warning: 'CURLINFO_LASTSOCKET' is deprecated: since 7.45.0. Use CURLINFO_ACTIVESOCKET [-Wdeprecated-declarations]
1913 | if (strEQ(name, "LASTSOCKET")) return CURLINFO_LASTSOCKET;
| ^~
/usr/include/curl/curl.h:2880:3: note: declared here
2880 | CURLINFO_LASTSOCKET CURL_DEPRECATED(7.45.0, "Use CURLINFO_ACTIVESOCKET")
| ^~~~~~~~~~~~~~~~~~~
curlopt-constants.c:1937:13: warning: 'CURLINFO_PROTOCOL' is deprecated: since 7.85.0. Use CURLINFO_SCHEME [-Wdeprecated-declarations]
1937 | if (strEQ(name, "PROTOCOL")) return CURLINFO_PROTOCOL;
| ^~
/usr/include/curl/curl.h:2901:3: note: declared here
2901 | CURLINFO_PROTOCOL CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:1960:13: warning: 'CURLINFO_SIZE_DOWNLOAD' is deprecated: since 7.55.0. Use CURLINFO_SIZE_DOWNLOAD_T [-Wdeprecated-declarations]
1960 | if (strEQ(name, "SIZE_DOWNLOAD")) return CURLINFO_SIZE_DOWNLOAD;
| ^~
/usr/include/curl/curl.h:2841:3: note: declared here
2841 | CURLINFO_SIZE_DOWNLOAD
| ^~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:1962:13: warning: 'CURLINFO_SIZE_UPLOAD' is deprecated: since 7.55.0. Use CURLINFO_SIZE_UPLOAD_T [-Wdeprecated-declarations]
1962 | if (strEQ(name, "SIZE_UPLOAD")) return CURLINFO_SIZE_UPLOAD;
| ^~
/usr/include/curl/curl.h:2838:3: note: declared here
2838 | CURLINFO_SIZE_UPLOAD CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_UPLOAD_T")
| ^~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:1966:13: warning: 'CURLINFO_SPEED_DOWNLOAD' is deprecated: since 7.55.0. Use CURLINFO_SPEED_DOWNLOAD_T [-Wdeprecated-declarations]
1966 | if (strEQ(name, "SPEED_DOWNLOAD")) return CURLINFO_SPEED_DOWNLOAD;
| ^~
/usr/include/curl/curl.h:2845:3: note: declared here
2845 | CURLINFO_SPEED_DOWNLOAD
| ^~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:1968:13: warning: 'CURLINFO_SPEED_UPLOAD' is deprecated: since 7.55.0. Use CURLINFO_SPEED_UPLOAD_T [-Wdeprecated-declarations]
1968 | if (strEQ(name, "SPEED_UPLOAD")) return CURLINFO_SPEED_UPLOAD;
| ^~
/usr/include/curl/curl.h:2849:3: note: declared here
2849 | CURLINFO_SPEED_UPLOAD
| ^~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:1980:13: warning: 'CURLINFO_TLS_SESSION' is deprecated: since 7.48.0. Use CURLINFO_TLS_SSL_PTR [-Wdeprecated-declarations]
1980 | if (strEQ(name, "TLS_SESSION")) return CURLINFO_TLS_SESSION;
| ^~
/usr/include/curl/curl.h:2895:3: note: declared here
2895 | CURLINFO_TLS_SESSION CURL_DEPRECATED(7.48.0, "Use CURLINFO_TLS_SSL_PTR")
| ^~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2002:40: warning: 'return' with no value, in function returning non-void [-Wreturn-type]
2002 | if (strEQ(name, "CURL_H")) return CURLINC_CURL_H;
| ^~~~~~
curlopt-constants.c:2:1: note: declared here
2 | constant(const char *name)
| ^~~~~~~~
curlopt-constants.c:2352:13: warning: 'CURLFORM_ARRAY' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
2352 | if (strEQ(name, "ARRAY")) return CURLFORM_ARRAY;
| ^~
/usr/include/curl/curl.h:2507:3: note: declared here
2507 | CURLFORM_ARRAY CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~
curlopt-constants.c:2355:13: warning: 'CURLFORM_BUFFER' is deprecated: since 7.56.0. Use curl_mime_filename() [-Wdeprecated-declarations]
2355 | if (strEQ(name, "BUFFER")) return CURLFORM_BUFFER;
| ^~
/usr/include/curl/curl.h:2511:3: note: declared here
2511 | CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
| ^~~~~~~~~~~~~~~
curlopt-constants.c:2356:13: warning: 'CURLFORM_BUFFERLENGTH' is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations]
2356 | if (strEQ(name, "BUFFERLENGTH")) return CURLFORM_BUFFERLENGTH;
| ^~
/usr/include/curl/curl.h:2513:3: note: declared here
2513 | CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
| ^~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2357:13: warning: 'CURLFORM_BUFFERPTR' is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations]
2357 | if (strEQ(name, "BUFFERPTR")) return CURLFORM_BUFFERPTR;
| ^~
/usr/include/curl/curl.h:2512:3: note: declared here
2512 | CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
| ^~~~~~~~~~~~~~~~~~
curlopt-constants.c:2360:13: warning: 'CURLFORM_CONTENTHEADER' is deprecated: since 7.56.0. Use curl_mime_headers() [-Wdeprecated-declarations]
2360 | if (strEQ(name, "CONTENTHEADER")) return CURLFORM_CONTENTHEADER;
| ^~
/usr/include/curl/curl.h:2516:3: note: declared here
2516 | CURLFORM_CONTENTHEADER CURL_DEPRECATED(7.56.0, "Use curl_mime_headers()"),
| ^~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2361:13: warning: 'CURLFORM_CONTENTLEN' is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations]
2361 | if (strEQ(name, "CONTENTLEN")) return CURLFORM_CONTENTLEN;
| ^~
/usr/include/curl/curl.h:2522:3: note: declared here
2522 | CURLFORM_CONTENTLEN /* added in 7.46.0, provide a curl_off_t length */
| ^~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2362:13: warning: 'CURLFORM_CONTENTSLENGTH' is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations]
2362 | if (strEQ(name, "CONTENTSLENGTH")) return CURLFORM_CONTENTSLENGTH;
| ^~
/usr/include/curl/curl.h:2505:3: note: declared here
2505 | CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
| ^~~~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2363:13: warning: 'CURLFORM_CONTENTTYPE' is deprecated: since 7.56.0. Use curl_mime_type() [-Wdeprecated-declarations]
2363 | if (strEQ(name, "CONTENTTYPE")) return CURLFORM_CONTENTTYPE;
| ^~
/usr/include/curl/curl.h:2515:3: note: declared here
2515 | CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"),
| ^~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2364:13: warning: 'CURLFORM_COPYCONTENTS' is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations]
2364 | if (strEQ(name, "COPYCONTENTS")) return CURLFORM_COPYCONTENTS;
| ^~
/usr/include/curl/curl.h:2503:3: note: declared here
2503 | CURLFORM_COPYCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
| ^~~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2365:13: warning: 'CURLFORM_COPYNAME' is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations]
2365 | if (strEQ(name, "COPYNAME")) return CURLFORM_COPYNAME;
| ^~
/usr/include/curl/curl.h:2500:3: note: declared here
2500 | CURLFORM_COPYNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:2372:13: warning: 'CURLFORM_FILE' is deprecated: since 7.56.0. Use curl_mime_filedata() [-Wdeprecated-declarations]
2372 | if (strEQ(name, "FILE")) return CURLFORM_FILE;
| ^~
/usr/include/curl/curl.h:2509:3: note: declared here
2509 | CURLFORM_FILE CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),
| ^~~~~~~~~~~~~
curlopt-constants.c:2373:13: warning: 'CURLFORM_FILECONTENT' is deprecated: since 7.56.0. Use curl_mime_data_cb() [-Wdeprecated-declarations]
2373 | if (strEQ(name, "FILECONTENT")) return CURLFORM_FILECONTENT;
| ^~
/usr/include/curl/curl.h:2506:3: note: declared here
2506 | CURLFORM_FILECONTENT CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
| ^~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2374:13: warning: 'CURLFORM_FILENAME' is deprecated: since 7.56.0. Use curl_mime_filename() [-Wdeprecated-declarations]
2374 | if (strEQ(name, "FILENAME")) return CURLFORM_FILENAME;
| ^~
/usr/include/curl/curl.h:2517:3: note: declared here
2517 | CURLFORM_FILENAME CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
| ^~~~~~~~~~~~~~~~~
curlopt-constants.c:2384:13: warning: 'CURLFORM_NAMELENGTH' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
2384 | if (strEQ(name, "NAMELENGTH")) return CURLFORM_NAMELENGTH;
| ^~
/usr/include/curl/curl.h:2502:3: note: declared here
2502 | CURLFORM_NAMELENGTH CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2385:13: warning: 'CURLFORM_NOTHING' is deprecated: since 7.56.0. [-Wdeprecated-declarations]
2385 | if (strEQ(name, "NOTHING")) return CURLFORM_NOTHING;
| ^~
/usr/include/curl/curl.h:2499:3: note: declared here
2499 | CURLFORM_NOTHING CURL_DEPRECATED(7.56.0, ""),
| ^~~~~~~~~~~~~~~~
curlopt-constants.c:2389:13: warning: 'CURLFORM_PTRCONTENTS' is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations]
2389 | if (strEQ(name, "PTRCONTENTS")) return CURLFORM_PTRCONTENTS;
| ^~
/usr/include/curl/curl.h:2504:3: note: declared here
2504 | CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
| ^~~~~~~~~~~~~~~~~~~~
curlopt-constants.c:2390:13: warning: 'CURLFORM_PTRNAME' is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations]
2390 | if (strEQ(name, "PTRNAME")) return CURLFORM_PTRNAME;
| ^~
/usr/include/curl/curl.h:2501:3: note: declared here
2501 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
| ^~~~~~~~~~~~~~~~
curlopt-constants.c:2395:13: warning: 'CURLFORM_STREAM' is deprecated: since 7.56.0. Use curl_mime_data_cb() [-Wdeprecated-declarations]
2395 | if (strEQ(name, "STREAM")) return CURLFORM_STREAM;
| ^~
/usr/include/curl/curl.h:2521:3: note: declared here
2521 | CURLFORM_STREAM CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
| ^~~~~~~~~~~~~~~
curlopt-constants.c:2717:44: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551599' to '-17' [-Woverflow]
2717 | if (strEQ(name, "ANY")) return CURLAUTH_ANY;
| ^~~~~~~~~~~~
curlopt-constants.c:2718:48: warning: overflow in conversion from 'long unsigned int' to 'int' changes value from '18446744073709551598' to '-18' [-Woverflow]
2718 | if (strEQ(name, "ANYSAFE")) return CURLAUTH_ANYSAFE;
| ^~~~~~~~~~~~~~~~
curlopt-constants.c:2811:48: error: 'CURLOPT' undeclared (first use in this function)
2811 | if (strEQ(name, "CURLOPT")) return CURLOPT;
| ^~~~~~~
curlopt-constants.c:2812:58: error: 'CURLOPTDEPRECATED' undeclared (first use in this function); did you mean 'CURLOPT_PRIVATE'?
2812 | if (strEQ(name, "CURLOPTDEPRECATED")) return CURLOPTDEPRECATED;
| ^~~~~~~~~~~~~~~~~
| CURLOPT_PRIVATE
In file included from Curl.xs:15:
Curl.c: In function 'XS_WWW__Curl__Easy_init':
/usr/lib64/perl5/CORE/XSUB.h:197:20: warning: unused variable 'ix' [-Wunused-variable]
197 | #define dXSI32 I32 ix = XSANY.any_i32
| ^~
Curl.c:778:5: note: in expansion of macro 'dXSI32'
778 | dXSI32;
| ^~~~~~
Curl.xs: In function 'XS_WWW__Curl__Easy_duphandle':
Curl.xs:665:9: warning: 'CURLOPT_PROGRESSFUNCTION' is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations]
665 | if (self->callback[callback_index(CURLOPT_PROGRESSFUNCTION)] || self->callback_ctx[callback_index(CURLOPT_PROGRESSDATA)]) {
| ^~
/usr/include/curl/curl.h:1295:3: note: declared here
1295 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
| ^~~~~~~~~~~~~~~~~
Curl.xs:666:17: warning: 'CURLOPT_PROGRESSFUNCTION' is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations]
666 | curl_easy_setopt(clone->curl, CURLOPT_PROGRESSFUNCTION, progress_callback_func);
| ^~~~~~~~~~~~~~~~
/usr/include/curl/curl.h:1295:3: note: declared here
1295 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
| ^~~~~~~~~~~~~~~~~
Curl.xs: In function 'XS_WWW__Curl__Easy_setopt':
Curl.xs:722:17: warning: 'CURLOPT_PROGRESSFUNCTION' is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations]
722 | curl_easy_setopt(self->curl, CURLOPT_PROGRESSFUNCTION, SvOK(value) ? progress_callback_func : NULL);
| ^~~~~~~~~~~~~~~~
/usr/include/curl/curl.h:1295:3: note: declared here
1295 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
| ^~~~~~~~~~~~~~~~~
Curl.xs:742:13: warning: 'CURLOPT_PROGRESSFUNCTION' is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations]
742 | case CURLOPT_PROGRESSFUNCTION:
| ^~~~
/usr/include/curl/curl.h:1295:3: note: declared here
1295 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
| ^~~~~~~~~~~~~~~~~
Curl.xs:805:13: warning: 'CURLOPT_HTTPPOST' is deprecated: since 7.56.0. Use CURLOPT_MIMEPOST [-Wdeprecated-declarations]
805 | case CURLOPT_HTTPPOST:
| ^~~~
/usr/include/curl/curl.h:1195:3: note: declared here
1195 | CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
| ^~~~~~~~~~~~~~~~~
Curl.c: In function 'XS_WWW__Curl__Easy_internal_setopt':
Curl.c:1134:17: warning: unused variable 'value' [-Wunused-variable]
1134 | int value = (int)SvIV(ST(2))
| ^~~~~
Curl.c:1132:17: warning: unused variable 'option' [-Wunused-variable]
1132 | int option = (int)SvIV(ST(1))
| ^~~~~~
Curl.c:1131:25: warning: variable 'self' set but not used [-Wunused-but-set-variable]
1131 | WWW__Curl__Easy self;
| ^~~~
Curl.c: In function 'XS_WWW__Curl__Easy_cleanup':
Curl.c:1328:25: warning: variable 'self' set but not used [-Wunused-but-set-variable]
1328 | WWW__Curl__Easy self;
| ^~~~
Curl.c: In function 'XS_WWW__Curl__Easy_strerror':
Curl.c:1389:25: warning: variable 'self' set but not used [-Wunused-but-set-variable]
1389 | WWW__Curl__Easy self;
| ^~~~
Curl.xs: In function 'XS_WWW__Curl__Form_formadd':
Curl.xs:1018:9: warning: 'curl_formadd' is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations]
1018 | curl_formadd(&(self->post),&(self->last),
| ^~~~~~~~~~~~
/usr/include/curl/curl.h:2575:1: note: declared here
2575 | curl_formadd(struct curl_httppost **httppost,
| ^~~~~~~~~~~~
Curl.xs:1019:13: warning: 'CURLFORM_COPYNAME' is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations]
1019 | CURLFORM_COPYNAME,name,
| ^~~~~~~~~~~~~~~~~
/usr/include/curl/curl.h:2500:3: note: declared here
2500 | CURLFORM_COPYNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
| ^~~~~~~~~~~~~~~~~
Curl.xs:1020:13: warning: 'CURLFORM_COPYCONTENTS' is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations]
1020 | CURLFORM_COPYCONTENTS,value,
| ^~~~~~~~~~~~~~~~~~~~~
/usr/include/curl/curl.h:2503:3: note: declared here
2503 | CURLFORM_COPYCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
| ^~~~~~~~~~~~~~~~~~~~~
Curl.xs: In function 'XS_WWW__Curl__Form_formaddfile':
Curl.xs:1030:9: warning: 'curl_formadd' is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations]
1030 | curl_formadd(&(self->post),&(self->last),
| ^~~~~~~~~~~~
/usr/include/curl/curl.h:2575:1: note: declared here
2575 | curl_formadd(struct curl_httppost **httppost,
| ^~~~~~~~~~~~
Curl.xs:1031:13: warning: 'CURLFORM_FILE' is deprecated: since 7.56.0. Use curl_mime_filedata() [-Wdeprecated-declarations]
1031 | CURLFORM_FILE,filename,
| ^~~~~~~~~~~~~
/usr/include/curl/curl.h:2509:3: note: declared here
2509 | CURLFORM_FILE CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),
| ^~~~~~~~~~~~~
Curl.xs:1032:13: warning: 'CURLFORM_COPYNAME' is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations]
1032 | CURLFORM_COPYNAME,description,
| ^~~~~~~~~~~~~~~~~
/usr/include/curl/curl.h:2500:3: note: declared here
2500 | CURLFORM_COPYNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
| ^~~~~~~~~~~~~~~~~
Curl.xs:1033:13: warning: 'CURLFORM_CONTENTTYPE' is deprecated: since 7.56.0. Use curl_mime_type() [-Wdeprecated-declarations]
1033 | CURLFORM_CONTENTTYPE,type,
| ^~~~~~~~~~~~~~~~~~~~
/usr/include/curl/curl.h:2515:3: note: declared here
2515 | CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"),
| ^~~~~~~~~~~~~~~~~~~~
Curl.c: In function 'XS_WWW__Curl__Multi_add_handle':
Curl.c:1621:25: warning: variable 'curl' set but not used [-Wunused-but-set-variable]
1621 | WWW__Curl__Easy curl;
| ^~~~
Curl.c:1620:33: warning: variable 'curlm' set but not used [-Wunused-but-set-variable]
1620 | WWW__Curl__Multi curlm;
| ^~~~~
Curl.c: In function 'XS_WWW__Curl__Multi_remove_handle':
Curl.c:1668:25: warning: variable 'curl' set but not used [-Wunused-but-set-variable]
1668 | WWW__Curl__Easy curl;
| ^~~~
Curl.c:1667:33: warning: variable 'curlm' set but not used [-Wunused-but-set-variable]
1667 | WWW__Curl__Multi curlm;
| ^~~~~
Curl.c: In function 'XS_WWW__Curl__Multi_fdset':
Curl.c:1782:17: warning: unused variable 'RETVAL' [-Wunused-variable]
1782 | SV * RETVAL;
| ^~~~~~
Curl.xs: In function 'XS_WWW__Curl__Multi_perform':
Curl.xs:1150:13: warning: unused variable 'remaining' [-Wunused-variable]
1150 | int remaining;
| ^~~~~~~~~
Curl.c:1836:33: warning: variable 'self' set but not used [-Wunused-but-set-variable]
1836 | WWW__Curl__Multi self;
| ^~~~
Curl.c: In function 'XS_WWW__Curl__Multi_strerror':
Curl.c:1926:33: warning: variable 'self' set but not used [-Wunused-but-set-variable]
1926 | WWW__Curl__Multi self;
| ^~~~
Curl.c: In function 'XS_WWW__Curl__Share_strerror':
Curl.c:2103:33: warning: variable 'self' set but not used [-Wunused-but-set-variable]
2103 | WWW__Curl__Share self;
| ^~~~
make: *** [Makefile:352: Curl.o] Error 1
$curl->setopt(CURLOPT_UPLOAD,1);
res:
HTTP/1.1 400 Bad Request
Date: Tue, 26 Apr 2016 09:37:31 GMT
Content-Type: text/html
Content-Length: 267
Connection: close
Closing connection #0
++++++++++++++++++++++++++++++++++++++++++
$curl->setopt(CURL_CUSTOMREQUEST,'PUT');
res:
HTTP/1.1 200 OK
Date: Tue, 26 Apr 2016 09:37:46 GMT
Content-Length: 0
Connection: keep-alive
x-oss-request-id: 571F36EA010B7AEF08624942
ETag: "2D546154C5386A050EE25716E6E346B4"
Connection #0 to host tvmtest.oss-cn-hangzhou.aliyuncs.com left intact
Closing connection #0
The following options take a curl_slist * parameter:
CURLOPT_HTTP200ALIASES
CURLOPT_HTTPHEADER
CURLOPT_MAIL_RCPT
CURLOPT_POSTQUOTE
CURLOPT_PREQUOTE
CURLOPT_PROXYHEADER
CURLOPT_QUOTE
CURLOPT_RESOLVE
CURLOPT_TELNETOPTIONS
But the Curl.xs file only handles CURLOPT_HTTPHEADER, CURLOPT_QUOTE, CURLOPT_POSTQUOTE and CURLOPT_RESOLVE so the other 5 options cannot currently be used from WWW::Curl.
FYI, you can quickly find the CURLOPT options taking a curl_slist by greping the docs/libcurl/opts/*.html files for curl_slist. I happen to be looking for CURLOPT_MAIL_RCPT support which has been available in Curl since version 7.20.0.
00-constants.t is failing against curl 7.15.5 (which ships with CentOS/RHEL 5):
t/00constants.t ........... 1/399
# Failed test 'CURL_SOCKET_BAD is defined alright - Invalid argument'
# at t/00constants.t line 59.
4.17:
clang -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -pipe -O2 -pipe -march=native -DVERSION="4.17" -DXS_VERSION="4.17" -fPIC "-I/usr/lib64/perl5/5.24.0/x86_64-linux-thread-multi/CORE" Curl.c
In file included from Curl.xs:574:
./curlopt-constants.c:19:58: error: non-void function 'constant' should return a value [-Wreturn-type]
if (strEQ(name, "DID_MEMORY_FUNC_TYPEDEFS")) return CURL_DID_MEMORY_FUNC_TYPEDEFS;
^
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.