Warning: Permanently added '2620:52:3:1:dead:beef:cafe:c11a' (ED25519) to the list of known hosts. INFO: Calling: curl -H Pragma: -o curb-1.0.5.gem --location --connect-timeout 60 --retry 3 --retry-delay 10 --remote-time --show-error --fail --retry-all-errors https://copr-dist-git.fedorainfracloud.org/repo/pkgs/mtasaka/rubygems-ruby34-01/rubygem-curb/curb-1.0.5.gem/md5/f38c565204ebbc28434964a569956b8e/curb-1.0.5.gem % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 92160 100 92160 0 0 1111k 0 --:--:-- --:--:-- --:--:-- 1111k INFO: Reading stdout from command: md5sum curb-1.0.5.gem Running (timeout=86400): unbuffer mock --spec /var/lib/copr-rpmbuild/workspace/workdir-j105glvw/rubygem-curb/rubygem-curb.spec --sources /var/lib/copr-rpmbuild/workspace/workdir-j105glvw/rubygem-curb --resultdir /var/lib/copr-rpmbuild/results --uniqueext 1731224967.609780 -r /var/lib/copr-rpmbuild/results/configs/child.cfg INFO: mock.py version 5.9 starting (python version = 3.12.1, NVR = mock-5.9-1.fc39), args: /usr/libexec/mock/mock --spec /var/lib/copr-rpmbuild/workspace/workdir-j105glvw/rubygem-curb/rubygem-curb.spec --sources /var/lib/copr-rpmbuild/workspace/workdir-j105glvw/rubygem-curb --resultdir /var/lib/copr-rpmbuild/results --uniqueext 1731224967.609780 -r /var/lib/copr-rpmbuild/results/configs/child.cfg Start(bootstrap): init plugins INFO: tmpfs initialized INFO: selinux enabled INFO: chroot_scan: initialized INFO: compress_logs: initialized Finish(bootstrap): init plugins Start: init plugins INFO: tmpfs initialized INFO: selinux enabled INFO: chroot_scan: initialized INFO: compress_logs: initialized Finish: init plugins INFO: Signal handler active Start: run INFO: Start(/var/lib/copr-rpmbuild/workspace/workdir-j105glvw/rubygem-curb/rubygem-curb.spec) Config(fedora-rawhide-x86_64) Start: clean chroot Finish: clean chroot Mock Version: 5.9 INFO: Mock Version: 5.9 Start(bootstrap): chroot init INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-x86_64-bootstrap-1731224967.609780/root. INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start(bootstrap): cleaning package manager metadata Finish(bootstrap): cleaning package manager metadata INFO: Guessed host environment type: unknown INFO: Using bootstrap image: registry.fedoraproject.org/fedora:rawhide INFO: Pulling image: registry.fedoraproject.org/fedora:rawhide INFO: Copy content of container registry.fedoraproject.org/fedora:rawhide to /var/lib/mock/fedora-rawhide-x86_64-bootstrap-1731224967.609780/root INFO: Checking that registry.fedoraproject.org/fedora:rawhide image matches host's architecture INFO: mounting registry.fedoraproject.org/fedora:rawhide with podman image mount INFO: image registry.fedoraproject.org/fedora:rawhide as /var/lib/containers/storage/overlay/e16f858a2e6df9a15f2317c13fe725549cd62390fc4354777d12414d63183db0/merged INFO: umounting image registry.fedoraproject.org/fedora:rawhide (/var/lib/containers/storage/overlay/e16f858a2e6df9a15f2317c13fe725549cd62390fc4354777d12414d63183db0/merged) with podman image umount INFO: Package manager dnf5 detected and used (fallback) INFO: Not updating bootstrap chroot, bootstrap_image_ready=True Start(bootstrap): creating root cache Finish(bootstrap): creating root cache Finish(bootstrap): chroot init Start: chroot init INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-x86_64-1731224967.609780/root. INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start: cleaning package manager metadata Finish: cleaning package manager metadata INFO: enabled HW Info plugin INFO: Package manager dnf5 detected and used (direct choice) INFO: Buildroot is handled by package management downloaded with a bootstrap image: rpm-4.20.0-1.fc42.x86_64 rpm-sequoia-1.7.0-2.fc41.x86_64 dnf5-5.2.6.2-1.fc42.x86_64 dnf5-plugins-5.2.6.2-1.fc42.x86_64 Start: installing minimal buildroot with dnf5 Updating and loading repositories: fedora 100% | 1.1 MiB/s | 28.2 KiB | 00m00s Copr repository 100% | 24.3 KiB/s | 1.5 KiB | 00m00s Additional repo copr_mtasaka_ruby_34_0 100% | 49.3 KiB/s | 1.5 KiB | 00m00s Copr repository 100% | 4.4 MiB/s | 644.2 KiB | 00m00s Repositories loaded. Package Arch Version Repository Size Installing group/module packages: bash x86_64 5.2.37-1.fc42 fedora 8.2 MiB bzip2 x86_64 1.0.8-19.fc41 fedora 95.7 KiB coreutils x86_64 9.5-10.fc42 fedora 5.7 MiB cpio x86_64 2.15-2.fc41 fedora 1.1 MiB diffutils x86_64 3.10-8.fc41 fedora 1.6 MiB fedora-release-common noarch 42-0.102.315.07 copr_mtasaka_ruby_34_02 19.7 KiB findutils x86_64 1:4.10.0-4.fc41 fedora 1.8 MiB gawk x86_64 5.3.0-4.fc41 fedora 1.7 MiB glibc-minimal-langpack x86_64 2.40.9000-16.fc42 fedora 0.0 B grep x86_64 3.11-9.fc41 fedora 1.0 MiB gzip x86_64 1.13-2.fc41 fedora 389.0 KiB info x86_64 7.1.1-2.fc42 fedora 361.8 KiB patch x86_64 2.7.6-25.fc41 fedora 266.7 KiB redhat-rpm-config noarch 296-1.fc42 fedora 186.6 KiB rpm-build x86_64 4.20.0-1.fc42 fedora 194.3 KiB sed x86_64 4.9-3.fc41 fedora 861.5 KiB shadow-utils x86_64 2:4.16.0-6.fc42 fedora 4.1 MiB tar x86_64 2:1.35-4.fc41 fedora 2.9 MiB unzip x86_64 6.0-64.fc41 fedora 386.8 KiB util-linux x86_64 2.40.2-8.fc42 fedora 3.7 MiB which x86_64 2.21-42.fc41 fedora 80.2 KiB xz x86_64 1:5.6.3-2.fc42 fedora 1.2 MiB Installing dependencies: add-determinism x86_64 0.4.3-1.fc42 fedora 2.4 MiB alternatives x86_64 1.30-1.fc41 fedora 66.3 KiB ansible-srpm-macros noarch 1-16.fc41 fedora 35.7 KiB audit-libs x86_64 4.0.2-1.fc41 fedora 331.3 KiB authselect x86_64 1.5.0-8.fc42 fedora 157.5 KiB authselect-libs x86_64 1.5.0-8.fc42 fedora 822.2 KiB basesystem noarch 11-21.fc41 fedora 0.0 B binutils x86_64 2.43.50-5.fc42 fedora 27.6 MiB build-reproducibility-srpm-macros noarch 0.4.3-1.fc42 fedora 735.0 B bzip2-libs x86_64 1.0.8-19.fc41 fedora 80.7 KiB ca-certificates noarch 2024.2.69_v8.0.401-2.fc42 fedora 2.6 MiB coreutils-common x86_64 9.5-10.fc42 fedora 11.2 MiB cracklib x86_64 2.9.11-6.fc41 fedora 238.9 KiB crypto-policies noarch 20241106-1.git35892de.fc42 fedora 136.9 KiB curl x86_64 8.10.1-2.fc42 fedora 453.3 KiB cyrus-sasl-lib x86_64 2.1.28-27.fc41 fedora 2.3 MiB debugedit x86_64 5.1-1.fc42 fedora 192.7 KiB dwz x86_64 0.15-8.fc42 fedora 299.2 KiB ed x86_64 1.20.2-2.fc41 fedora 146.9 KiB efi-srpm-macros noarch 5-12.fc41 fedora 40.1 KiB elfutils x86_64 0.192-3.fc42 fedora 2.7 MiB elfutils-debuginfod-client x86_64 0.192-3.fc42 fedora 76.0 KiB elfutils-default-yama-scope noarch 0.192-3.fc42 fedora 1.8 KiB elfutils-libelf x86_64 0.192-3.fc42 fedora 1.2 MiB elfutils-libs x86_64 0.192-3.fc42 fedora 675.1 KiB fedora-gpg-keys noarch 42-0.3 fedora 126.4 KiB fedora-release noarch 42-0.102.315.07 copr_mtasaka_ruby_34_02 0.0 B fedora-release-identity-basic noarch 42-0.102.315.07 copr_mtasaka_ruby_34_02 719.0 B fedora-repos noarch 42-0.3 fedora 4.9 KiB fedora-repos-rawhide noarch 42-0.3 fedora 2.2 KiB file x86_64 5.45-7.fc41 fedora 103.5 KiB file-libs x86_64 5.45-7.fc41 fedora 9.9 MiB filesystem x86_64 3.18-29.fc42 fedora 106.0 B fonts-srpm-macros noarch 1:2.0.5-17.fc41 fedora 55.8 KiB forge-srpm-macros noarch 0.4.0-1.fc42 fedora 38.9 KiB fpc-srpm-macros noarch 1.3-13.fc41 fedora 144.0 B gdb-minimal x86_64 15.2-2.fc42 fedora 13.0 MiB gdbm x86_64 1:1.23-7.fc41 fedora 460.9 KiB gdbm-libs x86_64 1:1.23-7.fc41 fedora 121.9 KiB ghc-srpm-macros noarch 1.9.2-1.fc42 fedora 779.0 B glibc x86_64 2.40.9000-16.fc42 fedora 6.6 MiB glibc-common x86_64 2.40.9000-16.fc42 fedora 1.0 MiB glibc-gconv-extra x86_64 2.40.9000-16.fc42 fedora 7.1 MiB gmp x86_64 1:6.3.0-2.fc41 fedora 811.4 KiB gnat-srpm-macros noarch 6-6.fc41 fedora 1.0 KiB go-srpm-macros noarch 3.6.0-3.fc41 fedora 60.8 KiB jansson x86_64 2.14-1.fc42 fedora 93.1 KiB json-c x86_64 0.18-1.fc42 fedora 83.3 KiB kernel-srpm-macros noarch 1.0-24.fc41 fedora 1.9 KiB keyutils-libs x86_64 1.6.3-4.fc41 fedora 54.4 KiB krb5-libs x86_64 1.21.3-3.fc42 fedora 2.3 MiB libacl x86_64 2.3.2-2.fc41 fedora 40.0 KiB libarchive x86_64 3.7.7-1.fc42 fedora 932.3 KiB libattr x86_64 2.5.2-4.fc41 fedora 28.5 KiB libblkid x86_64 2.40.2-8.fc42 fedora 262.5 KiB libbrotli x86_64 1.1.0-5.fc41 fedora 837.6 KiB libcap x86_64 2.71-1.fc42 fedora 210.8 KiB libcap-ng x86_64 0.8.5-3.fc41 fedora 69.2 KiB libcom_err x86_64 1.47.1-6.fc42 fedora 67.2 KiB libcurl x86_64 8.10.1-2.fc42 fedora 838.4 KiB libeconf x86_64 0.7.4-3.fc42 fedora 65.7 KiB libevent x86_64 2.1.12-14.fc41 fedora 895.7 KiB libfdisk x86_64 2.40.2-8.fc42 fedora 362.9 KiB libffi x86_64 3.4.6-3.fc42 fedora 86.4 KiB libgcc x86_64 14.2.1-6.fc42 fedora 270.6 KiB libgomp x86_64 14.2.1-6.fc42 fedora 519.8 KiB libidn2 x86_64 2.3.7-2.fc41 fedora 329.1 KiB libmount x86_64 2.40.2-8.fc42 fedora 355.8 KiB libnghttp2 x86_64 1.64.0-1.fc42 fedora 174.5 KiB libnsl2 x86_64 2.0.1-2.fc41 fedora 57.9 KiB libpkgconf x86_64 2.3.0-1.fc42 fedora 78.2 KiB libpsl x86_64 0.21.5-4.fc41 fedora 80.5 KiB libpwquality x86_64 1.4.5-11.fc41 fedora 417.8 KiB libselinux x86_64 3.7-6.fc42 fedora 181.1 KiB libsemanage x86_64 3.7-3.fc42 fedora 298.0 KiB libsepol x86_64 3.7-3.fc42 fedora 818.0 KiB libsmartcols x86_64 2.40.2-8.fc42 fedora 180.4 KiB libssh x86_64 0.11.1-1.fc42 fedora 569.6 KiB libssh-config noarch 0.11.1-1.fc42 fedora 277.0 B libstdc++ x86_64 14.2.1-6.fc42 fedora 2.8 MiB libtasn1 x86_64 4.19.0-9.fc41 fedora 175.7 KiB libtirpc x86_64 1.3.6-0.fc42 fedora 203.0 KiB libtool-ltdl x86_64 2.4.7-12.fc41 fedora 66.2 KiB libunistring x86_64 1.1-8.fc41 fedora 1.7 MiB libuuid x86_64 2.40.2-8.fc42 fedora 41.4 KiB libverto x86_64 0.3.2-9.fc41 fedora 29.5 KiB libxcrypt x86_64 4.4.36-10.fc42 fedora 267.7 KiB libxml2 x86_64 2.12.8-2.fc41 fedora 1.7 MiB libzstd x86_64 1.5.6-2.fc41 fedora 795.9 KiB lua-libs x86_64 5.4.7-1.fc42 fedora 285.0 KiB lua-srpm-macros noarch 1-14.fc41 fedora 1.3 KiB lz4-libs x86_64 1.10.0-1.fc41 fedora 145.5 KiB mpfr x86_64 4.2.1-5.fc41 fedora 832.1 KiB ncurses-base noarch 6.5-2.20240629.fc41 fedora 326.3 KiB ncurses-libs x86_64 6.5-2.20240629.fc41 fedora 975.2 KiB ocaml-srpm-macros noarch 10-3.fc41 fedora 1.9 KiB openblas-srpm-macros noarch 2-18.fc41 fedora 112.0 B openldap x86_64 2.6.8-5.fc41 fedora 644.2 KiB openssl-libs x86_64 1:3.2.2-8.fc42 fedora 7.8 MiB p11-kit x86_64 0.25.5-4.fc42 fedora 2.2 MiB p11-kit-trust x86_64 0.25.5-4.fc42 fedora 403.8 KiB package-notes-srpm-macros noarch 0.5-12.fc41 fedora 1.6 KiB pam x86_64 1.7.0-2.fc42 fedora 1.7 MiB pam-libs x86_64 1.7.0-2.fc42 fedora 127.7 KiB pcre2 x86_64 10.44-1.fc41.1 fedora 653.5 KiB pcre2-syntax noarch 10.44-1.fc41.1 fedora 251.6 KiB perl-srpm-macros noarch 1-56.fc41 fedora 861.0 B pkgconf x86_64 2.3.0-1.fc42 fedora 88.6 KiB pkgconf-m4 noarch 2.3.0-1.fc42 fedora 14.4 KiB pkgconf-pkg-config x86_64 2.3.0-1.fc42 fedora 989.0 B popt x86_64 1.19-7.fc41 fedora 136.9 KiB publicsuffix-list-dafsa noarch 20240107-4.fc41 fedora 67.5 KiB pyproject-srpm-macros noarch 1.16.1-1.fc42 fedora 1.9 KiB python-srpm-macros noarch 3.13-3.fc41 fedora 51.0 KiB qt5-srpm-macros noarch 5.15.15-1.fc42 fedora 500.0 B qt6-srpm-macros noarch 6.8.0-1.fc42 fedora 456.0 B readline x86_64 8.2-11.fc42 fedora 493.1 KiB rpm x86_64 4.20.0-1.fc42 fedora 3.1 MiB rpm-build-libs x86_64 4.20.0-1.fc42 fedora 206.7 KiB rpm-libs x86_64 4.20.0-1.fc42 fedora 726.1 KiB rpm-sequoia x86_64 1.7.0-2.fc41 fedora 2.4 MiB rust-srpm-macros noarch 26.3-3.fc42 fedora 4.8 KiB setup noarch 2.15.0-5.fc41 fedora 720.7 KiB sqlite-libs x86_64 3.46.1-1.fc42 fedora 1.4 MiB systemd-libs x86_64 257~rc1-2.fc42 fedora 2.3 MiB util-linux-core x86_64 2.40.2-8.fc42 fedora 1.5 MiB xxhash-libs x86_64 0.8.2-4.fc42 fedora 88.4 KiB xz-libs x86_64 1:5.6.3-2.fc42 fedora 218.4 KiB zig-srpm-macros noarch 1-3.fc41 fedora 1.1 KiB zip x86_64 3.0-41.fc41 fedora 703.2 KiB zlib-ng-compat x86_64 2.2.2-1.fc42 fedora 134.0 KiB zstd x86_64 1.5.6-2.fc41 fedora 1.7 MiB Installing groups: Buildsystem building group Transaction Summary: Installing: 154 packages Total size of inbound packages is 53 MiB. Need to download 0 B. After this operation, 180 MiB extra will be used (install 180 MiB, remove 0 B). [1/1] tar-2:1.35-4.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [1/1] Total 100% | 0.0 B/s | 0.0 B | 00m00s [1/2] bzip2-0:1.0.8-19.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [2/2] Total 100% | 0.0 B/s | 0.0 B | 00m00s [1/3] redhat-rpm-config-0:296-1.fc42.no 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [3/3] Total 100% | 0.0 B/s | 0.0 B | 00m00s [1/4] rpm-build-0:4.20.0-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [4/4] Total 100% | 0.0 B/s | 0.0 B | 00m00s [1/5] unzip-0:6.0-64.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [5/5] Total 100% | 0.0 B/s | 0.0 B | 00m00s [1/6] cpio-0:2.15-2.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [6/6] Total 100% | 0.0 B/s | 0.0 B | 00m00s [1/7] which-0:2.21-42.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [7/7] Total 100% | 0.0 B/s | 0.0 B | 00m00s [1/8] bash-0:5.2.37-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [8/8] Total 100% | 0.0 B/s | 0.0 B | 00m00s [1/9] coreutils-0:9.5-10.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [9/9] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/10] grep-0:3.11-9.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [10/10] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/11] patch-0:2.7.6-25.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [11/11] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/12] sed-0:4.9-3.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [12/12] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/13] shadow-utils-2:4.16.0-6.fc42.x8 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [13/13] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/14] diffutils-0:3.10-8.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [14/14] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/15] findutils-1:4.10.0-4.fc41.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [15/15] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/16] glibc-minimal-langpack-0:2.40.9 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [16/16] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/17] gzip-0:1.13-2.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [17/17] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/18] info-0:7.1.1-2.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [18/18] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/19] xz-1:5.6.3-2.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [19/19] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/20] util-linux-0:2.40.2-8.fc42.x86_ 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [20/20] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/21] fedora-release-common-0:42-0.10 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [21/21] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/22] gawk-0:5.3.0-4.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [22/22] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/23] glibc-0:2.40.9000-16.fc42.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [23/23] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/24] libacl-0:2.3.2-2.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [24/24] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/25] libselinux-0:3.7-6.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [25/25] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/26] bzip2-libs-0:1.0.8-19.fc41.x86_ 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [26/26] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/27] ansible-srpm-macros-0:1-16.fc41 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [27/27] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/28] build-reproducibility-srpm-macr 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [28/28] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/29] dwz-0:0.15-8.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [29/29] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/30] efi-srpm-macros-0:5-12.fc41.noa 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [30/30] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/31] file-0:5.45-7.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [31/31] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/32] fonts-srpm-macros-1:2.0.5-17.fc 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [32/32] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/33] forge-srpm-macros-0:0.4.0-1.fc4 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [33/33] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/34] fpc-srpm-macros-0:1.3-13.fc41.n 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [34/34] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/35] ghc-srpm-macros-0:1.9.2-1.fc42. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [35/35] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/36] gnat-srpm-macros-0:6-6.fc41.noa 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [36/36] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/37] go-srpm-macros-0:3.6.0-3.fc41.n 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [37/37] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/38] kernel-srpm-macros-0:1.0-24.fc4 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [38/38] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/39] lua-srpm-macros-0:1-14.fc41.noa 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [39/39] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/40] ocaml-srpm-macros-0:10-3.fc41.n 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [40/40] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/41] openblas-srpm-macros-0:2-18.fc4 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [41/41] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/42] package-notes-srpm-macros-0:0.5 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [42/42] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/43] perl-srpm-macros-0:1-56.fc41.no 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [43/43] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/44] pyproject-srpm-macros-0:1.16.1- 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [44/44] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/45] python-srpm-macros-0:3.13-3.fc4 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [45/45] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/46] qt5-srpm-macros-0:5.15.15-1.fc4 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [46/46] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/47] qt6-srpm-macros-0:6.8.0-1.fc42. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [47/47] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/48] rpm-0:4.20.0-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [48/48] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/49] rust-srpm-macros-0:26.3-3.fc42. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [49/49] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/50] zig-srpm-macros-0:1-3.fc41.noar 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [50/50] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/51] zip-0:3.0-41.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [51/51] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/52] debugedit-0:5.1-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [52/52] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/53] elfutils-0:0.192-3.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [53/53] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/54] elfutils-libelf-0:0.192-3.fc42. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [54/54] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/55] libarchive-0:3.7.7-1.fc42.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [55/55] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/56] popt-0:1.19-7.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [56/56] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/57] readline-0:8.2-11.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [57/57] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/58] rpm-build-libs-0:4.20.0-1.fc42. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [58/58] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/59] rpm-libs-0:4.20.0-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [59/59] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/60] zstd-0:1.5.6-2.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [60/60] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/61] filesystem-0:3.18-29.fc42.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [61/61] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/62] ncurses-libs-0:6.5-2.20240629.f 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [62/62] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/63] coreutils-common-0:9.5-10.fc42. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [63/63] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/64] gmp-1:6.3.0-2.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [64/64] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/65] libattr-0:2.5.2-4.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [65/65] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/66] libcap-0:2.71-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [66/66] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/67] openssl-libs-1:3.2.2-8.fc42.x86 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [67/67] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/68] systemd-libs-0:257~rc1-2.fc42.x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [68/68] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/69] pcre2-0:10.44-1.fc41.1.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [69/69] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/70] ed-0:1.20.2-2.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [70/70] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/71] audit-libs-0:4.0.2-1.fc41.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [71/71] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/72] libeconf-0:0.7.4-3.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [72/72] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/73] libsemanage-0:3.7-3.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [73/73] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/74] libxcrypt-0:4.4.36-10.fc42.x86_ 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [74/74] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/75] pam-libs-0:1.7.0-2.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [75/75] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/76] setup-0:2.15.0-5.fc41.noarch 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [76/76] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/77] glibc-common-0:2.40.9000-16.fc4 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [77/77] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/78] xz-libs-1:5.6.3-2.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [78/78] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/79] libblkid-0:2.40.2-8.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [79/79] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/80] libcap-ng-0:0.8.5-3.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [80/80] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/81] libfdisk-0:2.40.2-8.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [81/81] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/82] libmount-0:2.40.2-8.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [82/82] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/83] libsmartcols-0:2.40.2-8.fc42.x8 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [83/83] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/84] libuuid-0:2.40.2-8.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [84/84] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/85] util-linux-core-0:2.40.2-8.fc42 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [85/85] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/86] zlib-ng-compat-0:2.2.2-1.fc42.x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [86/86] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/87] fedora-repos-0:42-0.3.noarch 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [87/87] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/88] mpfr-0:4.2.1-5.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [88/88] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/89] glibc-gconv-extra-0:2.40.9000-1 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [89/89] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/90] basesystem-0:11-21.fc41.noarch 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [90/90] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/91] libgcc-0:14.2.1-6.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [91/91] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/92] libsepol-0:3.7-3.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [92/92] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/93] add-determinism-0:0.4.3-1.fc42. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [93/93] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/94] file-libs-0:5.45-7.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [94/94] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/95] curl-0:8.10.1-2.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [95/95] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/96] elfutils-libs-0:0.192-3.fc42.x8 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [96/96] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/97] elfutils-debuginfod-client-0:0. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [97/97] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/98] libstdc++-0:14.2.1-6.fc42.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [98/98] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/99] libzstd-0:1.5.6-2.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [99/99] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/100] libxml2-0:2.12.8-2.fc41.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [100/100] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/101] lz4-libs-0:1.10.0-1.fc41.x86_ 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [101/101] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/102] libgomp-0:14.2.1-6.fc42.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [102/102] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/103] lua-libs-0:5.4.7-1.fc42.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [103/103] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/104] rpm-sequoia-0:1.7.0-2.fc41.x8 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [104/104] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/105] sqlite-libs-0:3.46.1-1.fc42.x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [105/105] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/106] ncurses-base-0:6.5-2.20240629 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [106/106] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/107] ca-certificates-0:2024.2.69_v 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [107/107] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/108] crypto-policies-0:20241106-1. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [108/108] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/109] pcre2-syntax-0:10.44-1.fc41.1 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [109/109] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/110] fedora-gpg-keys-0:42-0.3.noar 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [110/110] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/111] fedora-repos-rawhide-0:42-0.3 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [111/111] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/112] elfutils-default-yama-scope-0 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [112/112] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/113] json-c-0:0.18-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [113/113] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/114] authselect-libs-0:1.5.0-8.fc4 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [114/114] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/115] pam-0:1.7.0-2.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [115/115] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/116] authselect-0:1.5.0-8.fc42.x86 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [116/116] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/117] gdbm-libs-1:1.23-7.fc41.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [117/117] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/118] libnsl2-0:2.0.1-2.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [118/118] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/119] libpwquality-0:1.4.5-11.fc41. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [119/119] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/120] libtirpc-0:1.3.6-0.fc42.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [120/120] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/121] cracklib-0:2.9.11-6.fc41.x86_ 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [121/121] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/122] krb5-libs-0:1.21.3-3.fc42.x86 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [122/122] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/123] libcom_err-0:1.47.1-6.fc42.x8 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [123/123] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/124] keyutils-libs-0:1.6.3-4.fc41. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [124/124] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/125] libverto-0:0.3.2-9.fc41.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [125/125] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/126] binutils-0:2.43.50-5.fc42.x86 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [126/126] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/127] alternatives-0:1.30-1.fc41.x8 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [127/127] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/128] jansson-0:2.14-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [128/128] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/129] pkgconf-pkg-config-0:2.3.0-1. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [129/129] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/130] pkgconf-0:2.3.0-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [130/130] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/131] pkgconf-m4-0:2.3.0-1.fc42.noa 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [131/131] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/132] libpkgconf-0:2.3.0-1.fc42.x86 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [132/132] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/133] gdbm-1:1.23-7.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [133/133] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/134] libffi-0:3.4.6-3.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [134/134] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/135] p11-kit-0:0.25.5-4.fc42.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [135/135] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/136] libtasn1-0:4.19.0-9.fc41.x86_ 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [136/136] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/137] p11-kit-trust-0:0.25.5-4.fc42 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [137/137] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/138] fedora-release-0:42-0.102.315 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [138/138] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/139] fedora-release-identity-basic 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [139/139] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/140] gdb-minimal-0:15.2-2.fc42.x86 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [140/140] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/141] xxhash-libs-0:0.8.2-4.fc42.x8 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [141/141] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/142] libcurl-0:8.10.1-2.fc42.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [142/142] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/143] libbrotli-0:1.1.0-5.fc41.x86_ 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [143/143] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/144] libidn2-0:2.3.7-2.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [144/144] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/145] libnghttp2-0:1.64.0-1.fc42.x8 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [145/145] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/146] libpsl-0:0.21.5-4.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [146/146] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/147] libssh-0:0.11.1-1.fc42.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [147/147] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/148] openldap-0:2.6.8-5.fc41.x86_6 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [148/148] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/149] libunistring-0:1.1-8.fc41.x86 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [149/149] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/150] publicsuffix-list-dafsa-0:202 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [150/150] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/151] libssh-config-0:0.11.1-1.fc42 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [151/151] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/152] cyrus-sasl-lib-0:2.1.28-27.fc 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [152/152] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/153] libevent-0:2.1.12-14.fc41.x86 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [153/153] Total 100% | 0.0 B/s | 0.0 B | 00m00s [ 1/154] libtool-ltdl-0:2.4.7-12.fc41. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [154/154] Total 100% | 0.0 B/s | 0.0 B | 00m00s Running transaction Importing PGP key 0x105EF944: UserID : "Fedora (42) " Fingerprint: B0F4950458F69E1150C6C5EDC8AC4916105EF944 From : file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-42-primary The key was successfully imported. Importing PGP key 0x105EF944: UserID : "Fedora (42) " Fingerprint: B0F4950458F69E1150C6C5EDC8AC4916105EF944 From : file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-42-primary The key was successfully imported. Importing PGP key 0xE99D6AD1: UserID : "Fedora (41) " Fingerprint: 466CF2D8B60BC3057AA9453ED0622462E99D6AD1 From : file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-41-primary The key was successfully imported. Importing PGP key 0x31645531: UserID : "Fedora (43) " Fingerprint: C6E7F081CF80E13146676E88829B606631645531 From : file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-43-primary The key was successfully imported. [ 1/156] Verify package files 100% | 716.0 B/s | 154.0 B | 00m00s [ 2/156] Prepare transaction 100% | 1.7 KiB/s | 154.0 B | 00m00s [ 3/156] Installing libgcc-0:14.2.1-6. 100% | 132.9 MiB/s | 272.3 KiB | 00m00s [ 4/156] Installing libssh-config-0:0. 100% | 0.0 B/s | 816.0 B | 00m00s [ 5/156] Installing publicsuffix-list- 100% | 66.7 MiB/s | 68.3 KiB | 00m00s [ 6/156] Installing fedora-release-ide 100% | 953.1 KiB/s | 976.0 B | 00m00s [ 7/156] Installing fedora-gpg-keys-0: 100% | 21.0 MiB/s | 172.2 KiB | 00m00s [ 8/156] Installing fedora-repos-rawhi 100% | 0.0 B/s | 2.4 KiB | 00m00s [ 9/156] Installing fedora-repos-0:42- 100% | 0.0 B/s | 5.7 KiB | 00m00s [ 10/156] Installing fedora-release-com 100% | 11.7 MiB/s | 24.0 KiB | 00m00s [ 11/156] Installing fedora-release-0:4 100% | 0.0 B/s | 124.0 B | 00m00s [ 12/156] Installing setup-0:2.15.0-5.f 100% | 44.3 MiB/s | 726.1 KiB | 00m00s [ 13/156] Installing filesystem-0:3.18- 100% | 1.6 MiB/s | 212.6 KiB | 00m00s [ 14/156] Installing basesystem-0:11-21 100% | 0.0 B/s | 124.0 B | 00m00s [ 15/156] Installing pkgconf-m4-0:2.3.0 100% | 14.5 MiB/s | 14.8 KiB | 00m00s [ 16/156] Installing pcre2-syntax-0:10. 100% | 124.1 MiB/s | 254.1 KiB | 00m00s [ 17/156] Installing ncurses-base-0:6.5 100% | 38.2 MiB/s | 351.7 KiB | 00m00s [ 18/156] Installing glibc-minimal-lang 100% | 121.1 KiB/s | 124.0 B | 00m00s [ 19/156] Installing ncurses-libs-0:6.5 100% | 137.0 MiB/s | 981.8 KiB | 00m00s [ 20/156] Installing glibc-0:2.40.9000- 100% | 200.5 MiB/s | 6.6 MiB | 00m00s [ 21/156] Installing bash-0:5.2.37-1.fc 100% | 263.5 MiB/s | 8.2 MiB | 00m00s [ 22/156] Installing glibc-common-0:2.4 100% | 128.2 MiB/s | 1.0 MiB | 00m00s [ 23/156] Installing glibc-gconv-extra- 100% | 141.2 MiB/s | 7.2 MiB | 00m00s [ 24/156] Installing zlib-ng-compat-0:2 100% | 131.7 MiB/s | 134.9 KiB | 00m00s [ 25/156] Installing bzip2-libs-0:1.0.8 100% | 79.9 MiB/s | 81.8 KiB | 00m00s [ 26/156] Installing xz-libs-1:5.6.3-2. 100% | 107.2 MiB/s | 219.5 KiB | 00m00s [ 27/156] Installing popt-0:1.19-7.fc41 100% | 35.0 MiB/s | 143.5 KiB | 00m00s [ 28/156] Installing readline-0:8.2-11. 100% | 161.2 MiB/s | 495.3 KiB | 00m00s [ 29/156] Installing libuuid-0:2.40.2-8 100% | 41.5 MiB/s | 42.5 KiB | 00m00s [ 30/156] Installing libblkid-0:2.40.2- 100% | 128.7 MiB/s | 263.6 KiB | 00m00s [ 31/156] Installing gmp-1:6.3.0-2.fc41 100% | 264.9 MiB/s | 813.7 KiB | 00m00s [ 32/156] Installing libattr-0:2.5.2-4. 100% | 28.8 MiB/s | 29.5 KiB | 00m00s [ 33/156] Installing libacl-0:2.3.2-2.f 100% | 39.8 MiB/s | 40.7 KiB | 00m00s [ 34/156] Installing libxcrypt-0:4.4.36 100% | 132.0 MiB/s | 270.4 KiB | 00m00s [ 35/156] Installing libstdc++-0:14.2.1 100% | 250.9 MiB/s | 2.8 MiB | 00m00s [ 36/156] Installing libzstd-0:1.5.6-2. 100% | 194.6 MiB/s | 797.2 KiB | 00m00s [ 37/156] Installing elfutils-libelf-0: 100% | 234.0 MiB/s | 1.2 MiB | 00m00s [ 38/156] Installing libeconf-0:0.7.4-3 100% | 65.8 MiB/s | 67.4 KiB | 00m00s [ 39/156] Installing gdbm-libs-1:1.23-7 100% | 120.7 MiB/s | 123.6 KiB | 00m00s [ 40/156] Installing dwz-0:0.15-8.fc42. 100% | 146.8 MiB/s | 300.6 KiB | 00m00s [ 41/156] Installing mpfr-0:4.2.1-5.fc4 100% | 203.5 MiB/s | 833.7 KiB | 00m00s [ 42/156] Installing gawk-0:5.3.0-4.fc4 100% | 173.2 MiB/s | 1.7 MiB | 00m00s [ 43/156] Installing unzip-0:6.0-64.fc4 100% | 127.0 MiB/s | 390.3 KiB | 00m00s [ 44/156] Installing file-libs-0:5.45-7 100% | 413.9 MiB/s | 9.9 MiB | 00m00s [ 45/156] Installing file-0:5.45-7.fc41 100% | 9.3 MiB/s | 105.0 KiB | 00m00s [ 46/156] Installing crypto-policies-0: 100% | 14.5 MiB/s | 163.3 KiB | 00m00s [ 47/156] Installing pcre2-0:10.44-1.fc 100% | 213.2 MiB/s | 654.9 KiB | 00m00s [ 48/156] Installing grep-0:3.11-9.fc41 100% | 111.5 MiB/s | 1.0 MiB | 00m00s [ 49/156] Installing xz-1:5.6.3-2.fc42. 100% | 123.7 MiB/s | 1.2 MiB | 00m00s [ 50/156] Installing libcap-ng-0:0.8.5- 100% | 69.4 MiB/s | 71.0 KiB | 00m00s [ 51/156] Installing audit-libs-0:4.0.2 100% | 162.8 MiB/s | 333.4 KiB | 00m00s [ 52/156] Installing pam-libs-0:1.7.0-2 100% | 63.4 MiB/s | 129.9 KiB | 00m00s [ 53/156] Installing libcap-0:2.71-1.fc 100% | 70.3 MiB/s | 215.8 KiB | 00m00s [ 54/156] Installing systemd-libs-0:257 100% | 251.0 MiB/s | 2.3 MiB | 00m00s [ 55/156] Installing libsmartcols-0:2.4 100% | 177.1 MiB/s | 181.4 KiB | 00m00s [ 56/156] Installing libsepol-0:3.7-3.f 100% | 266.6 MiB/s | 819.0 KiB | 00m00s [ 57/156] Installing libselinux-0:3.7-6 100% | 89.0 MiB/s | 182.3 KiB | 00m00s [ 58/156] Installing sed-0:4.9-3.fc41.x 100% | 121.3 MiB/s | 869.7 KiB | 00m00s [ 59/156] Installing findutils-1:4.10.0 100% | 185.8 MiB/s | 1.9 MiB | 00m00s [ 60/156] Installing libmount-0:2.40.2- 100% | 174.3 MiB/s | 356.9 KiB | 00m00s [ 61/156] Installing lz4-libs-0:1.10.0- 100% | 143.1 MiB/s | 146.6 KiB | 00m00s [ 62/156] Installing lua-libs-0:5.4.7-1 100% | 139.7 MiB/s | 286.2 KiB | 00m00s [ 63/156] Installing libcom_err-0:1.47. 100% | 66.7 MiB/s | 68.3 KiB | 00m00s [ 64/156] Installing alternatives-0:1.3 100% | 66.3 MiB/s | 67.9 KiB | 00m00s [ 65/156] Installing libffi-0:3.4.6-3.f 100% | 85.7 MiB/s | 87.8 KiB | 00m00s [ 66/156] Installing libtasn1-0:4.19.0- 100% | 86.7 MiB/s | 177.5 KiB | 00m00s [ 67/156] Installing p11-kit-0:0.25.5-4 100% | 147.7 MiB/s | 2.2 MiB | 00m00s [ 68/156] Installing libunistring-0:1.1 100% | 247.2 MiB/s | 1.7 MiB | 00m00s [ 69/156] Installing libidn2-0:2.3.7-2. 100% | 81.8 MiB/s | 335.1 KiB | 00m00s [ 70/156] Installing libpsl-0:0.21.5-4. 100% | 79.7 MiB/s | 81.7 KiB | 00m00s [ 71/156] Installing p11-kit-trust-0:0. 100% | 33.0 MiB/s | 405.5 KiB | 00m00s [ 72/156] Installing zstd-0:1.5.6-2.fc4 100% | 211.4 MiB/s | 1.7 MiB | 00m00s [ 73/156] Installing util-linux-core-0: 100% | 117.5 MiB/s | 1.5 MiB | 00m00s [ 74/156] Installing tar-2:1.35-4.fc41. 100% | 211.3 MiB/s | 3.0 MiB | 00m00s [ 75/156] Installing libsemanage-0:3.7- 100% | 97.6 MiB/s | 299.8 KiB | 00m00s [ 76/156] Installing shadow-utils-2:4.1 100% | 121.9 MiB/s | 4.1 MiB | 00m00s [ 77/156] Installing zip-0:3.0-41.fc41. 100% | 172.6 MiB/s | 707.1 KiB | 00m00s [ 78/156] Installing gdbm-1:1.23-7.fc41 100% | 113.7 MiB/s | 465.8 KiB | 00m00s [ 79/156] Installing cyrus-sasl-lib-0:2 100% | 230.6 MiB/s | 2.3 MiB | 00m00s [ 80/156] Installing libfdisk-0:2.40.2- 100% | 177.7 MiB/s | 364.0 KiB | 00m00s [ 81/156] Installing libxml2-0:2.12.8-2 100% | 171.2 MiB/s | 1.7 MiB | 00m00s [ 82/156] Installing bzip2-0:1.0.8-19.f 100% | 48.9 MiB/s | 100.2 KiB | 00m00s [ 83/156] Installing add-determinism-0: 100% | 270.1 MiB/s | 2.4 MiB | 00m00s [ 84/156] Installing build-reproducibil 100% | 0.0 B/s | 1.0 KiB | 00m00s [ 85/156] Installing sqlite-libs-0:3.46 100% | 238.8 MiB/s | 1.4 MiB | 00m00s [ 86/156] Installing ed-0:1.20.2-2.fc41 100% | 72.8 MiB/s | 149.2 KiB | 00m00s [ 87/156] Installing patch-0:2.7.6-25.f 100% | 131.0 MiB/s | 268.2 KiB | 00m00s [ 88/156] Installing elfutils-default-y 100% | 227.0 KiB/s | 2.0 KiB | 00m00s [ 89/156] Installing elfutils-libs-0:0. 100% | 165.3 MiB/s | 677.0 KiB | 00m00s [ 90/156] Installing cpio-0:2.15-2.fc41 100% | 137.5 MiB/s | 1.1 MiB | 00m00s [ 91/156] Installing diffutils-0:3.10-8 100% | 159.0 MiB/s | 1.6 MiB | 00m00s [ 92/156] Installing libgomp-0:14.2.1-6 100% | 254.5 MiB/s | 521.2 KiB | 00m00s [ 93/156] Installing json-c-0:0.18-1.fc 100% | 82.6 MiB/s | 84.6 KiB | 00m00s [ 94/156] Installing keyutils-libs-0:1. 100% | 54.5 MiB/s | 55.8 KiB | 00m00s [ 95/156] Installing libverto-0:0.3.2-9 100% | 30.5 MiB/s | 31.3 KiB | 00m00s [ 96/156] Installing jansson-0:2.14-1.f 100% | 92.3 MiB/s | 94.5 KiB | 00m00s [ 97/156] Installing libpkgconf-0:2.3.0 100% | 77.5 MiB/s | 79.3 KiB | 00m00s [ 98/156] Installing pkgconf-0:2.3.0-1. 100% | 44.5 MiB/s | 91.1 KiB | 00m00s [ 99/156] Installing pkgconf-pkg-config 100% | 1.7 MiB/s | 1.8 KiB | 00m00s [100/156] Installing xxhash-libs-0:0.8. 100% | 87.7 MiB/s | 89.8 KiB | 00m00s [101/156] Installing libbrotli-0:1.1.0- 100% | 205.0 MiB/s | 839.9 KiB | 00m00s [102/156] Installing libnghttp2-0:1.64. 100% | 85.7 MiB/s | 175.6 KiB | 00m00s [103/156] Installing libtool-ltdl-0:2.4 100% | 32.9 MiB/s | 67.3 KiB | 00m00s [104/156] Installing coreutils-common-0 100% | 248.7 MiB/s | 11.2 MiB | 00m00s [105/156] Installing openssl-libs-1:3.2 100% | 289.9 MiB/s | 7.8 MiB | 00m00s [106/156] Installing coreutils-0:9.5-10 100% | 150.7 MiB/s | 5.7 MiB | 00m00s [107/156] Installing ca-certificates-0: 100% | 1.1 MiB/s | 2.4 MiB | 00m02s [108/156] Installing krb5-libs-0:1.21.3 100% | 177.3 MiB/s | 2.3 MiB | 00m00s [109/156] Installing libarchive-0:3.7.7 100% | 228.1 MiB/s | 934.2 KiB | 00m00s [110/156] Installing libtirpc-0:1.3.6-0 100% | 100.0 MiB/s | 204.8 KiB | 00m00s [111/156] Installing gzip-0:1.13-2.fc41 100% | 96.3 MiB/s | 394.6 KiB | 00m00s [112/156] Installing authselect-libs-0: 100% | 90.8 MiB/s | 837.2 KiB | 00m00s [113/156] Installing cracklib-0:2.9.11- 100% | 34.9 MiB/s | 250.3 KiB | 00m00s [114/156] Installing libpwquality-0:1.4 100% | 52.5 MiB/s | 430.1 KiB | 00m00s [115/156] Installing libnsl2-0:2.0.1-2. 100% | 28.8 MiB/s | 59.1 KiB | 00m00s [116/156] Installing pam-0:1.7.0-2.fc42 100% | 63.3 MiB/s | 1.7 MiB | 00m00s [117/156] Installing libssh-0:0.11.1-1. 100% | 186.1 MiB/s | 571.7 KiB | 00m00s [118/156] Installing rpm-sequoia-0:1.7. 100% | 263.0 MiB/s | 2.4 MiB | 00m00s [119/156] Installing rpm-libs-0:4.20.0- 100% | 177.7 MiB/s | 727.7 KiB | 00m00s [120/156] Installing rpm-build-libs-0:4 100% | 101.3 MiB/s | 207.5 KiB | 00m00s [121/156] Installing libevent-0:2.1.12- 100% | 219.6 MiB/s | 899.5 KiB | 00m00s [122/156] Installing openldap-0:2.6.8-5 100% | 158.2 MiB/s | 648.0 KiB | 00m00s [123/156] Installing libcurl-0:8.10.1-2 100% | 205.0 MiB/s | 839.5 KiB | 00m00s [124/156] Installing elfutils-debuginfo 100% | 38.2 MiB/s | 78.2 KiB | 00m00s [125/156] Installing elfutils-0:0.192-3 100% | 242.3 MiB/s | 2.7 MiB | 00m00s [126/156] Installing binutils-0:2.43.50 100% | 268.2 MiB/s | 27.6 MiB | 00m00s [127/156] Installing gdb-minimal-0:15.2 100% | 295.3 MiB/s | 13.0 MiB | 00m00s [128/156] Installing debugedit-0:5.1-1. 100% | 95.4 MiB/s | 195.4 KiB | 00m00s [129/156] Installing curl-0:8.10.1-2.fc 100% | 23.4 MiB/s | 455.8 KiB | 00m00s [130/156] Installing rpm-0:4.20.0-1.fc4 100% | 89.5 MiB/s | 2.5 MiB | 00m00s [131/156] Installing efi-srpm-macros-0: 100% | 40.2 MiB/s | 41.2 KiB | 00m00s [132/156] Installing lua-srpm-macros-0: 100% | 0.0 B/s | 1.9 KiB | 00m00s [133/156] Installing zig-srpm-macros-0: 100% | 0.0 B/s | 1.7 KiB | 00m00s [134/156] Installing rust-srpm-macros-0 100% | 5.4 MiB/s | 5.6 KiB | 00m00s [135/156] Installing qt6-srpm-macros-0: 100% | 0.0 B/s | 732.0 B | 00m00s [136/156] Installing qt5-srpm-macros-0: 100% | 0.0 B/s | 776.0 B | 00m00s [137/156] Installing perl-srpm-macros-0 100% | 0.0 B/s | 1.1 KiB | 00m00s [138/156] Installing package-notes-srpm 100% | 0.0 B/s | 2.0 KiB | 00m00s [139/156] Installing openblas-srpm-macr 100% | 0.0 B/s | 392.0 B | 00m00s [140/156] Installing ocaml-srpm-macros- 100% | 0.0 B/s | 2.2 KiB | 00m00s [141/156] Installing kernel-srpm-macros 100% | 0.0 B/s | 2.3 KiB | 00m00s [142/156] Installing gnat-srpm-macros-0 100% | 0.0 B/s | 1.3 KiB | 00m00s [143/156] Installing ghc-srpm-macros-0: 100% | 0.0 B/s | 1.0 KiB | 00m00s [144/156] Installing fpc-srpm-macros-0: 100% | 0.0 B/s | 420.0 B | 00m00s [145/156] Installing ansible-srpm-macro 100% | 35.4 MiB/s | 36.2 KiB | 00m00s [146/156] Installing fonts-srpm-macros- 100% | 55.7 MiB/s | 57.0 KiB | 00m00s [147/156] Installing forge-srpm-macros- 100% | 39.3 MiB/s | 40.3 KiB | 00m00s [148/156] Installing go-srpm-macros-0:3 100% | 60.5 MiB/s | 62.0 KiB | 00m00s [149/156] Installing python-srpm-macros 100% | 50.9 MiB/s | 52.2 KiB | 00m00s [150/156] Installing redhat-rpm-config- 100% | 62.9 MiB/s | 193.2 KiB | 00m00s [151/156] Installing rpm-build-0:4.20.0 100% | 49.5 MiB/s | 202.9 KiB | 00m00s [152/156] Installing pyproject-srpm-mac 100% | 1.2 MiB/s | 2.5 KiB | 00m00s [153/156] Installing util-linux-0:2.40. 100% | 95.3 MiB/s | 3.7 MiB | 00m00s [154/156] Installing authselect-0:1.5.0 100% | 39.5 MiB/s | 161.9 KiB | 00m00s [155/156] Installing which-0:2.21-42.fc 100% | 40.2 MiB/s | 82.4 KiB | 00m00s [156/156] Installing info-0:7.1.1-2.fc4 100% | 137.4 KiB/s | 362.2 KiB | 00m03s Warning: skipped PGP checks for 3 packages from repository: copr_mtasaka_ruby_34_02 Complete! Finish: installing minimal buildroot with dnf5 Start: creating root cache Finish: creating root cache Finish: chroot init INFO: Installed packages: INFO: add-determinism-0.4.3-1.fc42.x86_64 alternatives-1.30-1.fc41.x86_64 ansible-srpm-macros-1-16.fc41.noarch audit-libs-4.0.2-1.fc41.x86_64 authselect-1.5.0-8.fc42.x86_64 authselect-libs-1.5.0-8.fc42.x86_64 basesystem-11-21.fc41.noarch bash-5.2.37-1.fc42.x86_64 binutils-2.43.50-5.fc42.x86_64 build-reproducibility-srpm-macros-0.4.3-1.fc42.noarch bzip2-1.0.8-19.fc41.x86_64 bzip2-libs-1.0.8-19.fc41.x86_64 ca-certificates-2024.2.69_v8.0.401-2.fc42.noarch coreutils-9.5-10.fc42.x86_64 coreutils-common-9.5-10.fc42.x86_64 cpio-2.15-2.fc41.x86_64 cracklib-2.9.11-6.fc41.x86_64 crypto-policies-20241106-1.git35892de.fc42.noarch curl-8.10.1-2.fc42.x86_64 cyrus-sasl-lib-2.1.28-27.fc41.x86_64 debugedit-5.1-1.fc42.x86_64 diffutils-3.10-8.fc41.x86_64 dwz-0.15-8.fc42.x86_64 ed-1.20.2-2.fc41.x86_64 efi-srpm-macros-5-12.fc41.noarch elfutils-0.192-3.fc42.x86_64 elfutils-debuginfod-client-0.192-3.fc42.x86_64 elfutils-default-yama-scope-0.192-3.fc42.noarch elfutils-libelf-0.192-3.fc42.x86_64 elfutils-libs-0.192-3.fc42.x86_64 fedora-gpg-keys-42-0.3.noarch fedora-release-42-0.102.315.07.noarch fedora-release-common-42-0.102.315.07.noarch fedora-release-identity-basic-42-0.102.315.07.noarch fedora-repos-42-0.3.noarch fedora-repos-rawhide-42-0.3.noarch file-5.45-7.fc41.x86_64 file-libs-5.45-7.fc41.x86_64 filesystem-3.18-29.fc42.x86_64 findutils-4.10.0-4.fc41.x86_64 fonts-srpm-macros-2.0.5-17.fc41.noarch forge-srpm-macros-0.4.0-1.fc42.noarch fpc-srpm-macros-1.3-13.fc41.noarch gawk-5.3.0-4.fc41.x86_64 gdb-minimal-15.2-2.fc42.x86_64 gdbm-1.23-7.fc41.x86_64 gdbm-libs-1.23-7.fc41.x86_64 ghc-srpm-macros-1.9.2-1.fc42.noarch glibc-2.40.9000-16.fc42.x86_64 glibc-common-2.40.9000-16.fc42.x86_64 glibc-gconv-extra-2.40.9000-16.fc42.x86_64 glibc-minimal-langpack-2.40.9000-16.fc42.x86_64 gmp-6.3.0-2.fc41.x86_64 gnat-srpm-macros-6-6.fc41.noarch go-srpm-macros-3.6.0-3.fc41.noarch gpg-pubkey-105ef944-65ca83d1 gpg-pubkey-31645531-66b6dccf gpg-pubkey-e99d6ad1-64d2612c grep-3.11-9.fc41.x86_64 gzip-1.13-2.fc41.x86_64 info-7.1.1-2.fc42.x86_64 jansson-2.14-1.fc42.x86_64 json-c-0.18-1.fc42.x86_64 kernel-srpm-macros-1.0-24.fc41.noarch keyutils-libs-1.6.3-4.fc41.x86_64 krb5-libs-1.21.3-3.fc42.x86_64 libacl-2.3.2-2.fc41.x86_64 libarchive-3.7.7-1.fc42.x86_64 libattr-2.5.2-4.fc41.x86_64 libblkid-2.40.2-8.fc42.x86_64 libbrotli-1.1.0-5.fc41.x86_64 libcap-2.71-1.fc42.x86_64 libcap-ng-0.8.5-3.fc41.x86_64 libcom_err-1.47.1-6.fc42.x86_64 libcurl-8.10.1-2.fc42.x86_64 libeconf-0.7.4-3.fc42.x86_64 libevent-2.1.12-14.fc41.x86_64 libfdisk-2.40.2-8.fc42.x86_64 libffi-3.4.6-3.fc42.x86_64 libgcc-14.2.1-6.fc42.x86_64 libgomp-14.2.1-6.fc42.x86_64 libidn2-2.3.7-2.fc41.x86_64 libmount-2.40.2-8.fc42.x86_64 libnghttp2-1.64.0-1.fc42.x86_64 libnsl2-2.0.1-2.fc41.x86_64 libpkgconf-2.3.0-1.fc42.x86_64 libpsl-0.21.5-4.fc41.x86_64 libpwquality-1.4.5-11.fc41.x86_64 libselinux-3.7-6.fc42.x86_64 libsemanage-3.7-3.fc42.x86_64 libsepol-3.7-3.fc42.x86_64 libsmartcols-2.40.2-8.fc42.x86_64 libssh-0.11.1-1.fc42.x86_64 libssh-config-0.11.1-1.fc42.noarch libstdc++-14.2.1-6.fc42.x86_64 libtasn1-4.19.0-9.fc41.x86_64 libtirpc-1.3.6-0.fc42.x86_64 libtool-ltdl-2.4.7-12.fc41.x86_64 libunistring-1.1-8.fc41.x86_64 libuuid-2.40.2-8.fc42.x86_64 libverto-0.3.2-9.fc41.x86_64 libxcrypt-4.4.36-10.fc42.x86_64 libxml2-2.12.8-2.fc41.x86_64 libzstd-1.5.6-2.fc41.x86_64 lua-libs-5.4.7-1.fc42.x86_64 lua-srpm-macros-1-14.fc41.noarch lz4-libs-1.10.0-1.fc41.x86_64 mpfr-4.2.1-5.fc41.x86_64 ncurses-base-6.5-2.20240629.fc41.noarch ncurses-libs-6.5-2.20240629.fc41.x86_64 ocaml-srpm-macros-10-3.fc41.noarch openblas-srpm-macros-2-18.fc41.noarch openldap-2.6.8-5.fc41.x86_64 openssl-libs-3.2.2-8.fc42.x86_64 p11-kit-0.25.5-4.fc42.x86_64 p11-kit-trust-0.25.5-4.fc42.x86_64 package-notes-srpm-macros-0.5-12.fc41.noarch pam-1.7.0-2.fc42.x86_64 pam-libs-1.7.0-2.fc42.x86_64 patch-2.7.6-25.fc41.x86_64 pcre2-10.44-1.fc41.1.x86_64 pcre2-syntax-10.44-1.fc41.1.noarch perl-srpm-macros-1-56.fc41.noarch pkgconf-2.3.0-1.fc42.x86_64 pkgconf-m4-2.3.0-1.fc42.noarch pkgconf-pkg-config-2.3.0-1.fc42.x86_64 popt-1.19-7.fc41.x86_64 publicsuffix-list-dafsa-20240107-4.fc41.noarch pyproject-srpm-macros-1.16.1-1.fc42.noarch python-srpm-macros-3.13-3.fc41.noarch qt5-srpm-macros-5.15.15-1.fc42.noarch qt6-srpm-macros-6.8.0-1.fc42.noarch readline-8.2-11.fc42.x86_64 redhat-rpm-config-296-1.fc42.noarch rpm-4.20.0-1.fc42.x86_64 rpm-build-4.20.0-1.fc42.x86_64 rpm-build-libs-4.20.0-1.fc42.x86_64 rpm-libs-4.20.0-1.fc42.x86_64 rpm-sequoia-1.7.0-2.fc41.x86_64 rust-srpm-macros-26.3-3.fc42.noarch sed-4.9-3.fc41.x86_64 setup-2.15.0-5.fc41.noarch shadow-utils-4.16.0-6.fc42.x86_64 sqlite-libs-3.46.1-1.fc42.x86_64 systemd-libs-257~rc1-2.fc42.x86_64 tar-1.35-4.fc41.x86_64 unzip-6.0-64.fc41.x86_64 util-linux-2.40.2-8.fc42.x86_64 util-linux-core-2.40.2-8.fc42.x86_64 which-2.21-42.fc41.x86_64 xxhash-libs-0.8.2-4.fc42.x86_64 xz-5.6.3-2.fc42.x86_64 xz-libs-5.6.3-2.fc42.x86_64 zig-srpm-macros-1-3.fc41.noarch zip-3.0-41.fc41.x86_64 zlib-ng-compat-2.2.2-1.fc42.x86_64 zstd-1.5.6-2.fc41.x86_64 Start: buildsrpm Start: rpmbuild -bs Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721779200 Wrote: /builddir/build/SRPMS/rubygem-curb-1.0.5-6.fc42.315.07.src.rpm Finish: rpmbuild -bs INFO: chroot_scan: 1 files copied to /var/lib/copr-rpmbuild/results/chroot_scan INFO: /var/lib/mock/fedora-rawhide-x86_64-1731224967.609780/root/var/log/dnf5.log INFO: chroot_scan: creating tarball /var/lib/copr-rpmbuild/results/chroot_scan.tar.gz /bin/tar: Removing leading `/' from member names Finish: buildsrpm INFO: Done(/var/lib/copr-rpmbuild/workspace/workdir-j105glvw/rubygem-curb/rubygem-curb.spec) Config(child) 0 minutes 20 seconds INFO: Results and/or logs in: /var/lib/copr-rpmbuild/results INFO: Cleaning up build root ('cleanup_on_success=True') Start: clean chroot INFO: unmounting tmpfs. Finish: clean chroot INFO: Start(/var/lib/copr-rpmbuild/results/rubygem-curb-1.0.5-6.fc42.315.07.src.rpm) Config(fedora-rawhide-x86_64) Start(bootstrap): chroot init INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-x86_64-bootstrap-1731224967.609780/root. INFO: reusing tmpfs at /var/lib/mock/fedora-rawhide-x86_64-bootstrap-1731224967.609780/root. INFO: calling preinit hooks INFO: enabled root cache INFO: enabled package manager cache Start(bootstrap): cleaning package manager metadata Finish(bootstrap): cleaning package manager metadata Finish(bootstrap): chroot init Start: chroot init INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-x86_64-1731224967.609780/root. INFO: calling preinit hooks INFO: enabled root cache Start: unpacking root cache Finish: unpacking root cache INFO: enabled package manager cache Start: cleaning package manager metadata Finish: cleaning package manager metadata INFO: enabled HW Info plugin INFO: Buildroot is handled by package management downloaded with a bootstrap image: rpm-4.20.0-1.fc42.x86_64 rpm-sequoia-1.7.0-2.fc41.x86_64 dnf5-5.2.6.2-1.fc42.x86_64 dnf5-plugins-5.2.6.2-1.fc42.x86_64 Finish: chroot init Start: build phase for rubygem-curb-1.0.5-6.fc42.315.07.src.rpm Start: build setup for rubygem-curb-1.0.5-6.fc42.315.07.src.rpm Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721779200 Wrote: /builddir/build/SRPMS/rubygem-curb-1.0.5-6.fc42.315.07.src.rpm Updating and loading repositories: fedora 100% | 1.1 MiB/s | 28.2 KiB | 00m00s Copr repository 100% | 52.8 KiB/s | 1.5 KiB | 00m00s Additional repo copr_mtasaka_ruby_34_0 100% | 50.9 KiB/s | 1.5 KiB | 00m00s Copr repository 100% | 5.3 MiB/s | 645.4 KiB | 00m00s Repositories loaded. Package Arch Version Repository Size Installing: gcc x86_64 14.2.1-6.fc42 fedora 104.3 MiB iproute x86_64 6.10.0-1.fc41 fedora 2.1 MiB libcurl-devel x86_64 8.10.1-2.fc42 fedora 1.3 MiB ruby-devel x86_64 3.4.0~20241110.0023git9588319e72-15.fc42.315.05 copr_mtasaka_ruby_34_02 1.6 MiB ruby-libs x86_64 3.4.0~20241110.0023git9588319e72-15.fc42.315.05 copr_mtasaka_ruby_34_02 14.8 MiB rubygem-test-unit noarch 3.6.2-202.fc42.311 copr_base 355.1 KiB rubygem-webrick noarch 1.7.0-9.fc41 fedora 196.9 KiB rubygems-devel noarch 3.6.0~20241110.0023git9588319e72-15.fc42.315.05 copr_mtasaka_ruby_34_02 13.4 KiB Installing dependencies: annobin-docs noarch 12.70-1.fc42 fedora 97.7 KiB annobin-plugin-gcc x86_64 12.70-1.fc42 fedora 985.6 KiB brotli x86_64 1.1.0-5.fc41 fedora 31.8 KiB brotli-devel x86_64 1.1.0-5.fc41 fedora 65.6 KiB cmake-filesystem x86_64 3.30.5-1.fc42 fedora 0.0 B cpp x86_64 14.2.1-6.fc42 fedora 35.0 MiB gcc-plugin-annobin x86_64 14.2.1-6.fc42 fedora 57.6 KiB glibc-devel x86_64 2.40.9000-16.fc42 fedora 2.3 MiB kernel-headers x86_64 6.12.0-0.rc6.51.fc42 fedora 6.4 MiB libbpf x86_64 2:1.5.0-1.fc42 fedora 415.3 KiB libidn2-devel x86_64 2.3.7-2.fc41 fedora 252.1 KiB libmnl x86_64 1.0.5-6.fc41 fedora 55.2 KiB libmpc x86_64 1.3.1-6.fc41 fedora 164.7 KiB libnghttp2-devel x86_64 1.64.0-1.fc42 fedora 295.4 KiB libpsl-devel x86_64 0.21.5-4.fc41 fedora 110.3 KiB libssh-devel x86_64 0.11.1-1.fc42 fedora 177.8 KiB libxcrypt-devel x86_64 4.4.36-10.fc42 fedora 30.5 KiB libyaml x86_64 0.2.5-15.fc41 fedora 134.4 KiB make x86_64 1:4.4.1-9.fc42 fedora 1.8 MiB openssl-devel x86_64 1:3.2.2-8.fc42 fedora 4.3 MiB psmisc x86_64 23.7-3.fc41 fedora 842.7 KiB publicsuffix-list noarch 20240107-4.fc41 fedora 318.0 KiB ruby x86_64 3.4.0~20241110.0023git9588319e72-15.fc42.315.05 copr_mtasaka_ruby_34_02 84.4 KiB ruby-default-gems noarch 3.4.0~20241110.0023git9588319e72-15.fc42.315.05 copr_mtasaka_ruby_34_02 66.0 KiB rubygem-io-console x86_64 0.7.2-15.fc42.315.05 copr_mtasaka_ruby_34_02 33.3 KiB rubygem-json x86_64 2.8.1-1.fc42.312 copr_base 183.1 KiB rubygem-power_assert noarch 2.0.4-200.fc42.311 copr_base 29.6 KiB rubygem-psych x86_64 5.2.0~beta3-15.fc42.315.05 copr_mtasaka_ruby_34_02 132.8 KiB rubygem-rdoc noarch 6.7.0-15.fc42.315.05 copr_mtasaka_ruby_34_02 1.8 MiB rubygems noarch 3.6.0~20241110.0023git9588319e72-15.fc42.315.05 copr_mtasaka_ruby_34_02 1.4 MiB rubypick noarch 1.1.1-21.fc41 fedora 4.4 KiB zlib-ng-compat-devel x86_64 2.2.2-1.fc42 fedora 106.8 KiB Transaction Summary: Installing: 40 packages Total size of inbound packages is 64 MiB. Need to download 59 MiB. After this operation, 182 MiB extra will be used (install 182 MiB, remove 0 B). [1/5] ruby-libs-0:3.4.0~20241110.0023gi 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [2/8] rubygems-devel-0:3.6.0~20241110.0 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 3/15] rubypick-0:1.1.1-21.fc41.noarch 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 4/16] ruby-0:3.4.0~20241110.0023git95 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 5/17] rubygems-0:3.6.0~20241110.0023g 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 6/19] rubygem-json-0:2.8.1-1.fc42.312 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 7/20] rubygem-rdoc-0:6.7.0-15.fc42.31 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 8/21] rubygem-psych-0:5.2.0~beta3-15. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 9/22] libyaml-0:0.2.5-15.fc41.x86_64 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [10/23] rubygem-io-console-0:0.7.2-15.f 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [11/24] ruby-default-gems-0:3.4.0~20241 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [12/40] rubygem-webrick-0:1.7.0-9.fc41. 100% | 488.7 KiB/s | 66.5 KiB | 00m00s [13/40] iproute-0:6.10.0-1.fc41.x86_64 100% | 4.1 MiB/s | 823.9 KiB | 00m00s [14/40] libcurl-devel-0:8.10.1-2.fc42.x 100% | 10.1 MiB/s | 881.5 KiB | 00m00s [15/40] ruby-devel-0:3.4.0~20241110.002 100% | 4.7 MiB/s | 290.9 KiB | 00m00s [16/40] rubygem-test-unit-0:3.6.2-202.f 100% | 1.7 MiB/s | 79.6 KiB | 00m00s [17/40] libbpf-2:1.5.0-1.fc42.x86_64 100% | 7.6 MiB/s | 186.3 KiB | 00m00s [18/40] libmnl-0:1.0.5-6.fc41.x86_64 100% | 1.2 MiB/s | 28.3 KiB | 00m00s [19/40] psmisc-0:23.7-3.fc41.x86_64 100% | 12.1 MiB/s | 322.1 KiB | 00m00s [20/40] libmpc-0:1.3.1-6.fc41.x86_64 100% | 2.5 MiB/s | 71.1 KiB | 00m00s [21/40] make-1:4.4.1-9.fc42.x86_64 100% | 14.0 MiB/s | 586.3 KiB | 00m00s [22/40] rubygem-power_assert-0:2.0.4-20 100% | 1.7 MiB/s | 19.4 KiB | 00m00s [23/40] brotli-devel-0:1.1.0-5.fc41.x86 100% | 809.7 KiB/s | 34.0 KiB | 00m00s [24/40] brotli-0:1.1.0-5.fc41.x86_64 100% | 478.1 KiB/s | 20.1 KiB | 00m00s [25/40] libidn2-devel-0:2.3.7-2.fc41.x8 100% | 1.3 MiB/s | 70.8 KiB | 00m00s [26/40] cpp-0:14.2.1-6.fc42.x86_64 100% | 41.8 MiB/s | 11.9 MiB | 00m00s [27/40] libnghttp2-devel-0:1.64.0-1.fc4 100% | 1.2 MiB/s | 55.7 KiB | 00m00s [28/40] libpsl-devel-0:0.21.5-4.fc41.x8 100% | 1.2 MiB/s | 33.3 KiB | 00m00s [29/40] publicsuffix-list-0:20240107-4. 100% | 2.8 MiB/s | 87.5 KiB | 00m00s [30/40] libssh-devel-0:0.11.1-1.fc42.x8 100% | 1.8 MiB/s | 42.2 KiB | 00m00s [31/40] cmake-filesystem-0:3.30.5-1.fc4 100% | 792.6 KiB/s | 17.4 KiB | 00m00s [32/40] zlib-ng-compat-devel-0:2.2.2-1. 100% | 1.1 MiB/s | 38.2 KiB | 00m00s [33/40] gcc-0:14.2.1-6.fc42.x86_64 100% | 52.4 MiB/s | 37.0 MiB | 00m01s [34/40] glibc-devel-0:2.40.9000-16.fc42 100% | 14.6 MiB/s | 644.2 KiB | 00m00s [35/40] openssl-devel-1:3.2.2-8.fc42.x8 100% | 33.1 MiB/s | 2.8 MiB | 00m00s [36/40] libxcrypt-devel-0:4.4.36-10.fc4 100% | 1.8 MiB/s | 28.9 KiB | 00m00s [37/40] kernel-headers-0:6.12.0-0.rc6.5 100% | 49.5 MiB/s | 1.6 MiB | 00m00s [38/40] annobin-plugin-gcc-0:12.70-1.fc 100% | 26.4 MiB/s | 971.7 KiB | 00m00s [39/40] gcc-plugin-annobin-0:14.2.1-6.f 100% | 2.0 MiB/s | 57.1 KiB | 00m00s [40/40] annobin-docs-0:12.70-1.fc42.noa 100% | 5.6 MiB/s | 92.0 KiB | 00m00s -------------------------------------------------------------------------------- [40/40] Total 100% | 73.9 MiB/s | 58.8 MiB | 00m01s Running transaction [ 1/42] Verify package files 100% | 181.0 B/s | 40.0 B | 00m00s [ 2/42] Prepare transaction 100% | 350.0 B/s | 40.0 B | 00m00s [ 3/42] Installing ruby-libs-0:3.4.0~20 100% | 183.8 MiB/s | 14.9 MiB | 00m00s [ 4/42] Installing ruby-0:3.4.0~2024111 100% | 42.0 MiB/s | 86.1 KiB | 00m00s [ 5/42] Installing rubypick-0:1.1.1-21. 100% | 0.0 B/s | 5.1 KiB | 00m00s [ 6/42] Installing cmake-filesystem-0:3 100% | 2.4 MiB/s | 7.3 KiB | 00m00s [ 7/42] Installing libmpc-0:1.3.1-6.fc4 100% | 81.1 MiB/s | 166.2 KiB | 00m00s [ 8/42] Installing cpp-0:14.2.1-6.fc42. 100% | 279.8 MiB/s | 35.0 MiB | 00m00s [ 9/42] Installing libssh-devel-0:0.11. 100% | 88.0 MiB/s | 180.3 KiB | 00m00s [10/42] Installing zlib-ng-compat-devel 100% | 105.8 MiB/s | 108.3 KiB | 00m00s [11/42] Installing annobin-docs-0:12.70 100% | 32.2 MiB/s | 98.8 KiB | 00m00s [12/42] Installing kernel-headers-0:6.1 100% | 117.8 MiB/s | 6.6 MiB | 00m00s [13/42] Installing libxcrypt-devel-0:4. 100% | 10.7 MiB/s | 32.9 KiB | 00m00s [14/42] Installing glibc-devel-0:2.40.9 100% | 70.6 MiB/s | 2.3 MiB | 00m00s [15/42] Installing openssl-devel-1:3.2. 100% | 32.4 MiB/s | 5.2 MiB | 00m00s [16/42] Installing publicsuffix-list-0: 100% | 311.6 MiB/s | 319.1 KiB | 00m00s [17/42] Installing libpsl-devel-0:0.21. 100% | 55.5 MiB/s | 113.6 KiB | 00m00s [18/42] Installing libnghttp2-devel-0:1 100% | 289.5 MiB/s | 296.5 KiB | 00m00s [19/42] Installing libidn2-devel-0:2.3. 100% | 84.7 MiB/s | 260.1 KiB | 00m00s [20/42] Installing brotli-0:1.1.0-5.fc4 100% | 31.7 MiB/s | 32.5 KiB | 00m00s [21/42] Installing brotli-devel-0:1.1.0 100% | 66.4 MiB/s | 68.0 KiB | 00m00s [22/42] Installing libyaml-0:0.2.5-15.f 100% | 66.3 MiB/s | 135.8 KiB | 00m00s [23/42] Installing rubygems-0:3.6.0~202 100% | 74.7 MiB/s | 1.5 MiB | 00m00s [24/42] Installing rubygem-io-console-0 100% | 17.4 MiB/s | 35.7 KiB | 00m00s [25/42] Installing ruby-default-gems-0: 100% | 18.6 MiB/s | 76.4 KiB | 00m00s [26/42] Installing rubygem-psych-0:5.2. 100% | 34.6 MiB/s | 141.8 KiB | 00m00s [27/42] Installing rubygem-json-0:2.8.1 100% | 46.5 MiB/s | 190.4 KiB | 00m00s [28/42] Installing rubygem-rdoc-0:6.7.0 100% | 117.7 MiB/s | 1.9 MiB | 00m00s [29/42] Installing rubygem-power_assert 100% | 31.6 MiB/s | 32.4 KiB | 00m00s [30/42] Installing make-1:4.4.1-9.fc42. 100% | 163.7 MiB/s | 1.8 MiB | 00m00s [31/42] Installing gcc-0:14.2.1-6.fc42. 100% | 310.5 MiB/s | 104.3 MiB | 00m00s [32/42] Installing psmisc-0:23.7-3.fc41 100% | 76.5 MiB/s | 861.1 KiB | 00m00s [33/42] Installing libmnl-0:1.0.5-6.fc4 100% | 55.2 MiB/s | 56.6 KiB | 00m00s [34/42] Installing libbpf-2:1.5.0-1.fc4 100% | 135.4 MiB/s | 416.1 KiB | 00m00s [35/42] Installing iproute-0:6.10.0-1.f 100% | 160.6 MiB/s | 2.1 MiB | 00m00s [36/42] Installing annobin-plugin-gcc-0 100% | 41.9 MiB/s | 987.3 KiB | 00m00s [37/42] Installing gcc-plugin-annobin-0 100% | 2.4 MiB/s | 59.2 KiB | 00m00s [38/42] Installing rubygem-test-unit-0: 100% | 71.6 MiB/s | 366.8 KiB | 00m00s [39/42] Installing rubygems-devel-0:3.6 100% | 13.9 MiB/s | 14.2 KiB | 00m00s [40/42] Installing rubygem-webrick-0:1. 100% | 50.0 MiB/s | 204.6 KiB | 00m00s [41/42] Installing ruby-devel-0:3.4.0~2 100% | 100.5 MiB/s | 1.6 MiB | 00m00s [42/42] Installing libcurl-devel-0:8.10 100% | 6.8 MiB/s | 1.4 MiB | 00m00s Warning: skipped PGP checks for 12 packages from repositories: copr_base, copr_mtasaka_ruby_34_02 Complete! Finish: build setup for rubygem-curb-1.0.5-6.fc42.315.07.src.rpm Start: rpmbuild rubygem-curb-1.0.5-6.fc42.315.07.src.rpm Building target platforms: x86_64 Building for target x86_64 setting SOURCE_DATE_EPOCH=1721779200 Executing(%mkbuilddir): /bin/sh -e /var/tmp/rpm-tmp.uOn7z3 + umask 022 + cd /builddir/build/BUILD/rubygem-curb-1.0.5-build + test -d /builddir/build/BUILD/rubygem-curb-1.0.5-build + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w /builddir/build/BUILD/rubygem-curb-1.0.5-build + /usr/bin/rm -rf /builddir/build/BUILD/rubygem-curb-1.0.5-build + /usr/bin/mkdir -p /builddir/build/BUILD/rubygem-curb-1.0.5-build + /usr/bin/mkdir -p /builddir/build/BUILD/rubygem-curb-1.0.5-build/SPECPARTS + RPM_EC=0 ++ jobs -p + exit 0 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.vjsmi5 + umask 022 + cd /builddir/build/BUILD/rubygem-curb-1.0.5-build + cd /builddir/build/BUILD/rubygem-curb-1.0.5-build + rm -rf curb-1.0.5 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/curb-1.0.5.gem Unpacked gem: '/builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5' + STATUS=0 + '[' 0 -ne 0 ']' + cd curb-1.0.5 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . Patch #0 (rubygem-curb-1.0.5-Use-TestServlet-url-instead-of-external-connectivity.patch): + echo 'Patch #0 (rubygem-curb-1.0.5-Use-TestServlet-url-instead-of-external-connectivity.patch):' + /usr/bin/patch --no-backup-if-mismatch -f -p1 --fuzz=0 patching file tests/tc_curl_easy.rb Patch #1 (rubygem-curb-1.0.5-fix-callback-function-read_data_handler.patch): + echo 'Patch #1 (rubygem-curb-1.0.5-fix-callback-function-read_data_handler.patch):' + /usr/bin/patch --no-backup-if-mismatch -f -p1 --fuzz=0 patching file ext/curb_easy.c + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.CbwSTK + umask 022 + cd /builddir/build/BUILD/rubygem-curb-1.0.5-build + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd curb-1.0.5 + gem build ../curb-1.0.5.gemspec WARNING: expected RubyGems version 3.6.0.dev, was 3.2.33 WARNING: make sure you specify the oldest ruby version constraint (like ">= 3.0") that you want your gem to support by setting the `required_ruby_version` gemspec attribute WARNING: See https://guides.rubygems.org/specification-reference/ for help Successfully built RubyGem Name: curb Version: 1.0.5 File: curb-1.0.5.gem + mkdir -p ./usr/share/gems + CONFIGURE_ARGS='--with-cflags='\''-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer'\'' --with-cxxflags='\''-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer'\'' --with-ldflags='\''-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '\'' ' + gem install -V --local --build-root . --force --document=ri curb-1.0.5.gem WARNING: You build with buildroot. Build root: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5 Bin dir: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/bin Gem home: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems Plugins dir: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/plugins /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/LICENSE /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/README.markdown /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/Rakefile /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/doc.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/banned.h /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb.c /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb.h /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_easy.c /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_easy.h /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_errors.c /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_errors.h /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_macros.h /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_multi.c /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_multi.h /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_postfield.c /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_postfield.h /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_upload.c /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/curb_upload.h /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext/extconf.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curb.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/easy.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/alltests.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_crash_on_debug.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_crash_on_progress.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_curb_easy_blocks_ruby_threads.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_curb_easy_post_with_string_no_content_length_header.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_follow_redirect_288.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_instance_post_differs_from_class_post.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_issue102.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_issue277.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_multi_segfault.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_postfields_crash.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_postfields_crash2.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_raise_on_callback.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bug_require_last_or_segfault.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/bugtests.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/helper.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/mem_check.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/require_last_or_segfault_script.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/signals.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_download.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy_resolve.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy_setopt.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_maxfilesize.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_postfield.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_protocols.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/timeout.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/timeout_server.rb /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/unittests.rb Building native extensions. This could take a while... current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext ["/usr/bin/ruby", "-I/usr/share/rubygems", "extconf.rb"] checking for curl-config... yes checking for curlopt_tcp_keepalive... yes checking for curlopt_tcp_keepidle... yes checking for curlopt_tcp_keepintvl... yes checking for curlinfo_appconnect_time... yes checking for curlinfo_redirect_time... yes checking for curlinfo_response_code... yes checking for curlinfo_filetime... yes checking for curlinfo_redirect_count... yes checking for curlinfo_os_errno... yes checking for curlinfo_num_connects... yes checking for curlinfo_cookielist... yes checking for curlinfo_ftp_entry_path... yes checking for curl_version_ssl... yes checking for curl_version_libz... yes checking for curl_version_ntlm... yes checking for curl_version_gssnegotiate... yes checking for curl_version_debug... yes checking for curl_version_asynchdns... yes checking for curl_version_spnego... yes checking for curl_version_largefile... yes checking for curl_version_idn... yes checking for curl_version_sspi... yes checking for curl_version_conv... yes checking for curl_version_http2... yes checking for curlproxy_http... yes checking for curlproxy_socks4... yes checking for curlproxy_socks4a... yes checking for curlproxy_socks5... yes checking for curlproxy_socks5_hostname... yes checking for curlauth_basic... yes checking for curlauth_digest... yes checking for curlauth_gssnegotiate... yes checking for curlauth_ntlm... yes checking for curlauth_anysafe... yes checking for curlauth_any... yes checking for curle_tftp_notfound... yes checking for curle_tftp_perm... yes checking for curle_tftp_diskfull... yes checking for curle_tftp_illegal... yes checking for curle_tftp_unknownid... yes checking for curle_tftp_exists... yes checking for curle_tftp_nosuchuser... yes checking for curle_send_fail_rewind... yes checking for curle_ssl_engine_initfailed... yes checking for curle_login_denied... yes checking for curlopt_nosignal... yes checking for curlmopt_pipelining... yes checking for curlmopt_maxconnects... yes checking for curlopt_seekfunction... yes checking for curlopt_seekdata... yes checking for curlopt_sockoptfunction... yes checking for curlopt_sockoptdata... yes checking for curlopt_opensocketfunction... yes checking for curlopt_opensocketdata... yes checking for curle_conv_failed... yes checking for curle_conv_reqd... yes checking for curle_ssl_cacert_badfile... yes checking for curle_remote_file_not_found... yes checking for curle_ssh... yes checking for curle_ssl_shutdown_failed... yes checking for curle_again... yes checking for curle_ssl_crl_badfile... yes checking for curle_ssl_issuer_error... yes checking for curlinfo_redirect_url... yes checking for curlopt_username... yes checking for curlopt_password... yes checking for curlinfo_primary_ip... yes checking for curlauth_digest_ie... yes checking for curlftpmethod_multicwd... yes checking for curlftpmethod_nocwd... yes checking for curlftpmethod_singlecwd... yes checking for curlm_bad_socket... yes checking for curlm_unknown_option... yes checking for curl_multi_timeout()... yes checking for curl_multi_fdset()... yes checking for curl_multi_perform()... yes checking for curlopt_haproxyprotocol... yes checking for curlopt_interleavefunction... yes checking for curlopt_interleavedata... yes checking for curlopt_chunk_bgn_function... yes checking for curlopt_chunk_end_function... yes checking for curlopt_chunk_data... yes checking for curlopt_fnmatch_function... yes checking for curlopt_fnmatch_data... yes checking for curlopt_errorbuffer... yes checking for curlopt_stderr... yes checking for curlopt_failonerror... yes checking for curlopt_url... yes checking for curlopt_protocols... yes checking for curlopt_redir_protocols... yes checking for curlopt_proxy... yes checking for curlopt_proxyport... yes checking for curlopt_proxytype... yes checking for curlopt_noproxy... yes checking for curlopt_httpproxytunnel... yes checking for curlopt_socks5_gssapi_service... yes checking for curlopt_socks5_gssapi_nec... yes checking for curlopt_interface... yes checking for curlopt_localport... yes checking for curlopt_dns_cache_timeout... yes checking for curlopt_dns_use_global_cache... yes checking for curlopt_buffersize... yes checking for curlopt_port... yes checking for curlopt_tcp_nodelay... yes checking for curlopt_address_scope... yes checking for curlopt_netrc... yes checking for curl_netrc_optional... yes checking for curl_netrc_ignored... yes checking for curl_netrc_required... yes checking for curlopt_netrc_file... yes checking for curlopt_userpwd... yes checking for curlopt_proxyuserpwd... yes checking for curlopt_username... yes checking for curlopt_password... yes checking for curlopt_password... yes checking for curlopt_password... yes checking for curlopt_httpauth... yes checking for curlauth_digest_ie... yes checking for curlauth_only... yes checking for curlopt_tlsauth_type... yes checking for curlopt_tlsauth_srp... no checking for curlopt_tlsauth_username... yes checking for curlopt_tlsauth_password... yes checking for curlopt_proxyauth... yes checking for curlopt_autoreferer... yes checking for curlopt_encoding... yes checking for curlopt_followlocation... yes checking for curlopt_unrestricted_auth... yes checking for curlopt_maxredirs... yes checking for curlopt_postredir... yes checking for curlopt_put... yes checking for curlopt_post... yes checking for curlopt_postfields... yes checking for curlopt_postfieldsize... yes checking for curlopt_postfieldsize_large... yes checking for curlopt_copypostfields... yes checking for curlopt_httppost... yes checking for curlopt_referer... yes checking for curlopt_useragent... yes checking for curlopt_httpheader... yes checking for curlopt_proxyheader... yes checking for curlopt_http200aliases... yes checking for curlopt_cookie... yes checking for curlopt_cookiefile... yes checking for curlopt_cookiejar... yes checking for curlopt_cookiesession... yes checking for curlopt_cookielist... yes checking for curlopt_httpget... yes checking for curlopt_http_version... yes checking for curl_http_version_none... yes checking for curl_http_version_1_0... yes checking for curl_http_version_1_1... yes checking for curlopt_ignore_content_length... yes checking for curlopt_http_content_decoding... yes checking for curlopt_http_transfer_decoding... yes checking for curlopt_mail_from... yes checking for curlopt_mail_rcpt... yes checking for curlopt_tftp_blksize... yes checking for curlopt_ftpport... yes checking for curlopt_quote... yes checking for curlopt_postquote... yes checking for curlopt_prequote... yes checking for curlopt_dirlistonly... yes checking for curlopt_append... yes checking for curlopt_ftp_use_eprt... yes checking for curlopt_ftp_use_epsv... yes checking for curlopt_ftp_use_pret... yes checking for curlopt_ftp_create_missing_dirs... yes checking for curlopt_ftp_response_timeout... yes checking for curlopt_ftp_alternative_to_user... yes checking for curlopt_ftp_skip_pasv_ip... yes checking for curlopt_ftpsslauth... yes checking for curlftpauth_default... yes checking for curlftpauth_ssl... yes checking for curlftpauth_tls... yes checking for curlopt_ftp_ssl_ccc... yes checking for curlftpssl_ccc_none... yes checking for curlftpssl_ccc_passive... yes checking for curlftpssl_ccc_active... yes checking for curlopt_ftp_account... yes checking for curlopt_ftp_filemethod... yes checking for curlftpmethod_multicwd... yes checking for curlftpmethod_nocwd... yes checking for curlftpmethod_singlecwd... yes checking for curlopt_rtsp_request... yes checking for curl_rtspreq_options... yes checking for curl_rtspreq_describe... yes checking for curl_rtspreq_announce... yes checking for curl_rtspreq_setup... yes checking for curl_rtspreq_play... yes checking for curl_rtspreq_pause... yes checking for curl_rtspreq_teardown... yes checking for curl_rtspreq_get_parameter... yes checking for curl_rtspreq_set_parameter... yes checking for curl_rtspreq_record... yes checking for curl_rtspreq_receive... yes checking for curlopt_rtsp_session_id... yes checking for curlopt_rtsp_stream_uri... yes checking for curlopt_rtsp_transport... yes checking for curlopt_rtsp_header... no checking for curlopt_rtsp_client_cseq... yes checking for curlopt_rtsp_server_cseq... yes checking for curlopt_transfertext... yes checking for curlopt_proxy_transfer_mode... yes checking for curlopt_crlf... yes checking for curlopt_range... yes checking for curlopt_resume_from... yes checking for curlopt_resume_from_large... yes checking for curlopt_customrequest... yes checking for curlopt_filetime... yes checking for curlopt_nobody... yes checking for curlopt_infilesize... yes checking for curlopt_infilesize_large... yes checking for curlopt_upload... yes checking for curlopt_maxfilesize... yes checking for curlopt_maxfilesize_large... yes checking for curlopt_timecondition... yes checking for curlopt_timevalue... yes checking for curlopt_timeout... yes checking for curlopt_timeout_ms... yes checking for curlopt_low_speed_limit... yes checking for curlopt_low_speed_time... yes checking for curlopt_max_send_speed_large... yes checking for curlopt_max_recv_speed_large... yes checking for curlopt_maxconnects... yes checking for curlopt_closepolicy... yes checking for curlopt_fresh_connect... yes checking for curlopt_forbid_reuse... yes checking for curlopt_connecttimeout... yes checking for curlopt_connecttimeout_ms... yes checking for curlopt_ipresolve... yes checking for curl_ipresolve_whatever... yes checking for curl_ipresolve_v4... yes checking for curl_ipresolve_v6... yes checking for curlopt_connect_only... yes checking for curlopt_use_ssl... yes checking for curlusessl_none... yes checking for curlusessl_try... yes checking for curlusessl_control... yes checking for curlusessl_all... yes checking for curlopt_resolve... yes checking for curlopt_sslcert... yes checking for curlopt_sslcerttype... yes checking for curlopt_sslkey... yes checking for curlopt_sslkeytype... yes checking for curlopt_keypasswd... yes checking for curlopt_sslengine... yes checking for curlopt_sslengine_default... yes checking for curlopt_sslversion... yes checking for curl_sslversion_default... yes checking for CURL_SSLVERSION_TLSv1... yes checking for CURL_SSLVERSION_SSLv2... yes checking for CURL_SSLVERSION_SSLv3... yes checking for CURL_SSLVERSION_TLSv1_0... yes checking for CURL_SSLVERSION_TLSv1_1... yes checking for CURL_SSLVERSION_TLSv1_2... yes checking for CURL_SSLVERSION_TLSv1_3... yes checking for curlopt_ssl_verifypeer... yes checking for curlopt_cainfo... yes checking for curlopt_issuercert... yes checking for curlopt_capath... yes checking for curlopt_crlfile... yes checking for curlopt_ssl_verifyhost... yes checking for curlopt_certinfo... yes checking for curlopt_random_file... yes checking for curlopt_egdsocket... yes checking for curlopt_ssl_cipher_list... yes checking for curlopt_ssl_sessionid_cache... yes checking for curlopt_krblevel... yes checking for curlopt_ssh_auth_types... yes checking for curlopt_ssh_host_public_key_md5... yes checking for curlopt_ssh_public_keyfile... yes checking for curlopt_ssh_private_keyfile... yes checking for curlopt_ssh_knownhosts... yes checking for curlopt_ssh_keyfunction... yes checking for curlkhstat_fine_add_to_file... yes checking for curlkhstat_fine... yes checking for curlkhstat_reject... yes checking for curlkhstat_defer... yes checking for curlopt_ssh_keydata... yes checking for curlopt_private... yes checking for curlopt_share... yes checking for curlopt_new_file_perms... yes checking for curlopt_new_directory_perms... yes checking for curlopt_telnetoptions... yes checking for curle_not_built_in... yes checking for curle_obsolete... yes checking for curle_ftp_pret_failed... yes checking for curle_rtsp_cseq_error... yes checking for curle_rtsp_session_error... yes checking for curle_ftp_bad_file_list... yes checking for curle_chunk_failed... yes checking for curle_no_connection_available... yes checking for curle_ssl_pinnedpubkeynotmatch... yes checking for curle_ssl_invalidcertstatus... yes checking for curle_http2_stream... yes checking for curlopt_gssapi_delegation... yes checking for curlgssapi_delegation_policy_flag... yes checking for curlgssapi_delegation_flag... yes checking for CURLM_ADDED_ALREADY... yes checking for curlopt_unix_socket_path... yes checking for curlopt_path_as_is... yes checking for curlopt_pipewait... yes checking for curlopt_proxy_ssl_verifyhost... yes checking for curlproto_all... yes checking for curlproto_dict... yes checking for curlproto_file... yes checking for curlproto_ftp... yes checking for curlproto_ftps... yes checking for curlproto_gopher... yes checking for curlproto_http... yes checking for curlproto_https... yes checking for curlproto_imap... yes checking for curlproto_imaps... yes checking for curlproto_ldap... yes checking for curlproto_ldaps... yes checking for curlproto_pop3... yes checking for curlproto_pop3s... yes checking for curlproto_rtmp... yes checking for curlproto_rtmpe... yes checking for curlproto_rtmps... yes checking for curlproto_rtmpt... yes checking for curlproto_rtmpte... yes checking for curlproto_rtmpts... yes checking for curlproto_rtsp... yes checking for curlproto_scp... yes checking for curlproto_sftp... yes checking for curlproto_smb... yes checking for curlproto_smbs... yes checking for curlproto_smtp... yes checking for curlproto_smtps... yes checking for curlproto_telnet... yes checking for curlproto_tftp... yes checking for curl_easy_escape... yes checking for rb_thread_blocking_region()... no checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes checking for ruby/io.h... yes checking for rb_io_stdio_file()... yes creating curb_config.h creating Makefile current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext ["make", "DESTDIR=", "sitearchdir=./.gem.20241110-53-r18n7u", "sitelibdir=./.gem.20241110-53-r18n7u", "clean"] rm -f rm -fr curb_core.so false curb.o curb_easy.o curb_errors.o curb_multi.o curb_postfield.o curb_upload.o *.bak mkmf.log .*.time current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext ["make", "DESTDIR=", "sitearchdir=./.gem.20241110-53-r18n7u", "sitelibdir=./.gem.20241110-53-r18n7u"] gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Wall -m64 -o curb.o -c curb.c curb.c: In function ‘Init_curb_core’: curb.c:434:3: warning: ‘CURLOPT_IOCTLFUNCTION’ is deprecated: since 7.18.0. Use CURLOPT_SEEKFUNCTION [-Wdeprecated-declarations] 434 | CURB_DEFINE(CURLOPT_IOCTLFUNCTION); | ^~~~~~~~~~~ In file included from curb.h:19, from curb.c:8: /usr/include/curl/curl.h:1587:3: note: declared here 1587 | CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130, | ^~~~~~~~~~~~~~~~~ curb.c:435:3: warning: ‘CURLOPT_IOCTLDATA’ is deprecated: since 7.18.0. Use CURLOPT_SEEKDATA [-Wdeprecated-declarations] 435 | CURB_DEFINE(CURLOPT_IOCTLDATA); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1589:3: note: declared here 1589 | CURLOPTDEPRECATED(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131, | ^~~~~~~~~~~~~~~~~ curb.c:454:3: warning: ‘CURLOPT_PROGRESSFUNCTION’ is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations] 454 | CURB_DEFINE(CURLOPT_PROGRESSFUNCTION); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1304:3: note: declared here 1304 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56, | ^~~~~~~~~~~~~~~~~ curb.c:462:3: warning: ‘CURLOPT_CONV_TO_NETWORK_FUNCTION’ is deprecated: since 7.82.0. Serves no purpose anymore [-Wdeprecated-declarations] 462 | CURB_DEFINE(CURLOPT_CONV_TO_NETWORK_FUNCTION); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1635:3: note: declared here 1635 | CURLOPTDEPRECATED(CURLOPT_CONV_TO_NETWORK_FUNCTION, | ^~~~~~~~~~~~~~~~~ curb.c:463:3: warning: ‘CURLOPT_CONV_FROM_NETWORK_FUNCTION’ is deprecated: since 7.82.0. Serves no purpose anymore [-Wdeprecated-declarations] 463 | CURB_DEFINE(CURLOPT_CONV_FROM_NETWORK_FUNCTION); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1629:3: note: declared here 1629 | CURLOPTDEPRECATED(CURLOPT_CONV_FROM_NETWORK_FUNCTION, | ^~~~~~~~~~~~~~~~~ curb.c:464:3: warning: ‘CURLOPT_CONV_FROM_UTF8_FUNCTION’ is deprecated: since 7.82.0. Serves no purpose anymore [-Wdeprecated-declarations] 464 | CURB_DEFINE(CURLOPT_CONV_FROM_UTF8_FUNCTION); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1642:3: note: declared here 1642 | CURLOPTDEPRECATED(CURLOPT_CONV_FROM_UTF8_FUNCTION, | ^~~~~~~~~~~~~~~~~ curb.c:498:3: warning: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Wdeprecated-declarations] 498 | CURB_DEFINE(CURLOPT_PROTOCOLS); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1756:3: note: declared here 1756 | CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181, | ^~~~~~~~~~~~~~~~~ curb.c:501:3: warning: ‘CURLOPT_REDIR_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_REDIR_PROTOCOLS_STR [-Wdeprecated-declarations] 501 | CURB_DEFINE(CURLOPT_REDIR_PROTOCOLS); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1762:3: note: declared here 1762 | CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182, | ^~~~~~~~~~~~~~~~~ curb.c:513:3: warning: ‘CURLOPT_SOCKS5_GSSAPI_SERVICE’ is deprecated: since 7.49.0. Use CURLOPT_PROXY_SERVICE_NAME [-Wdeprecated-declarations] 513 | CURB_DEFINE(CURLOPT_SOCKS5_GSSAPI_SERVICE); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1745:3: note: declared here 1745 | CURLOPTDEPRECATED(CURLOPT_SOCKS5_GSSAPI_SERVICE, | ^~~~~~~~~~~~~~~~~ curb.c:523:3: warning: ‘CURLOPT_DNS_USE_GLOBAL_CACHE’ is deprecated: since 7.11.1. Use CURLOPT_SHARE [-Wdeprecated-declarations] 523 | CURB_DEFINE(CURLOPT_DNS_USE_GLOBAL_CACHE); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1431:3: note: declared here 1431 | CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91, | ^~~~~~~~~~~~~~~~~ curb.c:595:3: warning: ‘CURLOPT_PUT’ is deprecated: since 7.12.1. Use CURLOPT_UPLOAD [-Wdeprecated-declarations] 595 | CURB_DEFINE(CURLOPT_PUT); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1295:3: note: declared here 1295 | CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54, | ^~~~~~~~~~~~~~~~~ curb.c:609:3: warning: ‘CURLOPT_HTTPPOST’ is deprecated: since 7.56.0. Use CURLOPT_MIMEPOST [-Wdeprecated-declarations] 609 | CURB_DEFINE(CURLOPT_HTTPPOST); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1205:3: note: declared here 1205 | CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24, | ^~~~~~~~~~~~~~~~~ curb.c:983:3: warning: ‘CURLOPT_RANDOM_FILE’ is deprecated: since 7.84.0. Serves no purpose anymore [-Wdeprecated-declarations] 983 | CURB_DEFINE(CURLOPT_RANDOM_FILE); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1371:3: note: declared here 1371 | CURLOPTDEPRECATED(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76, | ^~~~~~~~~~~~~~~~~ curb.c:986:3: warning: ‘CURLOPT_EGDSOCKET’ is deprecated: since 7.84.0. Serves no purpose anymore [-Wdeprecated-declarations] 986 | CURB_DEFINE(CURLOPT_EGDSOCKET); | ^~~~~~~~~~~ /usr/include/curl/curl.h:1375:3: note: declared here 1375 | CURLOPTDEPRECATED(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77, | ^~~~~~~~~~~~~~~~~ gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Wall -m64 -o curb_easy.o -c curb_easy.c curb_easy.c: In function ‘read_data_handler’: curb_easy.c:76:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 76 | Data_Get_Struct(upload, ruby_curl_upload, rbcu); | ^~~~~~~~~~~~~~~ In file included from /usr/include/ruby/internal/core.h:27, from /usr/include/ruby/ruby.h:29, from /usr/include/ruby.h:38, from curb.h:11, from curb_easy.h:10, from curb_easy.c:7: /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘seek_data_handler’: curb_easy.c:112:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 112 | Data_Get_Struct(upload, ruby_curl_upload, rbcu); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_free’: curb_easy.c:249:5: warning: ‘CURLOPT_PROGRESSFUNCTION’ is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations] 249 | curl_easy_setopt(rbce->curl, CURLOPT_PROGRESSFUNCTION, NULL); | ^~~~~~~~~~~~~~~~ In file included from curb.h:19: /usr/include/curl/curl.h:1304:3: note: declared here 1304 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56, | ^~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_allocate’: curb_easy.c:323:3: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 323 | return Data_Wrap_Struct(klass, curl_easy_mark, curl_easy_free, rbce); | ^~~~~~ /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_initialize’: curb_easy.c:343:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 343 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_clone’: curb_easy.c:384:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 384 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:396:3: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 396 | return Data_Wrap_Struct(cCurlEasy, curl_easy_mark, curl_easy_free, newrbce); | ^~~~~~ /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_close’: curb_easy.c:411:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 411 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_reset’: curb_easy.c:454:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 454 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_url_get’: curb_easy.c:498:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 498 | CURB_OBJECT_HGETTER(ruby_curl_easy, url); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_url_get’: curb_easy.c:508:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 508 | CURB_OBJECT_HGETTER(ruby_curl_easy, proxy_url); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_headers_set’: curb_easy.c:534:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 534 | CURB_OBJECT_HSETTER(ruby_curl_easy, headers); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_headers_set’: curb_easy.c:538:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 538 | CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_headers); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_headers_get’: curb_easy.c:550:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 550 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_headers_get’: curb_easy.c:585:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 585 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_interface_get’: curb_easy.c:599:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 599 | CURB_OBJECT_HGETTER(ruby_curl_easy, interface_hm); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_userpwd_get’: curb_easy.c:610:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 610 | CURB_OBJECT_HGETTER(ruby_curl_easy, userpwd); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxypwd_get’: curb_easy.c:622:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 622 | CURB_OBJECT_HGETTER(ruby_curl_easy, proxypwd); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cookies_get’: curb_easy.c:632:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 632 | CURB_OBJECT_HGETTER(ruby_curl_easy, cookies); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cookiefile_get’: curb_easy.c:642:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 642 | CURB_OBJECT_HGETTER(ruby_curl_easy, cookiefile); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cookiejar_get’: curb_easy.c:652:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 652 | CURB_OBJECT_HGETTER(ruby_curl_easy, cookiejar); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cert_set’: curb_easy.c:664:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 664 | CURB_OBJECT_HSETTER(ruby_curl_easy, cert); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cert_get’: curb_easy.c:674:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 674 | CURB_OBJECT_HGETTER(ruby_curl_easy, cert); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cert_key_set’: curb_easy.c:686:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 686 | CURB_OBJECT_HSETTER(ruby_curl_easy, cert_key); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cert_key_get’: curb_easy.c:696:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 696 | CURB_OBJECT_HGETTER(ruby_curl_easy, cert_key); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cacert_set’: curb_easy.c:708:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 708 | CURB_OBJECT_HSETTER(ruby_curl_easy, cacert); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cacert_get’: curb_easy.c:718:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 718 | CURB_OBJECT_HGETTER(ruby_curl_easy, cacert); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_certpassword_set’: curb_easy.c:728:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 728 | CURB_OBJECT_HSETTER(ruby_curl_easy, certpassword); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_certtype_set’: curb_easy.c:740:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 740 | CURB_OBJECT_HSETTER(ruby_curl_easy, certtype); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_certtype_get’: curb_easy.c:750:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 750 | CURB_OBJECT_HGETTER(ruby_curl_easy, certtype); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_encoding_set’: curb_easy.c:761:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 761 | CURB_OBJECT_HSETTER(ruby_curl_easy, encoding); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_encoding_get’: curb_easy.c:771:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 771 | CURB_OBJECT_HGETTER(ruby_curl_easy, encoding); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_useragent_set’: curb_easy.c:782:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 782 | CURB_OBJECT_HSETTER(ruby_curl_easy, useragent); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_useragent_get’: curb_easy.c:792:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 792 | CURB_OBJECT_HGETTER(ruby_curl_easy, useragent); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_post_body_set’: curb_easy.c:812:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 812 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_post_body_get’: curb_easy.c:856:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 856 | CURB_OBJECT_HGETTER(ruby_curl_easy, postdata_buffer); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_put_data_set’: curb_easy.c:873:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 873 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ftp_commands_set’: curb_easy.c:952:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 952 | CURB_OBJECT_HSETTER(ruby_curl_easy, ftp_commands); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ftp_commands_get’: curb_easy.c:960:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 960 | CURB_OBJECT_HGETTER(ruby_curl_easy, ftp_commands); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_resolve_set’: curb_easy.c:971:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 971 | CURB_OBJECT_HSETTER(ruby_curl_easy, resolve); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_resolve_get’: curb_easy.c:979:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 979 | CURB_OBJECT_HGETTER(ruby_curl_easy, resolve); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_local_port_set’: curb_easy.c:996:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 996 | CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port, "port"); | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_local_port_get’: curb_easy.c:1008:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1008 | CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port); | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_local_port_range_set’: curb_easy.c:1026:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1026 | CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port_range, "port range"); | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_local_port_range_get’: curb_easy.c:1039:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1039 | CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port_range); | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_port_set’: curb_easy.c:1049:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1049 | CURB_IMMED_PORT_SETTER(ruby_curl_easy, proxy_port, "port"); | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_port_get’: curb_easy.c:1059:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1059 | CURB_IMMED_PORT_GETTER(ruby_curl_easy, proxy_port); | ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_type_set’: curb_easy.c:1070:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1070 | CURB_IMMED_SETTER(ruby_curl_easy, proxy_type, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_type_get’: curb_easy.c:1080:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1080 | CURB_IMMED_GETTER(ruby_curl_easy, proxy_type, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_http_auth_types_set’: curb_easy.c:1118:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1118 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_http_auth_types_get’: curb_easy.c:1152:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1152 | CURB_IMMED_GETTER(ruby_curl_easy, http_auth_types, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_auth_types_set’: curb_easy.c:1164:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1164 | CURB_IMMED_SETTER(ruby_curl_easy, proxy_auth_types, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_auth_types_get’: curb_easy.c:1175:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1175 | CURB_IMMED_GETTER(ruby_curl_easy, proxy_auth_types, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_max_redirects_set’: curb_easy.c:1190:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1190 | CURB_IMMED_SETTER(ruby_curl_easy, max_redirs, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_max_redirects_get’: curb_easy.c:1201:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1201 | CURB_IMMED_GETTER(ruby_curl_easy, max_redirs, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_timeout_set’: curb_easy.c:1223:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1223 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_timeout_get’: curb_easy.c:1246:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1246 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_timeout_ms_set’: curb_easy.c:1264:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1264 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_timeout_ms_get’: curb_easy.c:1284:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1284 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_connect_timeout_set’: curb_easy.c:1300:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1300 | CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_connect_timeout_get’: curb_easy.c:1311:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1311 | CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_connect_timeout_ms_set’: curb_easy.c:1326:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1326 | CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout_ms, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_connect_timeout_ms_get’: curb_easy.c:1337:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1337 | CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout_ms, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_dns_cache_timeout_set’: curb_easy.c:1350:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1350 | CURB_IMMED_SETTER(ruby_curl_easy, dns_cache_timeout, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_dns_cache_timeout_get’: curb_easy.c:1360:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1360 | CURB_IMMED_GETTER(ruby_curl_easy, dns_cache_timeout, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ftp_response_timeout_set’: curb_easy.c:1377:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1377 | CURB_IMMED_SETTER(ruby_curl_easy, ftp_response_timeout, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ftp_response_timeout_get’: curb_easy.c:1387:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1387 | CURB_IMMED_GETTER(ruby_curl_easy, ftp_response_timeout, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_low_speed_limit_set’: curb_easy.c:1399:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1399 | CURB_IMMED_SETTER(ruby_curl_easy, low_speed_limit, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_low_speed_limit_get’: curb_easy.c:1410:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1410 | CURB_IMMED_GETTER(ruby_curl_easy, low_speed_limit, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_low_speed_time_set’: curb_easy.c:1421:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1421 | CURB_IMMED_SETTER(ruby_curl_easy, low_speed_time, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_low_speed_time_get’: curb_easy.c:1432:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1432 | CURB_IMMED_GETTER(ruby_curl_easy, low_speed_time, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_max_send_speed_large_set’: curb_easy.c:1442:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1442 | CURB_IMMED_SETTER(ruby_curl_easy, max_send_speed_large, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_max_send_speed_large_get’: curb_easy.c:1452:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1452 | CURB_IMMED_GETTER(ruby_curl_easy, max_send_speed_large, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_max_recv_speed_large_set’: curb_easy.c:1462:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1462 | CURB_IMMED_SETTER(ruby_curl_easy, max_recv_speed_large, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_max_recv_speed_large_get’: curb_easy.c:1472:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1472 | CURB_IMMED_GETTER(ruby_curl_easy, max_recv_speed_large, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_username_set’: curb_easy.c:1483:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1483 | CURB_OBJECT_HSETTER(ruby_curl_easy, username); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_username_get’: curb_easy.c:1497:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1497 | CURB_OBJECT_HGETTER(ruby_curl_easy, username); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_password_set’: curb_easy.c:1511:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1511 | CURB_OBJECT_HSETTER(ruby_curl_easy, password); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_password_get’: curb_easy.c:1525:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1525 | CURB_OBJECT_HGETTER(ruby_curl_easy, password); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ssl_version_set’: curb_easy.c:1548:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1548 | CURB_IMMED_SETTER(ruby_curl_easy, ssl_version, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ssl_version_get’: curb_easy.c:1558:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1558 | CURB_IMMED_GETTER(ruby_curl_easy, ssl_version, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_use_ssl_set’: curb_easy.c:1569:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1569 | CURB_IMMED_SETTER(ruby_curl_easy, use_ssl, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_use_ssl_get’: curb_easy.c:1579:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1579 | CURB_IMMED_GETTER(ruby_curl_easy, use_ssl, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ftp_filemethod_set’: curb_easy.c:1590:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1590 | CURB_IMMED_SETTER(ruby_curl_easy, ftp_filemethod, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ftp_filemethod_get’: curb_easy.c:1600:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1600 | CURB_IMMED_GETTER(ruby_curl_easy, ftp_filemethod, -1); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_tunnel_set’: curb_easy.c:1612:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1612 | CURB_BOOLEAN_SETTER(ruby_curl_easy, proxy_tunnel); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_proxy_tunnel_q’: curb_easy.c:1622:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1622 | CURB_BOOLEAN_GETTER(ruby_curl_easy, proxy_tunnel); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_fetch_file_time_set’: curb_easy.c:1633:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1633 | CURB_BOOLEAN_SETTER(ruby_curl_easy, fetch_file_time); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_fetch_file_time_q’: curb_easy.c:1644:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1644 | CURB_BOOLEAN_GETTER(ruby_curl_easy, fetch_file_time); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ssl_verify_peer_set’: curb_easy.c:1662:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1662 | CURB_BOOLEAN_SETTER(ruby_curl_easy, ssl_verify_peer); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ssl_verify_peer_q’: curb_easy.c:1673:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1673 | CURB_BOOLEAN_GETTER(ruby_curl_easy, ssl_verify_peer); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ssl_verify_host_set’: curb_easy.c:1690:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1690 | CURB_IMMED_SETTER(ruby_curl_easy, ssl_verify_host, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ssl_verify_host_get’: curb_easy.c:1701:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1701 | CURB_IMMED_GETTER(ruby_curl_easy, ssl_verify_host, 0); | ^~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_header_in_body_set’: curb_easy.c:1713:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1713 | CURB_BOOLEAN_SETTER(ruby_curl_easy, header_in_body); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_header_in_body_q’: curb_easy.c:1724:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1724 | CURB_BOOLEAN_GETTER(ruby_curl_easy, header_in_body); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_use_netrc_set’: curb_easy.c:1735:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1735 | CURB_BOOLEAN_SETTER(ruby_curl_easy, use_netrc); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_use_netrc_q’: curb_easy.c:1746:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1746 | CURB_BOOLEAN_GETTER(ruby_curl_easy, use_netrc); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_autoreferer_set’: curb_easy.c:1757:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1757 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_follow_location_q’: curb_easy.c:1777:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1777 | CURB_BOOLEAN_GETTER(ruby_curl_easy, follow_location); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_unrestricted_auth_set’: curb_easy.c:1788:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1788 | CURB_BOOLEAN_SETTER(ruby_curl_easy, unrestricted_auth); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_unrestricted_auth_q’: curb_easy.c:1799:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1799 | CURB_BOOLEAN_GETTER(ruby_curl_easy, unrestricted_auth); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_verbose_set’: curb_easy.c:1810:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1810 | CURB_BOOLEAN_SETTER(ruby_curl_easy, verbose); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_verbose_q’: curb_easy.c:1821:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1821 | CURB_BOOLEAN_GETTER(ruby_curl_easy, verbose); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_multipart_form_post_set’: curb_easy.c:1839:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1839 | CURB_BOOLEAN_SETTER(ruby_curl_easy, multipart_form_post); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_multipart_form_post_q’: curb_easy.c:1850:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1850 | CURB_BOOLEAN_GETTER(ruby_curl_easy, multipart_form_post); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_enable_cookies_set’: curb_easy.c:1862:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1862 | CURB_BOOLEAN_SETTER(ruby_curl_easy, enable_cookies); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_enable_cookies_q’: curb_easy.c:1873:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1873 | CURB_BOOLEAN_GETTER(ruby_curl_easy, enable_cookies); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ignore_content_length_set’: curb_easy.c:1885:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1885 | CURB_BOOLEAN_SETTER(ruby_curl_easy, ignore_content_length); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ignore_content_length_q’: curb_easy.c:1896:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1896 | CURB_BOOLEAN_GETTER(ruby_curl_easy, ignore_content_length); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_resolve_mode’: curb_easy.c:1909:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1909 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_resolve_mode_set’: curb_easy.c:1941:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1941 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_on_body_set’: curb_easy.c:1980:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1980 | CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, body_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_on_success_set’: curb_easy.c:1995:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 1995 | CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, success_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_on_failure_set’: curb_easy.c:2010:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2010 | CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, failure_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_on_missing_set’: curb_easy.c:2025:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2025 | CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, missing_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_on_redirect_set’: curb_easy.c:2040:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2040 | CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, redirect_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_on_complete_set’: curb_easy.c:2054:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2054 | CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, complete_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_on_header_set’: curb_easy.c:2070:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2070 | CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, header_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_on_progress_set’: curb_easy.c:2091:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2091 | CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, progress_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_on_debug_set’: curb_easy.c:2112:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2112 | CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, debug_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/ruby/internal/assume.h:29, from /usr/include/ruby/backward/2/assume.h:24, from /usr/include/ruby/defines.h:72, from /usr/include/ruby/ruby.h:25: curb_easy.c: In function ‘cb_each_http_header’: curb_easy.c:2125:32: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2125 | Data_Get_Struct(wrap, struct curl_slist *, list); | ^~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘cb_each_http_proxy_header’: curb_easy.c:2160:32: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2160 | Data_Get_Struct(wrap, struct curl_slist *, list); | ^~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘cb_each_ftp_command’: curb_easy.c:2191:32: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2191 | Data_Get_Struct(wrap, struct curl_slist *, list); | ^~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘cb_each_resolve’: curb_easy.c:2205:32: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2205 | Data_Get_Struct(wrap, struct curl_slist *, list); | ^~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_setup’: curb_easy.c:2310:5: warning: ‘CURLOPT_PROGRESSFUNCTION’ is deprecated: since 7.32.0. Use CURLOPT_XFERINFOFUNCTION [-Wdeprecated-declarations] 2310 | curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, (curl_progress_callback)&proc_progress_handler); | ^~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:1304:3: note: declared here 1304 | CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56, | ^~~~~~~~~~~~~~~~~ curb_easy.c:2497:7: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2497 | VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, hdrs); | ^~~~~ /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:2498:7: warning: ‘rb_iterate’ is deprecated: by: rb_block_call since 1.9 [-Wdeprecated-declarations] 2498 | rb_iterate(rb_each, rb_easy_get("headers"), cb_each_http_header, wrap); | ^~~~~~~~~~ In file included from /usr/include/ruby/ruby.h:41: /usr/include/ruby/internal/iterator.h:283:7: note: declared here 283 | VALUE rb_iterate(VALUE (*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2); | ^~~~~~~~~~ curb_easy.c:2515:7: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2515 | VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, phdrs); | ^~~~~ /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:2516:7: warning: ‘rb_iterate’ is deprecated: by: rb_block_call since 1.9 [-Wdeprecated-declarations] 2516 | rb_iterate(rb_each, rb_easy_get("proxy_headers"), cb_each_http_proxy_header, wrap); | ^~~~~~~~~~ /usr/include/ruby/internal/iterator.h:283:7: note: declared here 283 | VALUE rb_iterate(VALUE (*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2); | ^~~~~~~~~~ curb_easy.c:2531:7: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2531 | VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, cmds); | ^~~~~ /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:2532:7: warning: ‘rb_iterate’ is deprecated: by: rb_block_call since 1.9 [-Wdeprecated-declarations] 2532 | rb_iterate(rb_each, rb_easy_get("ftp_commands"), cb_each_ftp_command, wrap); | ^~~~~~~~~~ /usr/include/ruby/internal/iterator.h:283:7: note: declared here 283 | VALUE rb_iterate(VALUE (*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2); | ^~~~~~~~~~ curb_easy.c:2544:7: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2544 | VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, rslv); | ^~~~~ /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:2545:7: warning: ‘rb_iterate’ is deprecated: by: rb_block_call since 1.9 [-Wdeprecated-declarations] 2545 | rb_iterate(rb_each, rb_easy_get("resolve"), cb_each_resolve, wrap); | ^~~~~~~~~~ /usr/include/ruby/internal/iterator.h:283:7: note: declared here 283 | VALUE rb_iterate(VALUE (*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2); | ^~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_perform_verb_str’: curb_easy.c:2614:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2614 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_perform_post’: curb_easy.c:2681:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2681 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:2714:5: warning: ‘CURLOPT_HTTPPOST’ is deprecated: since 7.56.0. Use CURLOPT_MIMEPOST [-Wdeprecated-declarations] 2714 | curl_easy_setopt(curl, CURLOPT_HTTPPOST, first); | ^~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:1205:3: note: declared here 1205 | CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24, | ^~~~~~~~~~~~~~~~~ curb_easy.c:2716:5: warning: ‘curl_formfree’ is deprecated: since 7.56.0. Use curl_mime_free() [-Wdeprecated-declarations] 2716 | curl_formfree(first); | ^~~~~~~~~~~~~ /usr/include/curl/curl.h:2630:1: note: declared here 2630 | curl_formfree(struct curl_httppost *form); | ^~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_perform_put’: curb_easy.c:2754:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2754 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_body_str_get’: curb_easy.c:2781:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2781 | CURB_OBJECT_HGETTER(ruby_curl_easy, body_data); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_header_str_get’: curb_easy.c:2793:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2793 | CURB_OBJECT_HGETTER(ruby_curl_easy, header_data); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_last_effective_url_get’: curb_easy.c:2811:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2811 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_response_code_get’: curb_easy.c:2834:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2834 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_primary_ip_get’: curb_easy.c:2858:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2858 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_http_connect_code_get’: curb_easy.c:2879:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2879 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_file_time_get’: curb_easy.c:2907:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2907 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_total_time_get’: curb_easy.c:2928:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2928 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_name_lookup_time_get’: curb_easy.c:2945:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2945 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_connect_time_get’: curb_easy.c:2962:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2962 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_app_connect_time_get’: curb_easy.c:2983:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 2983 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_pre_transfer_time_get’: curb_easy.c:3004:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3004 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_start_transfer_time_get’: curb_easy.c:3022:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3022 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_redirect_time_get’: curb_easy.c:3044:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3044 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_redirect_count_get’: curb_easy.c:3067:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3067 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_redirect_url_get’: curb_easy.c:3092:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3092 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_uploaded_bytes_get’: curb_easy.c:3119:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3119 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3120:3: warning: ‘CURLINFO_SIZE_UPLOAD’ is deprecated: since 7.55.0. Use CURLINFO_SIZE_UPLOAD_T [-Wdeprecated-declarations] 3120 | curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_UPLOAD, &bytes); | ^~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2872:3: note: declared here 2872 | CURLINFO_SIZE_UPLOAD CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_UPLOAD_T") | ^~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_downloaded_bytes_get’: curb_easy.c:3136:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3136 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3137:3: warning: ‘CURLINFO_SIZE_DOWNLOAD’ is deprecated: since 7.55.0. Use CURLINFO_SIZE_DOWNLOAD_T [-Wdeprecated-declarations] 3137 | curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_DOWNLOAD, &bytes); | ^~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2875:3: note: declared here 2875 | CURLINFO_SIZE_DOWNLOAD | ^~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_upload_speed_get’: curb_easy.c:3153:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3153 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3154:3: warning: ‘CURLINFO_SPEED_UPLOAD’ is deprecated: since 7.55.0. Use CURLINFO_SPEED_UPLOAD_T [-Wdeprecated-declarations] 3154 | curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_UPLOAD, &bytes); | ^~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2883:3: note: declared here 2883 | CURLINFO_SPEED_UPLOAD | ^~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_download_speed_get’: curb_easy.c:3170:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3170 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3171:3: warning: ‘CURLINFO_SPEED_DOWNLOAD’ is deprecated: since 7.55.0. Use CURLINFO_SPEED_DOWNLOAD_T [-Wdeprecated-declarations] 3171 | curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_DOWNLOAD, &bytes); | ^~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2879:3: note: declared here 2879 | CURLINFO_SPEED_DOWNLOAD | ^~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_header_size_get’: curb_easy.c:3187:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3187 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_request_size_get’: curb_easy.c:3205:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3205 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ssl_verify_result_get’: curb_easy.c:3222:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3222 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_downloaded_content_length_get’: curb_easy.c:3247:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3247 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3248:3: warning: ‘CURLINFO_CONTENT_LENGTH_DOWNLOAD’ is deprecated: since 7.55.0. Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T [-Wdeprecated-declarations] 3248 | curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &bytes); | ^~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2892:3: note: declared here 2892 | CURLINFO_CONTENT_LENGTH_DOWNLOAD | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_uploaded_content_length_get’: curb_easy.c:3263:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3263 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3264:3: warning: ‘CURLINFO_CONTENT_LENGTH_UPLOAD’ is deprecated: since 7.55.0. Use CURLINFO_CONTENT_LENGTH_UPLOAD_T [-Wdeprecated-declarations] 3264 | curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &bytes); | ^~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2897:3: note: declared here 2897 | CURLINFO_CONTENT_LENGTH_UPLOAD | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_content_type_get’: curb_easy.c:3282:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3282 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_os_errno_get’: curb_easy.c:3325:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3325 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_num_connects_get’: curb_easy.c:3354:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3354 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_cookielist_get’: curb_easy.c:3383:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3383 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_ftp_entry_path_get’: curb_easy.c:3423:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3423 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_multi_get’: curb_easy.c:3443:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3443 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_multi_set’: curb_easy.c:3453:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3453 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_last_result’: curb_easy.c:3464:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3464 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_last_error’: curb_easy.c:3474:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3474 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_set_opt’: curb_easy.c:3494:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3494 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3500:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3500 | CURB_BOOLEAN_SETTER(ruby_curl_easy, verbose); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3504:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3504 | CURB_BOOLEAN_SETTER(ruby_curl_easy, follow_location); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3511:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3511 | CURB_OBJECT_HSETTER(ruby_curl_easy, url); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3521:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3521 | CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_url); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3525:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3525 | CURB_OBJECT_HSETTER(ruby_curl_easy, interface_hm); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3560:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3560 | CURB_OBJECT_HSETTER(ruby_curl_easy, userpwd); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3564:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3564 | CURB_OBJECT_HSETTER(ruby_curl_easy, proxypwd); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3568:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3568 | CURB_OBJECT_HSETTER(ruby_curl_easy, cookies); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3572:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3572 | CURB_OBJECT_HSETTER(ruby_curl_easy, cookiefile); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3576:5: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3576 | CURB_OBJECT_HSETTER(ruby_curl_easy, cookiejar); | ^~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c:3644:3: warning: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Wdeprecated-declarations] 3644 | case CURLOPT_PROTOCOLS: | ^~~~ /usr/include/curl/curl.h:1756:3: note: declared here 1756 | CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181, | ^~~~~~~~~~~~~~~~~ curb_easy.c:3645:3: warning: ‘CURLOPT_REDIR_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_REDIR_PROTOCOLS_STR [-Wdeprecated-declarations] 3645 | case CURLOPT_REDIR_PROTOCOLS: | ^~~~ /usr/include/curl/curl.h:1762:3: note: declared here 1762 | CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182, | ^~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_inspect’: curb_easy.c:3682:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3682 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_escape’: curb_easy.c:3714:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3714 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_easy.c: In function ‘ruby_curl_easy_unescape’: curb_easy.c:3745:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 3745 | Data_Get_Struct(self, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Wall -m64 -o curb_errors.o -c curb_errors.c gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Wall -m64 -o curb_multi.o -c curb_multi.c curb_multi.c: In function ‘ruby_curl_multi_new’: curb_multi.c:99:3: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 99 | return Data_Wrap_Struct(klass, 0, curl_multi_free, rbcm); | ^~~~~~ In file included from /usr/include/ruby/internal/core.h:27, from /usr/include/ruby/ruby.h:29, from /usr/include/ruby.h:38, from curb_multi.c:7: /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_multi.c: In function ‘ruby_curl_multi_max_connects’: curb_multi.c:167:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 167 | Data_Get_Struct(self, ruby_curl_multi, rbcm); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_multi.c: In function ‘ruby_curl_multi_pipeline’: curb_multi.c:201:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 201 | Data_Get_Struct(self, ruby_curl_multi, rbcm); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_multi.c: In function ‘ruby_curl_multi_add’: curb_multi.c:221:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 221 | Data_Get_Struct(self, ruby_curl_multi, rbcm); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_multi.c:222:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 222 | Data_Get_Struct(easy, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_multi.c: In function ‘ruby_curl_multi_remove’: curb_multi.c:261:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 261 | Data_Get_Struct(self, ruby_curl_multi, rbcm); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_multi.c: In function ‘rb_curl_multi_remove’: curb_multi.c:271:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 271 | Data_Get_Struct(easy, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_multi.c: In function ‘rb_curl_mutli_handle_complete’: curb_multi.c:298:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 298 | Data_Get_Struct(easy, ruby_curl_easy, rbce); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_multi.c: In function ‘ruby_curl_multi_perform’: curb_multi.c:508:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 508 | Data_Get_Struct(self, ruby_curl_multi, rbcm); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_multi.c: In function ‘ruby_curl_multi_close’: curb_multi.c:642:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 642 | Data_Get_Struct(self, ruby_curl_multi, rbcm); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Wall -m64 -o curb_postfield.o -c curb_postfield.c curb_postfield.c: In function ‘append_to_form’: curb_postfield.c:35:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 35 | Data_Get_Struct(self, ruby_curl_postfield, rbcpf); | ^~~~~~~~~~~~~~~ In file included from /usr/include/ruby/internal/core.h:27, from /usr/include/ruby/ruby.h:29, from /usr/include/ruby.h:38, from curb.h:11, from curb_postfield.h:10, from curb_postfield.c:7: /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:50:13: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 50 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ In file included from curb.h:19: /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:50:13: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 50 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:51:48: warning: ‘CURLFORM_BUFFER’ is deprecated: since 7.56.0. Use curl_mime_filename() [-Wdeprecated-declarations] 51 | CURLFORM_BUFFER, StringValuePtr(rbcpf->remote_file), | ^~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2530:3: note: declared here 2530 | CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"), | ^~~~~~~~~~~~~~~ curb_postfield.c:52:48: warning: ‘CURLFORM_BUFFERPTR’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 52 | CURLFORM_BUFFERPTR, StringValuePtr(rbcpf->buffer_str), | ^~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2531:3: note: declared here 2531 | CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~ curb_postfield.c:53:48: warning: ‘CURLFORM_BUFFERLENGTH’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 53 | CURLFORM_BUFFERLENGTH, RSTRING_LEN(rbcpf->buffer_str), | ^~~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2532:3: note: declared here 2532 | CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:56:13: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 56 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:56:13: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 56 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:57:48: warning: ‘CURLFORM_BUFFER’ is deprecated: since 7.56.0. Use curl_mime_filename() [-Wdeprecated-declarations] 57 | CURLFORM_BUFFER, StringValuePtr(rbcpf->remote_file), | ^~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2530:3: note: declared here 2530 | CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"), | ^~~~~~~~~~~~~~~ curb_postfield.c:58:48: warning: ‘CURLFORM_BUFFERPTR’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 58 | CURLFORM_BUFFERPTR, StringValuePtr(rbcpf->buffer_str), | ^~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2531:3: note: declared here 2531 | CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~ curb_postfield.c:59:48: warning: ‘CURLFORM_BUFFERLENGTH’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 59 | CURLFORM_BUFFERLENGTH, RSTRING_LEN(rbcpf->buffer_str), | ^~~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2532:3: note: declared here 2532 | CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:60:48: warning: ‘CURLFORM_CONTENTTYPE’ is deprecated: since 7.56.0. Use curl_mime_type() [-Wdeprecated-declarations] 60 | CURLFORM_CONTENTTYPE, StringValuePtr(rbcpf->content_type), | ^~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2534:3: note: declared here 2534 | CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"), | ^~~~~~~~~~~~~~~~~~~~ curb_postfield.c:70:13: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 70 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:70:13: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 70 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:71:48: warning: ‘CURLFORM_BUFFER’ is deprecated: since 7.56.0. Use curl_mime_filename() [-Wdeprecated-declarations] 71 | CURLFORM_BUFFER, StringValuePtr(rbcpf->remote_file), | ^~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2530:3: note: declared here 2530 | CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"), | ^~~~~~~~~~~~~~~ curb_postfield.c:72:48: warning: ‘CURLFORM_BUFFERPTR’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 72 | CURLFORM_BUFFERPTR, StringValuePtr(rbcpf->content), | ^~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2531:3: note: declared here 2531 | CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~ curb_postfield.c:73:48: warning: ‘CURLFORM_BUFFERLENGTH’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 73 | CURLFORM_BUFFERLENGTH, RSTRING_LEN(rbcpf->content), | ^~~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2532:3: note: declared here 2532 | CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:76:13: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 76 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:76:13: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 76 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:77:48: warning: ‘CURLFORM_BUFFER’ is deprecated: since 7.56.0. Use curl_mime_filename() [-Wdeprecated-declarations] 77 | CURLFORM_BUFFER, StringValuePtr(rbcpf->remote_file), | ^~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2530:3: note: declared here 2530 | CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"), | ^~~~~~~~~~~~~~~ curb_postfield.c:78:48: warning: ‘CURLFORM_BUFFERPTR’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 78 | CURLFORM_BUFFERPTR, StringValuePtr(rbcpf->content), | ^~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2531:3: note: declared here 2531 | CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~ curb_postfield.c:79:48: warning: ‘CURLFORM_BUFFERLENGTH’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 79 | CURLFORM_BUFFERLENGTH, RSTRING_LEN(rbcpf->content), | ^~~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2532:3: note: declared here 2532 | CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:80:48: warning: ‘CURLFORM_CONTENTTYPE’ is deprecated: since 7.56.0. Use curl_mime_type() [-Wdeprecated-declarations] 80 | CURLFORM_CONTENTTYPE, StringValuePtr(rbcpf->content_type), | ^~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2534:3: note: declared here 2534 | CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"), | ^~~~~~~~~~~~~~~~~~~~ curb_postfield.c:94:13: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 94 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:94:13: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 94 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:95:48: warning: ‘CURLFORM_FILE’ is deprecated: since 7.56.0. Use curl_mime_filedata() [-Wdeprecated-declarations] 95 | CURLFORM_FILE, StringValuePtr(rbcpf->local_file), | ^~~~~~~~~~~~~ /usr/include/curl/curl.h:2528:3: note: declared here 2528 | CURLFORM_FILE CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"), | ^~~~~~~~~~~~~ curb_postfield.c:96:48: warning: ‘CURLFORM_FILENAME’ is deprecated: since 7.56.0. Use curl_mime_filename() [-Wdeprecated-declarations] 96 | CURLFORM_FILENAME, StringValuePtr(rbcpf->remote_file), | ^~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2536:3: note: declared here 2536 | CURLFORM_FILENAME CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"), | ^~~~~~~~~~~~~~~~~ curb_postfield.c:99:13: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 99 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:99:13: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 99 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:100:48: warning: ‘CURLFORM_FILE’ is deprecated: since 7.56.0. Use curl_mime_filedata() [-Wdeprecated-declarations] 100 | CURLFORM_FILE, StringValuePtr(rbcpf->local_file), | ^~~~~~~~~~~~~ /usr/include/curl/curl.h:2528:3: note: declared here 2528 | CURLFORM_FILE CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"), | ^~~~~~~~~~~~~ curb_postfield.c:101:48: warning: ‘CURLFORM_FILENAME’ is deprecated: since 7.56.0. Use curl_mime_filename() [-Wdeprecated-declarations] 101 | CURLFORM_FILENAME, StringValuePtr(rbcpf->remote_file), | ^~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2536:3: note: declared here 2536 | CURLFORM_FILENAME CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"), | ^~~~~~~~~~~~~~~~~ curb_postfield.c:102:48: warning: ‘CURLFORM_CONTENTTYPE’ is deprecated: since 7.56.0. Use curl_mime_type() [-Wdeprecated-declarations] 102 | CURLFORM_CONTENTTYPE, StringValuePtr(rbcpf->content_type), | ^~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2534:3: note: declared here 2534 | CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"), | ^~~~~~~~~~~~~~~~~~~~ curb_postfield.c:115:11: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 115 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:115:11: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 115 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:116:46: warning: ‘CURLFORM_PTRCONTENTS’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 116 | CURLFORM_PTRCONTENTS, StringValuePtr(rbcpf->buffer_str), | ^~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2523:3: note: declared here 2523 | CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~ curb_postfield.c:117:46: warning: ‘CURLFORM_CONTENTSLENGTH’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 117 | CURLFORM_CONTENTSLENGTH, RSTRING_LEN(rbcpf->buffer_str), | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2524:3: note: declared here 2524 | CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:120:11: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 120 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:120:11: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 120 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:121:46: warning: ‘CURLFORM_PTRCONTENTS’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 121 | CURLFORM_PTRCONTENTS, StringValuePtr(rbcpf->buffer_str), | ^~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2523:3: note: declared here 2523 | CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~ curb_postfield.c:122:46: warning: ‘CURLFORM_CONTENTSLENGTH’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 122 | CURLFORM_CONTENTSLENGTH, RSTRING_LEN(rbcpf->buffer_str), | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2524:3: note: declared here 2524 | CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:123:46: warning: ‘CURLFORM_CONTENTTYPE’ is deprecated: since 7.56.0. Use curl_mime_type() [-Wdeprecated-declarations] 123 | CURLFORM_CONTENTTYPE, StringValuePtr(rbcpf->content_type), | ^~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2534:3: note: declared here 2534 | CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"), | ^~~~~~~~~~~~~~~~~~~~ curb_postfield.c:128:11: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 128 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:128:11: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 128 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:129:46: warning: ‘CURLFORM_PTRCONTENTS’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 129 | CURLFORM_PTRCONTENTS, StringValuePtr(rbcpf->content), | ^~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2523:3: note: declared here 2523 | CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~ curb_postfield.c:130:46: warning: ‘CURLFORM_CONTENTSLENGTH’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 130 | CURLFORM_CONTENTSLENGTH, RSTRING_LEN(rbcpf->content), | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2524:3: note: declared here 2524 | CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:133:11: warning: ‘curl_formadd’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations] 133 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2594:1: note: declared here 2594 | curl_formadd(struct curl_httppost **httppost, | ^~~~~~~~~~~~ curb_postfield.c:133:11: warning: ‘CURLFORM_PTRNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations] 133 | result = curl_formadd(first, last, CURLFORM_PTRNAME, StringValuePtr(rbcpf->name), | ^~~~~~ /usr/include/curl/curl.h:2520:3: note: declared here 2520 | CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"), | ^~~~~~~~~~~~~~~~ curb_postfield.c:134:46: warning: ‘CURLFORM_PTRCONTENTS’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 134 | CURLFORM_PTRCONTENTS, StringValuePtr(rbcpf->content), | ^~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2523:3: note: declared here 2523 | CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~ curb_postfield.c:135:46: warning: ‘CURLFORM_CONTENTSLENGTH’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations] 135 | CURLFORM_CONTENTSLENGTH, RSTRING_LEN(rbcpf->content), | ^~~~~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2524:3: note: declared here 2524 | CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"), | ^~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:136:46: warning: ‘CURLFORM_CONTENTTYPE’ is deprecated: since 7.56.0. Use curl_mime_type() [-Wdeprecated-declarations] 136 | CURLFORM_CONTENTTYPE, StringValuePtr(rbcpf->content_type), | ^~~~~~~~~~~~~~~~~~~~ /usr/include/curl/curl.h:2534:3: note: declared here 2534 | CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"), | ^~~~~~~~~~~~~~~~~~~~ curb_postfield.c:149:7: warning: ‘CURL_FORMADD_MEMORY’ is deprecated: since 7.56.0. [-Wdeprecated-declarations] 149 | case CURL_FORMADD_MEMORY: | ^~~~ /usr/include/curl/curl.h:2572:3: note: declared here 2572 | CURL_FORMADD_MEMORY CURL_DEPRECATED(7.56.0, ""), | ^~~~~~~~~~~~~~~~~~~ curb_postfield.c:152:7: warning: ‘CURL_FORMADD_OPTION_TWICE’ is deprecated: since 7.56.0. [-Wdeprecated-declarations] 152 | case CURL_FORMADD_OPTION_TWICE: | ^~~~ /usr/include/curl/curl.h:2573:3: note: declared here 2573 | CURL_FORMADD_OPTION_TWICE CURL_DEPRECATED(7.56.0, ""), | ^~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:155:7: warning: ‘CURL_FORMADD_NULL’ is deprecated: since 7.56.0. [-Wdeprecated-declarations] 155 | case CURL_FORMADD_NULL: | ^~~~ /usr/include/curl/curl.h:2574:3: note: declared here 2574 | CURL_FORMADD_NULL CURL_DEPRECATED(7.56.0, ""), | ^~~~~~~~~~~~~~~~~ curb_postfield.c:158:7: warning: ‘CURL_FORMADD_UNKNOWN_OPTION’ is deprecated: since 7.56.0. [-Wdeprecated-declarations] 158 | case CURL_FORMADD_UNKNOWN_OPTION: | ^~~~ /usr/include/curl/curl.h:2575:3: note: declared here 2575 | CURL_FORMADD_UNKNOWN_OPTION CURL_DEPRECATED(7.56.0, ""), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:161:7: warning: ‘CURL_FORMADD_INCOMPLETE’ is deprecated: since 7.56.0. [-Wdeprecated-declarations] 161 | case CURL_FORMADD_INCOMPLETE: | ^~~~ /usr/include/curl/curl.h:2576:3: note: declared here 2576 | CURL_FORMADD_INCOMPLETE CURL_DEPRECATED(7.56.0, ""), | ^~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:164:7: warning: ‘CURL_FORMADD_ILLEGAL_ARRAY’ is deprecated: since 7.56.0. [-Wdeprecated-declarations] 164 | case CURL_FORMADD_ILLEGAL_ARRAY: | ^~~~ /usr/include/curl/curl.h:2577:3: note: declared here 2577 | CURL_FORMADD_ILLEGAL_ARRAY CURL_DEPRECATED(7.56.0, ""), | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:167:7: warning: ‘CURL_FORMADD_DISABLED’ is deprecated: since 7.56.0. [-Wdeprecated-declarations] 167 | case CURL_FORMADD_DISABLED: | ^~~~ /usr/include/curl/curl.h:2579:3: note: declared here 2579 | CURL_FORMADD_DISABLED CURL_DEPRECATED(7.56.0, ""), | ^~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_new_content’: curb_postfield.c:239:3: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 239 | return Data_Wrap_Struct(cCurlPostField, curl_postfield_mark, curl_postfield_free, rbcpf); | ^~~~~~ /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_new_file’: curb_postfield.c:285:3: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 285 | return Data_Wrap_Struct(cCurlPostField, curl_postfield_mark, curl_postfield_free, rbcpf); | ^~~~~~ /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_name_set’: curb_postfield.c:297:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 297 | CURB_OBJECT_SETTER(ruby_curl_postfield, name); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_name_get’: curb_postfield.c:307:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 307 | CURB_OBJECT_GETTER(ruby_curl_postfield, name); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_content_set’: curb_postfield.c:319:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 319 | CURB_OBJECT_SETTER(ruby_curl_postfield, content); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_content_get’: curb_postfield.c:329:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 329 | CURB_OBJECT_GETTER(ruby_curl_postfield, content); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_content_type_set’: curb_postfield.c:339:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 339 | CURB_OBJECT_SETTER(ruby_curl_postfield, content_type); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_content_type_get’: curb_postfield.c:349:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 349 | CURB_OBJECT_GETTER(ruby_curl_postfield, content_type); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_local_file_set’: curb_postfield.c:361:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 361 | CURB_OBJECT_SETTER(ruby_curl_postfield, local_file); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_local_file_get’: curb_postfield.c:372:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 372 | CURB_OBJECT_GETTER(ruby_curl_postfield, local_file); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_remote_file_set’: curb_postfield.c:386:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 386 | CURB_OBJECT_SETTER(ruby_curl_postfield, remote_file); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_remote_file_get’: curb_postfield.c:397:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 397 | CURB_OBJECT_GETTER(ruby_curl_postfield, remote_file); | ^~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_content_proc_set’: curb_postfield.c:409:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 409 | CURB_HANDLER_PROC_SETTER(ruby_curl_postfield, content_proc); | ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c: In function ‘ruby_curl_postfield_to_str’: curb_postfield.c:430:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 430 | Data_Get_Struct(self, ruby_curl_postfield, rbcpf); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_postfield.c:478:75: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 478 | rb_raise(eCurlErrInvalidPostField, "Failed to url-encode content `%s'", tmpchrs); | ^~ curb_postfield.c:450:70: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 450 | rb_raise(eCurlErrInvalidPostField, "Failed to url-encode name `%s'", tmpchrs); | ^~ gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DRUBY_EXTCONF_H=\"curb_config.h\" -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -Wall -m64 -o curb_upload.o -c curb_upload.c curb_upload.c: In function ‘ruby_curl_upload_new’: curb_upload.c:29:3: warning: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 29 | upload = Data_Wrap_Struct(klass, curl_upload_mark, curl_upload_free, rbcu); | ^~~~~~ In file included from /usr/include/ruby/internal/core.h:27, from /usr/include/ruby/ruby.h:29, from /usr/include/ruby.h:38, from curb.h:11, from curb_upload.h:8, from curb_upload.c:5: /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ curb_upload.c: In function ‘ruby_curl_upload_stream_set’: curb_upload.c:39:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 39 | Data_Get_Struct(self, ruby_curl_upload, rbcu); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_upload.c: In function ‘ruby_curl_upload_stream_get’: curb_upload.c:49:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 49 | Data_Get_Struct(self, ruby_curl_upload, rbcu); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_upload.c: In function ‘ruby_curl_upload_offset_set’: curb_upload.c:58:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 58 | Data_Get_Struct(self, ruby_curl_upload, rbcu); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ curb_upload.c: In function ‘ruby_curl_upload_offset_get’: curb_upload.c:68:3: warning: ‘rb_data_object_get_warning’ is deprecated: by TypedData [-Wdeprecated-declarations] 68 | Data_Get_Struct(self, ruby_curl_upload, rbcu); | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here 325 | rb_data_object_get_warning(VALUE obj) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ rm -f curb_core.so gcc -shared -o curb_core.so curb.o curb_easy.o curb_errors.o curb_multi.o curb_postfield.o curb_upload.o -L. -L/usr/lib64 -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes -Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -m64 -lruby -lm -lpthread -lc -lcurl curb_easy.c: In function ‘ruby_curl_easy_clone’: curb_easy.c:394:3: warning: call to ‘_curl_easy_setopt_err_error_buffer’ declared with attribute warning: curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option [-Wattribute-warning] 394 | curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf); | ^ curb_easy.c: In function ‘ruby_curl_easy_initialize’: curb_easy.c:356:3: warning: call to ‘_curl_easy_setopt_err_error_buffer’ declared with attribute warning: curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option [-Wattribute-warning] 356 | curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf); | ^ curb_easy.c: In function ‘ruby_curl_easy_reset’: curb_easy.c:465:3: warning: call to ‘_curl_easy_setopt_err_error_buffer’ declared with attribute warning: curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option [-Wattribute-warning] 465 | curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf); | ^ : current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext ["make", "DESTDIR=", "sitearchdir=./.gem.20241110-53-r18n7u", "sitelibdir=./.gem.20241110-53-r18n7u", "install"] /usr/bin/mkdir -p . ./.gem.20241110-53-r18n7u exit > .sitearchdir.time /usr/bin/install -c -m 0755 curb_core.so ./.gem.20241110-53-r18n7u current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext ["make", "DESTDIR=", "sitearchdir=./.gem.20241110-53-r18n7u", "sitelibdir=./.gem.20241110-53-r18n7u", "clean"] rm -f rm -fr curb_core.so false curb.o curb_easy.o curb_errors.o curb_multi.o curb_postfield.o curb_upload.o *.bak mkmf.log .*.time current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext /usr/bin/ruby -I/usr/share/rubygems extconf.rb current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext make DESTDIR\= sitearchdir\=./.gem.20241110-53-r18n7u sitelibdir\=./.gem.20241110-53-r18n7u clean current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext make DESTDIR\= sitearchdir\=./.gem.20241110-53-r18n7u sitelibdir\=./.gem.20241110-53-r18n7u current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext make DESTDIR\= sitearchdir\=./.gem.20241110-53-r18n7u sitelibdir\=./.gem.20241110-53-r18n7u install current directory: /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/ext make DESTDIR\= sitearchdir\=./.gem.20241110-53-r18n7u sitelibdir\=./.gem.20241110-53-r18n7u clean Successfully installed curb-1.0.5 Parsing documentation for curb-1.0.5 Parsing sources... 4% [ 1/23] LICENSE 8% [ 2/23] README.markdown 13% [ 3/23] ext/Makefile 17% [ 4/23] ext/banned.h 21% [ 5/23] ext/curb.c 26% [ 6/23] ext/curb.h 30% [ 7/23] ext/curb_config.h 34% [ 8/23] ext/curb_easy.c 39% [ 9/23] ext/curb_easy.h 43% [10/23] ext/curb_errors.c 47% [11/23] ext/curb_errors.h 52% [12/23] ext/curb_macros.h 56% [13/23] ext/curb_multi.c 60% [14/23] ext/curb_multi.h 65% [15/23] ext/curb_postfield.c 69% [16/23] ext/curb_postfield.h 73% [17/23] ext/curb_upload.c 78% [18/23] ext/curb_upload.h 82% [19/23] ext/extconf.rb 86% [20/23] lib/curb.rb 91% [21/23] lib/curl.rb 95% [22/23] lib/curl/easy.rb 100% [23/23] lib/curl/multi.rb Installing ri documentation for curb-1.0.5 Done installing documentation for curb after 0 seconds 1 gem installed + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.ld021n + umask 022 + cd /builddir/build/BUILD/rubygem-curb-1.0.5-build + '[' /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT '!=' / ']' + rm -rf /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT ++ dirname /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT + mkdir -p /builddir/build/BUILD/rubygem-curb-1.0.5-build + mkdir /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd curb-1.0.5 + mkdir -p /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT/usr/share/gems + cp -a ./usr/share/gems/build_info ./usr/share/gems/cache ./usr/share/gems/doc ./usr/share/gems/extensions ./usr/share/gems/gems ./usr/share/gems/plugins ./usr/share/gems/specifications /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT/usr/share/gems/ + mkdir -p /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT/usr/lib64/gems/ruby/curb-1.0.5 + cp -a ./usr/lib64/gems/ruby/curb-1.0.5/gem.build_complete ./usr/lib64/gems/ruby/curb-1.0.5/curb_core.so /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT/usr/lib64/gems/ruby/curb-1.0.5/ + rm -rf /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT/usr/share/gems/gems/curb-1.0.5/ext/ + /usr/bin/find-debuginfo -j2 --strict-build-id -m -i --build-id-seed 1.0.5-6.fc42.315.07 --unique-debug-suffix -1.0.5-6.fc42.315.07.x86_64 --unique-debug-src-base rubygem-curb-1.0.5-6.fc42.315.07.x86_64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 -S debugsourcefiles.list /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5 find-debuginfo: starting Extracting debug info from 1 files DWARF-compressing 1 files sepdebugcrcfix: Updated 1 CRC32s, 0 CRC32s did match. Creating .debug symlinks for symlinks to ELF files Copying sources found by 'debugedit -l' to /usr/src/debug/rubygem-curb-1.0.5-6.fc42.315.07.x86_64 find-debuginfo: done + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/brp-remove-la-files + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j2 + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/bin/add-determinism --brp -j2 /builddir/build/BUILD/rubygem-curb-1.0.5-build/BUILDROOT Scanned 159 directories and 450 files, processed 0 inodes, 0 modified (0 replaced + 0 rewritten), 0 unsupported format, 0 errors Reading /builddir/build/BUILD/rubygem-curb-1.0.5-build/SPECPARTS/rpm-debuginfo.specpart Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.bclkf9 + umask 022 + cd /builddir/build/BUILD/rubygem-curb-1.0.5-build + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' ~/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5 ~/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5 + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -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 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd curb-1.0.5 + pushd ./usr/share/gems/gems/curb-1.0.5 + sed -i '/omit/ s/^/#/' tests/tc_curl_multi.rb ++ dirs +1 + ruby -I~/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/lib64/gems/ruby/curb-1.0.5 -e 'Dir.glob "./tests/tc_*.rb", &method(:require)' Loaded suite -e Started F =============================================================================== Failure: test_download_bad_url_gives_404(TestCurbCurlDownload) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_download.rb:70:in 'TestCurbCurlDownload#test_download_bad_url_gives_404' <404> expected but was <400> diff: ? 404 ? 0 ? ? =============================================================================== F =============================================================================== Failure: test_download_url_to_file_via_file_io(TestCurbCurlDownload) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_download.rb:29:in 'TestCurbCurlDownload#test_download_url_to_file_via_file_io' <"/* curb_easy.c - Curl easy mode\n" + " * Copyright (c)2006 Ross Bamford.\n" + " * Licensed under the Ruby License. See LICENSE for details.\n" + " *\n" + " * $Id: curb_easy.c 30 2006-12-09 12:30:24Z roscopeco $\n" + " */\n" + "#include \"curb_easy.h\"\n" + "#include \"curb_errors.h\"\n" + "#include \"curb_postfield.h\"\n" + "#include \"curb_upload.h\"\n" + "#include \"curb_multi.h\"\n" + "\n" + "#include \n" + "#include \n" + "\n" + "extern VALUE mCurl;\n" + "\n" + "static VALUE idCall;\n" + "static VALUE idJoin;\n" + "static VALUE rbstrAmp;\n" + "\n" + "#ifdef RDOC_NEVER_DEFINED\n" + " mCurl = rb_define_module(\"Curl\");\n" + "#endif\n" + "\n" + "VALUE cCurlEasy;\n" + "\n" + "// for Ruby 1.8\n" + "#ifndef HAVE_RB_IO_STDIO_FILE\n" + "static FILE * rb_io_stdio_file(rb_io_t *fptr) {\n" + " return fptr->f;\n" + "}\n" + "#endif\n" + "\n" + "/* ================== CURL HANDLER FUNCS ==============*/\n" + "\n" + "static VALUE callback_exception(VALUE unused, VALUE exception) {\n" + " return Qfalse;\n" + "}\n" + "\n" + "/* These handle both body and header data */\n" + "static size_t default_data_handler(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " VALUE out) {\n" + " rb_str_buf_cat(out, stream, size * nmemb);\n" + " return size * nmemb;\n" + "}\n" + "\n" + "// size_t function( void *ptr, size_t size, size_t nmemb, void *stream);\n" + "static size_t read_data_handler(void *ptr,\n" + " size_t size,\n" + " size_t nmemb,\n" + " ruby_curl_easy *rbce) {\n" + " VALUE upload = rb_easy_get(\"upload\");\n" + " size_t read_bytes = (size*nmemb);\n" + " VALUE stream = ruby_curl_upload_stream_get(upload);\n" + "\n" + " if (rb_respond_to(stream, rb_intern(\"read\"))) {//if (rb_respond_to(stream, rb_intern(\"to_s\"))) {\n" + " /* copy read_bytes from stream into ptr */\n" + " VALUE str = rb_funcall(stream, rb_intern(\"read\"), 1, rb_int_new(read_bytes) );\n" + " if( str != Qnil ) {\n" + " memcpy(ptr, RSTRING_PTR(str), RSTRING_LEN(str));\n" + " return RSTRING_LEN(str);\n" + " }\n" + " else {\n" + " return 0;\n" + " }\n" + " }\n" + " else if (rb_respond_to(stream, rb_intern(\"to_s\"))) {\n" + " ruby_curl_upload *rbcu;\n" + " VALUE str;\n" + " size_t len;\n" + " size_t remaining;\n" + " char *str_ptr;\n" + " Data_Get_Struct(upload, ruby_curl_upload, rbcu);\n" + " str = rb_funcall(stream, rb_intern(\"to_s\"), 0);\n" + " len = RSTRING_LEN(str);\n" + " remaining = len - rbcu->offset;\n" + " str_ptr = RSTRING_PTR(str);\n" + "\n" + " if( remaining <= read_bytes ) {\n" + " if( remaining > 0 ) {\n" + " memcpy(ptr, str_ptr+rbcu->offset, remaining);\n" + " read_bytes = remaining;\n" + " rbcu->offset += remaining;\n" + " }\n" + " return remaining;\n" + " }\n" + " else { // read_bytes < remaining - send what we can fit in the buffer(ptr)\n" + " memcpy(ptr, str_ptr+rbcu->offset, read_bytes);\n" + " rbcu->offset += read_bytes;\n" + " }\n" + " return read_bytes;\n" + " }\n" + " else {\n" + " return 0;\n" + " }\n" + "}\n" + "\n" + "int seek_data_handler(ruby_curl_easy *rbce,\n" + " curl_off_t offset,\n" + " int origin) {\n" + "\n" + " VALUE upload = rb_easy_get(\"upload\");\n" + " VALUE stream = ruby_curl_upload_stream_get(upload);\n" + "\n" + " if (rb_respond_to(stream, rb_intern(\"seek\"))) {\n" + " rb_funcall(stream, rb_intern(\"seek\"), 2, SEEK_SET, offset);\n" + " } else {\n" + " ruby_curl_upload *rbcu;\n" + " Data_Get_Struct(upload, ruby_curl_upload, rbcu);\n" + " // This OK because curl only uses SEEK_SET as per the documentation\n" + " rbcu->offset = offset;\n" + " }\n" + "\n" + " return 0;\n" + "}\n" + "\n" + "static size_t proc_data_handler(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " VALUE proc) {\n" + " VALUE procret;\n" + "\n" + " procret = rb_funcall(proc, idCall, 1, rb_str_new(stream, size * nmemb));\n" + "\n" + " switch (rb_type(procret)) {\n" + " case T_FIXNUM:\n" + " return FIX2LONG(procret);\n" + " case T_BIGNUM:\n" + " return NUM2LONG(procret);\n" + " default:\n" + " rb_warn(\"Curl data handlers should return the number of bytes read as an Integer\");\n" + " return size * nmemb;\n" + " }\n" + "}\n" + "\n" + "static size_t proc_data_handler_body(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " ruby_curl_easy *rbce)\n" + "{\n" + " size_t ret;\n" + " rbce->callback_active = 1;\n" + " ret = proc_data_handler(stream, size, nmemb, rb_easy_get(\"body_proc\"));\n" + " rbce->callback_active = 0;\n" + " return ret;\n" + "}\n" + "static size_t proc_data_handler_header(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " ruby_curl_easy *rbce)\n" + "{\n" + " size_t ret;\n" + " rbce->callback_active = 1;\n" + " ret = proc_data_handler(stream, size, nmemb, rb_easy_get(\"header_proc\"));\n" + " rbce->callback_active = 0;\n" + " return ret;\n" + "}\n" + "\n" + "\n" + "static VALUE call_progress_handler(VALUE ary) {\n" + " return rb_funcall(rb_ary_entry(ary, 0), idCall, 4,\n" + " rb_ary_entry(ary, 1), // rb_float_new(dltotal),\n" + " rb_ary_entry(ary, 2), // rb_float_new(dlnow),\n" + " rb_ary_entry(ary, 3), // rb_float_new(ultotal),\n" + " rb_ary_entry(ary, 4)); // rb_float_new(ulnow));\n" + "}\n" + "\n" + "static int proc_progress_handler(VALUE proc,\n" + " double dltotal,\n" + " double dlnow,\n" + " double ultotal,\n" + " double ulnow) {\n" + " VALUE procret;\n" + " VALUE callargs = rb_ary_new2(5);\n" + "\n" + " rb_ary_store(callargs, 0, proc);\n" + " rb_ary_store(callargs, 1, rb_float_new(dltotal));\n" + " rb_ary_store(callargs, 2, rb_float_new(dlnow));\n" + " rb_ary_store(callargs, 3, rb_float_new(ultotal));\n" + " rb_ary_store(callargs, 4, rb_float_new(ulnow));\n" + "\n" + "\t//v = rb_rescue(range_check, (VALUE)args, range_failed, 0);\n" + " //procret = rb_funcall(proc, idCall, 4, rb_float_new(dltotal),\n" + " // rb_float_new(dlnow),\n" + " // rb_float_new(ultotal),\n" + " // rb_float_new(ulnow));\n" + " procret = rb_rescue(call_progress_handler, callargs, callback_exception, Qnil);\n" + "\n" + " return(((procret == Qfalse) || (procret == Qnil)) ? -1 : 0);\n" + "}\n" + "\n" + "static VALUE call_debug_handler(VALUE ary) {\n" + " return rb_funcall(rb_ary_entry(ary, 0), idCall, 2,\n" + " rb_ary_entry(ary, 1), // INT2NUM(type),\n" + " rb_ary_entry(ary, 2)); // rb_str_new(data, data_len)\n" + "}\n" + "static int proc_debug_handler(CURL *curl,\n" + " curl_infotype type,\n" + " char *data,\n" + " size_t data_len,\n" + " VALUE proc) {\n" + " VALUE callargs = rb_ary_new2(3);\n" + " rb_ary_store(callargs, 0, proc);\n" + " rb_ary_store(callargs, 1, INT2NUM(type));\n" + " rb_ary_store(callargs, 2, rb_str_new(data, data_len));\n" + " rb_rescue(call_debug_handler, callargs, callback_exception, Qnil);\n" + " /* no way to indicate to libcurl that we should break out given an exception in the on_debug handler...\n" + " * this means exceptions will be swallowed\n" + " */\n" + " //rb_funcall(proc, idCall, 2, INT2NUM(type), rb_str_new(data, data_len));\n" + " return 0;\n" + "}\n" + "\n" + "/* ================== MARK/FREE FUNC ==================*/\n" + "void curl_easy_mark(ruby_curl_easy *rbce) {\n" + " if (!NIL_P(rbce->opts)) { rb_gc_mark(rbce->opts); }\n" + " if (!NIL_P(rbce->multi)) { rb_gc_mark(rbce->multi); }\n" + "}\n" + "\n" + "static void ruby_curl_easy_free(ruby_curl_easy *rbce) {\n" + " if (rbce->curl_headers) {\n" + " curl_slist_free_all(rbce->curl_headers);\n" + " }\n" + "\n" + " if (rbce->curl_proxy_headers) {\n" + " curl_slist_free_all(rbce->curl_proxy_headers);\n" + " }\n" + "\n" + " if (rbce->curl_ftp_commands) {\n" + " curl_slist_free_all(rbce->curl_ftp_commands);\n" + " }\n" + "\n" + " if (rbce->curl_resolve) {\n" + " curl_slist_free_all(rbce->curl_resolve);\n" + " }\n" + "\n" + " if (rbce->curl) {\n" + " /* disable any progress or debug events */\n" + " curl_easy_setopt(rbce->curl, CURLOPT_WRITEFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_WRITEDATA, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HEADERFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HEADERDATA, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_DEBUGFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_DEBUGDATA, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_VERBOSE, 0);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_PROGRESSFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_NOPROGRESS, 1);\n" + " curl_easy_cleanup(rbce->curl);\n" + " rbce->curl = NULL;\n" + " }\n" + "}\n" + "\n" + "void curl_easy_free(ruby_curl_easy *rbce) {\n" + " ruby_curl_easy_free(rbce);\n" + " free(rbce);\n" + "}\n" + "\n" + "\n" + "/* ================= ALLOC METHODS ====================*/\n" + "\n" + "static void ruby_curl_easy_zero(ruby_curl_easy *rbce) {\n" + " rbce->opts = rb_hash_new();\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " rbce->curl_headers = NULL;\n" + " rbce->curl_proxy_headers = NULL;\n" + " rbce->curl_ftp_commands = NULL;\n" + " rbce->curl_resolve = NULL;\n" + "\n" + " /* various-typed opts */\n" + " rbce->local_port = 0;\n" + " rbce->local_port_range = 0;\n" + " rbce->proxy_port = 0;\n" + " rbce->proxy_type = -1;\n" + " rbce->http_auth_types = 0;\n" + " rbce->proxy_auth_types = 0;\n" + " rbce->max_redirs = -1;\n" + " rbce->timeout = 0;\n" + " rbce->timeout_ms = 0;\n" + " rbce->connect_timeout = 0;\n" + " rbce->connect_timeout_ms = 0;\n" + " rbce->dns_cache_timeout = 60;\n" + " rbce->ftp_response_timeout = 0;\n" + " rbce->low_speed_limit = 0;\n" + " rbce->low_speed_time = 0;\n" + " rbce->max_send_speed_large = 0;\n" + " rbce->max_recv_speed_large = 0;\n" + " rbce->ssl_version = -1;\n" + " rbce->use_ssl = -1;\n" + " rbce->ftp_filemethod = -1;\n" + " rbce->resolve_mode = CURL_IPRESOLVE_WHATEVER;\n" + "\n" + " /* bool opts */\n" + " rbce->proxy_tunnel = 0;\n" + " rbce->fetch_file_time = 0;\n" + " rbce->ssl_verify_peer = 1;\n" + " rbce->ssl_verify_host = 2;\n" + " rbce->header_in_body = 0;\n" + " rbce->use_netrc = 0;\n" + " rbce->follow_location = 0;\n" + " rbce->unrestricted_auth = 0;\n" + " rbce->verbose = 0;\n" + " rbce->multipart_form_post = 0;\n" + " rbce->enable_cookies = 0;\n" + " rbce->ignore_content_length = 0;\n" + " rbce->callback_active = 0;\n" + "}\n" + "\n" + "/*\n" + " * Allocate space for a Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_allocate(VALUE klass) {\n" + " ruby_curl_easy *rbce;\n" + " rbce = ALLOC(ruby_curl_easy);\n" + " rbce->curl = NULL;\n" + " rbce->opts = Qnil;\n" + " rbce->multi = Qnil;\n" + " ruby_curl_easy_zero(rbce);\n" + " return Data_Wrap_Struct(klass, curl_easy_mark, curl_easy_free, rbce);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * Curl::Easy.new => #\n" + " * Curl::Easy.new(url = nil) => #\n" + " * Curl::Easy.new(url = nil) { |self| ... } => #\n" + " *\n" + " * Initialize a new Curl::Easy instance, optionally supplying the URL.\n" + " * The block form allows further configuration to be supplied before\n" + " * the instance is returned.\n" + " */\n" + "static VALUE ruby_curl_easy_initialize(int argc, VALUE *argv, VALUE self) {\n" + " CURLcode ecode;\n" + " VALUE url, blk;\n" + " ruby_curl_easy *rbce;\n" + "\n" + " rb_scan_args(argc, argv, \"01&\", &url, &blk);\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " /* handler */\n" + " rbce->curl = curl_easy_init();\n" + " if (!rbce->curl) {\n" + " rb_raise(eCurlErrFailedInit, \"Failed to initialize easy handle\");\n" + " }\n" + "\n" + " rbce->multi = Qnil;\n" + " rbce->opts = Qnil;\n" + "\n" + " ruby_curl_easy_zero(rbce);\n" + "\n" + " curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf);\n" + "\n" + " rb_easy_set(\"url\", url);\n" + "\n" + " /* set the pointer to the curl handle */\n" + " ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self);\n" + " if (ecode != CURLE_OK) {\n" + " raise_curl_easy_error_exception(ecode);\n" + " }\n" + "\n" + " if (blk != Qnil) {\n" + " rb_funcall(blk, idCall, 1, self);\n" + " }\n" + "\n" + " return self;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.clone => \n" + " * easy.dup => \n" + " *\n" + " * Clone this Curl::Easy instance, creating a new instance.\n" + " * This method duplicates the underlying CURL* handle.\n" + " */\n" + "static VALUE ruby_curl_easy_clone(VALUE self) {\n" + " ruby_curl_easy *rbce, *newrbce;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " newrbce = ALLOC(ruby_curl_easy);\n" + " memcpy(newrbce, rbce, sizeof(ruby_curl_easy));\n" + " newrbce->curl = curl_easy_duphandle(rbce->curl);\n" + " newrbce->curl_headers = NULL;\n" + " newrbce->curl_proxy_headers = NULL;\n" + " newrbce->curl_ftp_commands = NULL;\n" + " newrbce->curl_resolve = NULL;\n" + "\n" + " curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf);\n" + "\n" + " return Data_Wrap_Struct(cCurlEasy, curl_easy_mark, curl_easy_free, newrbce);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.close => nil\n" + " *\n" + " * Close the Curl::Easy instance. Any open connections are closed\n" + " * The easy handle is reinitialized. If a previous multi handle was\n" + " * open it is set to nil and will be cleared after a GC.\n" + " */\n" + "static VALUE ruby_curl_easy_close(VALUE self) {\n" + " CURLcode ecode;\n" + " ruby_curl_easy *rbce;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (rbce->callback_active) {\n" + " rb_raise(rb_eRuntimeError, \"Cannot close an active curl handle within a callback\");\n" + " }\n" + "\n" + " ruby_curl_easy_free(rbce);\n" + "\n" + " /* reinit the handle */\n" + " rbce->curl = curl_easy_init();\n" + " if (!rbce->curl) {\n" + " rb_raise(eCurlErrFailedInit, \"Failed to initialize easy handle\");\n" + " }\n" + "\n" + " rbce->multi = Qnil;\n" + "\n" + " ruby_curl_easy_zero(rbce);\n" + "\n" + " /* give the new curl handle a reference back to the ruby object */\n" + " ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self);\n" + " if (ecode != CURLE_OK) {\n" + " raise_curl_easy_error_exception(ecode);\n" + " }\n" + "\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.reset => Hash\n" + " *\n" + " * Reset the Curl::Easy instance, clears out all settings.\n" + " *\n" + " * from http://curl.haxx.se/libcurl/c/curl_easy_reset.html\n" + " * Re-initializes all options previously set on a specified CURL handle to the default values. This puts back the handle to the same state as it was in when it was just created with curl_easy_init(3).\n" + " * It does not change the following information kept in the handle: live connections, the Session ID cache, the DNS cache, the cookies and shares.\n" + " *\n" + " * The return value contains all settings stored.\n" + " */\n" + "static VALUE ruby_curl_easy_reset(VALUE self) {\n" + " CURLcode ecode;\n" + " ruby_curl_easy *rbce;\n" + " VALUE opts_dup;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (rbce->callback_active) {\n" + " rb_raise(rb_eRuntimeError, \"Cannot close an active curl handle within a callback\");\n" + " }\n" + "\n" + " opts_dup = rb_funcall(rbce->opts, rb_intern(\"dup\"), 0);\n" + "\n" + " curl_easy_reset(rbce->curl);\n" + " ruby_curl_easy_zero(rbce);\n" + "\n" + " curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf);\n" + "\n" + " /* reset clobbers the private setting, so reset it to self */\n" + " ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self);\n" + " if (ecode != CURLE_OK) {\n" + " raise_curl_easy_error_exception(ecode);\n" + " }\n" + "\n" + " /* Free everything up */\n" + " if (rbce->curl_headers) {\n" + " curl_slist_free_all(rbce->curl_headers);\n" + " rbce->curl_headers = NULL;\n" + " }\n" + "\n" + " /* Free everything up */\n" + " if (rbce->curl_proxy_headers) {\n" + " curl_slist_free_all(rbce->curl_proxy_headers);\n" + " rbce->curl_proxy_headers = NULL;\n" + " }\n" + "\n" + " return opts_dup;\n" + "}\n" + "\n" + "\n" + "/* ================ OBJ ATTRIBUTES ==================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.url => string\n" + " *\n" + " * Obtain the URL that will be used by subsequent calls to +perform+.\n" + " */\n" + "static VALUE ruby_curl_easy_url_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, url);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_url => string\n" + " *\n" + " * Obtain the HTTP Proxy URL that will be used by subsequent calls to +perform+.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_url_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, proxy_url);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.headers = \"Header: val\" => \"Header: val\"\n" + " * easy.headers = {\"Header\" => \"val\" ..., \"Header\" => \"val\"} => {\"Header: val\", ...}\n" + " * easy.headers = [\"Header: val\" ..., \"Header: val\"] => [\"Header: val\", ...]\n" + " *\n" + " * Set custom HTTP headers for following requests. This can be used to add\n" + " * custom headers, or override standard headers used by libcurl. It defaults to a\n" + " * Hash.\n" + " *\n" + " * For example to set a standard or custom header:\n" + " *\n" + " * easy.headers[\"MyHeader\"] = \"myval\"\n" + " *\n" + " * To remove a standard header (this is useful when removing libcurls default\n" + " * 'Expect: 100-Continue' header when using HTTP form posts):\n" + " *\n" + " * easy.headers[\"Expect\"] = ''\n" + " *\n" + " * Anything passed to libcurl as a header will be converted to a string during\n" + " * the perform step.\n" + " */\n" + "static VALUE ruby_curl_easy_headers_set(VALUE self, VALUE headers) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, headers);\n" + "}\n" + "\n" + "static VALUE ruby_curl_easy_proxy_headers_set(VALUE self, VALUE proxy_headers) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_headers);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.headers => Hash, Array or Str\n" + " *\n" + " * Obtain the custom HTTP headers for following requests.\n" + " */\n" + "static VALUE ruby_curl_easy_headers_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " VALUE headers;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " headers = rb_easy_get(\"headers\");//rb_hash_aref(rbce->opts, rb_intern(\"headers\"));\n" + " if (headers == Qnil) { headers = rb_easy_set(\"headers\", rb_hash_new()); }\n" + " return headers;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_headers = \"Header: val\" => \"Header: val\"\n" + " * easy.proxy_headers = {\"Header\" => \"val\" ..., \"Header\" => \"val\"} => {\"Header: val\", ...}\n" + " * easy.proxy_headers = [\"Header: val\" ..., \"Header: val\"] => [\"Header: val\", ...]\n" + " *\n" + " *\n" + " * For example to set a standard or custom header:\n" + " *\n" + " * easy.proxy_headers[\"MyHeader\"] = \"myval\"\n" + " *\n" + " * To remove a standard header (this is useful when removing libcurls default\n" + " * 'Expect: 100-Continue' header when using HTTP form posts):\n" + " *\n" + " * easy.proxy_headers[\"Expect\"] = ''\n" + " *\n" + " * Anything passed to libcurl as a header will be converted to a string during\n" + " * the perform step.\n" + " */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_headers => Hash, Array or Str\n" + " *\n" + " * Obtain the custom HTTP proxy_headers for following requests.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_headers_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " VALUE proxy_headers;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " proxy_headers = rb_easy_get(\"proxy_headers\");//rb_hash_aref(rbce->opts, rb_intern(\"proxy_headers\"));\n" + " if (proxy_headers == Qnil) { proxy_headers = rb_easy_set(\"proxy_headers\", rb_hash_new()); }\n" + " return proxy_headers;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.interface => string\n" + " *\n" + " * Obtain the interface name that is used as the outgoing network interface.\n" + " * The name can be an interface name, an IP address or a host name.\n" + " */\n" + "static VALUE ruby_curl_easy_interface_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, interface_hm);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.userpwd => string\n" + " *\n" + " * Obtain the username/password string that will be used for subsequent\n" + " * calls to +perform+.\n" + " */\n" + "static VALUE ruby_curl_easy_userpwd_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, userpwd);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxypwd => string\n" + " *\n" + " * Obtain the username/password string that will be used for proxy\n" + " * connection during subsequent calls to +perform+. The supplied string\n" + " * should have the form \"username:password\"\n" + " */\n" + "static VALUE ruby_curl_easy_proxypwd_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, proxypwd);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookies => \"name1=content1; name2=content2;\"\n" + " *\n" + " * Obtain the cookies for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cookies_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cookies);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookiefile => string\n" + " *\n" + " * Obtain the cookiefile file for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cookiefile_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cookiefile);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookiejar => string\n" + " *\n" + " * Obtain the cookiejar file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cookiejar_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cookiejar);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert = string => \"\"\n" + " *\n" + " * Set a cert file to use for this Curl::Easy instance. This file\n" + " * will be used to validate SSL connections.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_cert_set(VALUE self, VALUE cert) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert => string\n" + " *\n" + " * Obtain the cert file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cert_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert_key = \"cert_key.file\" => \"\"\n" + " *\n" + " * Set a cert key to use for this Curl::Easy instance. This file\n" + " * will be used to validate SSL certificates.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_cert_key_set(VALUE self, VALUE cert_key) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cert_key);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert_key => \"cert_key.file\"\n" + " *\n" + " * Obtain the cert key file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cert_key_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cert_key);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cacert = string => \"\"\n" + " *\n" + " * Set a cacert bundle to use for this Curl::Easy instance. This file\n" + " * will be used to validate SSL certificates.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_cacert_set(VALUE self, VALUE cacert) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cacert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cacert => string\n" + " *\n" + " * Obtain the cacert file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cacert_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cacert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.certpassword = string => \"\"\n" + " *\n" + " * Set a password used to open the specified cert\n" + " */\n" + "static VALUE ruby_curl_easy_certpassword_set(VALUE self, VALUE certpassword) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, certpassword);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.certtype = \"PEM|DER\" => \"\"\n" + " *\n" + " * Set a cert type to use for this Curl::Easy instance.\n" + " * Default is PEM\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_certtype_set(VALUE self, VALUE certtype) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, certtype);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.certtype => string\n" + " *\n" + " * Obtain the cert type used for this Curl::Easy instance\n" + " */\n" + "static VALUE ruby_curl_easy_certtype_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, certtype);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.encoding = string => string\n" + " *\n" + " * Set the accepted encoding types, curl will handle all of the decompression\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_encoding_set(VALUE self, VALUE encoding) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, encoding);\n" + "}\n" + "/*\n" + " * call-seq:\n" + " * easy.encoding => string\n" + " *\n" + " * Get the set encoding types\n" + " *\n" + "*/\n" + "static VALUE ruby_curl_easy_encoding_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, encoding);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.useragent = \"Ruby/Curb\" => \"\"\n" + " *\n" + " * Set the user agent string for this Curl::Easy instance\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_useragent_set(VALUE self, VALUE useragent) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, useragent);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.useragent => \"Ruby/Curb\"\n" + " *\n" + " * Obtain the user agent string used for this Curl::Easy instance\n" + " */\n" + "static VALUE ruby_curl_easy_useragent_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, useragent);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.post_body = \"some=form%20data&to=send\" => string or nil\n" + " *\n" + " * Sets the POST body of this Curl::Easy instance. This is expected to be\n" + " * URL encoded; no additional processing or encoding is done on the string.\n" + " * The content-type header will be set to application/x-www-form-urlencoded.\n" + " *\n" + " * This is handy if you want to perform a POST against a Curl::Multi instance.\n" + " */\n" + "static VALUE ruby_curl_easy_post_body_set(VALUE self, VALUE post_body) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + "\n" + " char *data;\n" + " long len;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " curl = rbce->curl;\n" + "\n" + " if ( post_body == Qnil ) {\n" + " rb_easy_del(\"postdata_buffer\");\n" + " curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);\n" + "\n" + " } else {\n" + " if (rb_type(post_body) == T_STRING) {\n" + " data = StringValuePtr(post_body);\n" + " len = RSTRING_LEN(post_body);\n" + " }\n" + " else if (rb_respond_to(post_body, rb_intern(\"to_s\"))) {\n" + " VALUE str_body = rb_funcall(post_body, rb_intern(\"to_s\"), 0);\n" + " data = StringValuePtr(str_body);\n" + " len = RSTRING_LEN(post_body);\n" + " }\n" + " else {\n" + " rb_raise(rb_eRuntimeError, \"post data must respond_to .to_s\");\n" + " }\n" + "\n" + " // Store the string, since it has to hang around for the duration of the\n" + " // request. See CURLOPT_POSTFIELDS in the libcurl docs.\n" + " //rbce->postdata_buffer = post_body;\n" + " rb_easy_set(\"postdata_buffer\", post_body);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_POST, 1);\n" + " curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);\n" + " curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, len);\n" + "\n" + " return post_body;\n" + " }\n" + "\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.post_body => string or nil\n" + " *\n" + " * Obtain the POST body used in this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_post_body_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, postdata_buffer);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.put_data = data => \"\"\n" + " *\n" + " * Points this Curl::Easy instance to data to be uploaded via PUT. This\n" + " * sets the request to a PUT type request - useful if you want to PUT via\n" + " * a multi handle.\n" + " */\n" + "static VALUE ruby_curl_easy_put_data_set(VALUE self, VALUE data) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + " VALUE upload;\n" + " VALUE headers;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " upload = ruby_curl_upload_new(cCurlUpload);\n" + " ruby_curl_upload_stream_set(upload,data);\n" + "\n" + " curl = rbce->curl;\n" + " rb_easy_set(\"upload\", upload); /* keep the upload object alive as long as\n" + " the easy handle is active or until the upload\n" + " is complete or terminated... */\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_NOBODY, 0);\n" + " curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);\n" + " curl_easy_setopt(curl, CURLOPT_READFUNCTION, (curl_read_callback)read_data_handler);\n" + "#if HAVE_CURLOPT_SEEKFUNCTION\n" + " curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, (curl_seek_callback)seek_data_handler);\n" + "#endif\n" + " curl_easy_setopt(curl, CURLOPT_READDATA, rbce);\n" + "#if HAVE_CURLOPT_SEEKDATA\n" + " curl_easy_setopt(curl, CURLOPT_SEEKDATA, rbce);\n" + "#endif\n" + "\n" + " /*\n" + " * we need to set specific headers for the PUT to work... so\n" + " * convert the internal headers structure to a HASH if one is set\n" + " */\n" + " if (!rb_easy_nil(\"headers\")) {\n" + " if (rb_easy_type_check(\"headers\", T_ARRAY) || rb_easy_type_check(\"headers\", T_STRING)) {\n" + " rb_raise(rb_eRuntimeError, \"Must set headers as a HASH to modify the headers in an PUT request\");\n" + " }\n" + " }\n" + "\n" + " // exit fast if the payload is empty\n" + " if (NIL_P(data)) { return data; }\n" + "\n" + " headers = rb_easy_get(\"headers\");\n" + " if( headers == Qnil ) {\n" + " headers = rb_hash_new();\n" + " }\n" + "\n" + " if (rb_respond_to(data, rb_intern(\"read\"))) {\n" + " VALUE stat = rb_funcall(data, rb_intern(\"stat\"), 0);\n" + " if( stat && rb_hash_aref(headers, rb_str_new2(\"Content-Length\")) == Qnil) {\n" + " VALUE size;\n" + " if( rb_hash_aref(headers, rb_str_new2(\"Expect\")) == Qnil ) {\n" + " rb_hash_aset(headers, rb_str_new2(\"Expect\"), rb_str_new2(\"\"));\n" + " }\n" + " size = rb_funcall(stat, rb_intern(\"size\"), 0);\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, NUM2LONG(size));\n" + " }\n" + " else if( rb_hash_aref(headers, rb_str_new2(\"Content-Length\")) == Qnil && rb_hash_aref(headers, rb_str_new2(\"Transfer-Encoding\")) == Qnil ) {\n" + " rb_hash_aset(headers, rb_str_new2(\"Transfer-Encoding\"), rb_str_new2(\"chunked\"));\n" + " }\n" + " else if( rb_hash_aref(headers, rb_str_new2(\"Content-Length\")) ) {\n" + " VALUE size = rb_funcall(rb_hash_aref(headers, rb_str_new2(\"Content-Length\")), rb_intern(\"to_i\"), 0);\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, NUM2LONG(size));\n" + " }\n" + " }\n" + " else if (rb_respond_to(data, rb_intern(\"to_s\"))) {\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, RSTRING_LEN(data));\n" + " if( rb_hash_aref(headers, rb_str_new2(\"Expect\")) == Qnil ) {\n" + " rb_hash_aset(headers, rb_str_new2(\"Expect\"), rb_str_new2(\"\"));\n" + " }\n" + " }\n" + " else {\n" + " rb_raise(rb_eRuntimeError, \"PUT data must respond to read or to_s\");\n" + " }\n" + " rb_easy_set(\"headers\",headers);\n" + "\n" + " // if we made it this far, all should be well.\n" + " return data;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_commands = [\"CWD /\", \"MKD directory\"] => [\"CWD /\", ...]\n" + " *\n" + " * Explicitly sets the list of commands to execute on the FTP server when calling perform\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_commands_set(VALUE self, VALUE ftp_commands) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, ftp_commands);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_commands => array or nil\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_commands_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, ftp_commands);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve = [ \"example.com:80:127.0.0.1\" ] => [ \"example.com:80:127.0.0.1\" ]\n" + " *\n" + " * Set the resolve list to statically resolve hostnames to IP addresses,\n" + " * bypassing DNS for matching hostname/port combinations.\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_set(VALUE self, VALUE resolve) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, resolve);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve => array or nil\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, resolve);\n" + "}\n" + "\n" + "/* ================== IMMED ATTRS ==================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the local port that will be used for the following +perform+ calls.\n" + " *\n" + " * Passing +nil+ will return to the default behaviour (no local port\n" + " * preference).\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_set(VALUE self, VALUE local_port) {\n" + " CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port, \"port\");\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port => fixnum or nil\n" + " *\n" + " * Obtain the local port that will be used for the following +perform+ calls.\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_get(VALUE self) {\n" + " CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port_range = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the local port range that will be used for the following +perform+\n" + " * calls. This is a number (between 0 and 65535) that determines how far\n" + " * libcurl may deviate from the supplied +local_port+ in order to find\n" + " * an available port.\n" + " *\n" + " * If you set +local_port+ it's also recommended that you set this, since\n" + " * it is fairly likely that your specified port will be unavailable.\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_range_set(VALUE self, VALUE local_port_range) {\n" + " CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port_range, \"port range\");\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port_range => fixnum or nil\n" + " *\n" + " * Obtain the local port range that will be used for the following +perform+\n" + " * calls.\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_range_get(VALUE self) {\n" + " CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port_range);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_port = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the proxy port that will be used for the following +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_port_set(VALUE self, VALUE proxy_port) {\n" + " CURB_IMMED_PORT_SETTER(ruby_curl_easy, proxy_port, \"port\");\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_port => fixnum or nil\n" + " *\n" + " * Obtain the proxy port that will be used for the following +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_port_get(VALUE self) {\n" + " CURB_IMMED_PORT_GETTER(ruby_curl_easy, proxy_port);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_type = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the proxy type that will be used for the following +perform+ calls.\n" + " * This should be one of the Curl::CURLPROXY constants.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_type_set(VALUE self, VALUE proxy_type) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, proxy_type, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_type => fixnum or nil\n" + " *\n" + " * Obtain the proxy type that will be used for the following +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_type_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, proxy_type, -1);\n" + "}\n" + "\n" + "#if defined(HAVE_CURLAUTH_DIGEST_IE)\n" + "#define CURL_HTTPAUTH_STR_TO_NUM(node) \\\n" + " (!strncmp(\"basic\",node,5)) ? CURLAUTH_BASIC : \\\n" + " (!strncmp(\"digest_ie\",node,9)) ? CURLAUTH_DIGEST_IE : \\\n" + " (!strncmp(\"digest\",node,6)) ? CURLAUTH_DIGEST : \\\n" + " (!strncmp(\"gssnegotiate\",node,12)) ? CURLAUTH_GSSNEGOTIATE : \\\n" + " (!strncmp(\"ntlm\",node,4)) ? CURLAUTH_NTLM : \\\n" + " (!strncmp(\"anysafe\",node,7)) ? CURLAUTH_ANYSAFE : \\\n" + " (!strncmp(\"any\",node,3)) ? CURLAUTH_ANY : 0\n" + "#else\n" + "#define CURL_HTTPAUTH_STR_TO_NUM(node) \\\n" + " (!strncmp(\"basic\",node,5)) ? CURLAUTH_BASIC : \\\n" + " (!strncmp(\"digest\",node,6)) ? CURLAUTH_DIGEST : \\\n" + " (!strncmp(\"gssnegotiate\",node,12)) ? CURLAUTH_GSSNEGOTIATE : \\\n" + " (!strncmp(\"ntlm\",node,4)) ? CURLAUTH_NTLM : \\\n" + " (!strncmp(\"anysafe\",node,7)) ? CURLAUTH_ANYSAFE : \\\n" + " (!strncmp(\"any\",node,3)) ? CURLAUTH_ANY : 0\n" + "#endif\n" + "/*\n" + " * call-seq:\n" + " * easy.http_auth_types = fixnum or nil => fixnum or nil\n" + " * easy.http_auth_types = [:basic,:digest,:digest_ie,:gssnegotiate, :ntlm, :any, :anysafe]\n" + " *\n" + " * Set the HTTP authentication types that may be used for the following\n" + " * +perform+ calls. This is a bitmap made by ORing together the\n" + " * Curl::CURLAUTH constants.\n" + " */\n" + "static VALUE ruby_curl_easy_http_auth_types_set(int argc, VALUE *argv, VALUE self) {//VALUE self, VALUE http_auth_types) {\n" + " ruby_curl_easy *rbce;\n" + " VALUE args_ary;\n" + " long i, len;\n" + " char* node = NULL;\n" + " long mask = 0;\n" + "\n" + " rb_scan_args(argc, argv, \"*\", &args_ary);\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " len = RARRAY_LEN(args_ary);\n" + "\n" + " if (len == 1 && (rb_ary_entry(args_ary,0) == Qnil || TYPE(rb_ary_entry(args_ary,0)) == T_FIXNUM ||\n" + " TYPE(rb_ary_entry(args_ary,0)) == T_BIGNUM)) {\n" + " if (rb_ary_entry(args_ary,0) == Qnil) {\n" + " rbce->http_auth_types = 0;\n" + " }\n" + " else {\n" + " rbce->http_auth_types = NUM2LONG(rb_ary_entry(args_ary,0));\n" + " }\n" + " }\n" + " else {\n" + " // we could have multiple values, but they should be symbols\n" + " node = RSTRING_PTR(rb_funcall(rb_ary_entry(args_ary,0),rb_intern(\"to_s\"),0));\n" + " mask = CURL_HTTPAUTH_STR_TO_NUM(node);\n" + " for( i = 1; i < len; ++i ) {\n" + " node = RSTRING_PTR(rb_funcall(rb_ary_entry(args_ary,i),rb_intern(\"to_s\"),0));\n" + " mask |= CURL_HTTPAUTH_STR_TO_NUM(node);\n" + " }\n" + " rbce->http_auth_types = mask;\n" + " }\n" + " return LONG2NUM(rbce->http_auth_types);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_auth_types => fixnum or nil\n" + " *\n" + " * Obtain the HTTP authentication types that may be used for the following\n" + " * +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_http_auth_types_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, http_auth_types, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_auth_types = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the proxy authentication types that may be used for the following\n" + " * +perform+ calls. This is a bitmap made by ORing together the\n" + " * Curl::CURLAUTH constants.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_auth_types_set(VALUE self, VALUE proxy_auth_types) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, proxy_auth_types, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_auth_types => fixnum or nil\n" + " *\n" + " * Obtain the proxy authentication types that may be used for the following\n" + " * +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_auth_types_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, proxy_auth_types, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_redirects = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum number of redirections to follow in the following +perform+\n" + " * calls. Set to nil or -1 allow an infinite number (the default). Setting this\n" + " * option only makes sense if +follow_location+ is also set true.\n" + " *\n" + " * With libcurl >= 7.15.1, setting this to 0 will cause libcurl to refuse any\n" + " * redirect.\n" + " */\n" + "static VALUE ruby_curl_easy_max_redirects_set(VALUE self, VALUE max_redirs) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, max_redirs, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_redirects => fixnum or nil\n" + " *\n" + " * Obtain the maximum number of redirections to follow in the following\n" + " * +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_max_redirects_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, max_redirs, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout = float, fixnum or nil => numeric\n" + " *\n" + " * Set the maximum time in seconds that you allow the libcurl transfer\n" + " * operation to take. Normally, name lookups can take a considerable time\n" + " * and limiting operations to less than a few minutes risk aborting\n" + " * perfectly normal operations.\n" + " *\n" + " * Set to nil (or zero) to disable timeout (it will then only timeout\n" + " * on the system's internal timeouts).\n" + " *\n" + " * Uses timeout_ms internally instead of timeout because it allows for\n" + " * better precision and libcurl will use the last set value when both\n" + " * timeout and timeout_ms are set.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_set(VALUE self, VALUE timeout_s) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (Qnil == timeout_s || NUM2DBL(timeout_s) <= 0.0) {\n" + " rbce->timeout_ms = 0;\n" + " } else {\n" + " rbce->timeout_ms = (unsigned long)(NUM2DBL(timeout_s) * 1000);\n" + " }\n" + "\n" + " return DBL2NUM(rbce->timeout_ms / 1000.0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout => numeric\n" + " *\n" + " * Obtain the maximum time in seconds that you allow the libcurl transfer\n" + " * operation to take.\n" + " *\n" + " * Uses timeout_ms internally instead of timeout.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return DBL2NUM(rbce->timeout_ms / 1000.0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout_ms = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum time in milliseconds that you allow the libcurl transfer\n" + " * operation to take. Normally, name lookups can take a considerable time\n" + " * and limiting operations to less than a few minutes risk aborting\n" + " * perfectly normal operations.\n" + " *\n" + " * Set to nil (or zero) to disable timeout (it will then only timeout\n" + " * on the system's internal timeouts).\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_ms_set(VALUE self, VALUE timeout_ms) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (Qnil == timeout_ms || NUM2DBL(timeout_ms) <= 0.0) {\n" + " rbce->timeout_ms = 0;\n" + " } else {\n" + " rbce->timeout_ms = NUM2ULONG(timeout_ms);\n" + " }\n" + "\n" + " return ULONG2NUM(rbce->timeout_ms);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout_ms => fixnum or nil\n" + " *\n" + " * Obtain the maximum time in milliseconds that you allow the libcurl transfer\n" + " * operation to take.\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_ms_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return LONG2NUM(rbce->timeout_ms);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum time in seconds that you allow the connection to the\n" + " * server to take. This only limits the connection phase, once it has\n" + " * connected, this option is of no more use.\n" + " *\n" + " * Set to nil (or zero) to disable connection timeout (it will then only\n" + " * timeout on the system's internal timeouts).\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_set(VALUE self, VALUE connect_timeout) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout => fixnum or nil\n" + " *\n" + " * Obtain the maximum time in seconds that you allow the connection to the\n" + " * server to take.\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout_ms = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum time in milliseconds that you allow the connection to the\n" + " * server to take. This only limits the connection phase, once it has\n" + " * connected, this option is of no more use.\n" + " *\n" + " * Set to nil (or zero) to disable connection timeout (it will then only\n" + " * timeout on the system's internal timeouts).\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_ms_set(VALUE self, VALUE connect_timeout_ms) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout_ms, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout_ms => fixnum or nil\n" + " *\n" + " * Obtain the maximum time in milliseconds that you allow the connection to the\n" + " * server to take.\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_ms_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout_ms, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.dns_cache_timeout = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the dns cache timeout in seconds. Name resolves will be kept in\n" + " * memory for this number of seconds. Set to zero (0) to completely disable\n" + " * caching, or set to nil (or -1) to make the cached entries remain forever.\n" + " * By default, libcurl caches this info for 60 seconds.\n" + " */\n" + "static VALUE ruby_curl_easy_dns_cache_timeout_set(VALUE self, VALUE dns_cache_timeout) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, dns_cache_timeout, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.dns_cache_timeout => fixnum or nil\n" + " *\n" + " * Obtain the dns cache timeout in seconds.\n" + " */\n" + "static VALUE ruby_curl_easy_dns_cache_timeout_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, dns_cache_timeout, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_response_timeout = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set a timeout period (in seconds) on the amount of time that the server\n" + " * is allowed to take in order to generate a response message for a command\n" + " * before the session is considered hung. While curl is waiting for a\n" + " * response, this value overrides +timeout+. It is recommended that if used\n" + " * in conjunction with +timeout+, you set +ftp_response_timeout+ to a value\n" + " * smaller than +timeout+.\n" + " *\n" + " * Ignored if libcurl version is < 7.10.8.\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_response_timeout_set(VALUE self, VALUE ftp_response_timeout) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ftp_response_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_response_timeout => fixnum or nil\n" + " *\n" + " * Obtain the maximum time that libcurl will wait for FTP command responses.\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_response_timeout_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ftp_response_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_limit = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the transfer speed (in bytes per second) that the transfer should be\n" + " * below during +low_speed_time+ seconds for the library to consider it too\n" + " * slow and abort.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_limit_set(VALUE self, VALUE low_speed_limit) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, low_speed_limit, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_limit => fixnum or nil\n" + " *\n" + " * Obtain the minimum transfer speed over +low_speed+time+ below which the\n" + " * transfer will be aborted.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_limit_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, low_speed_limit, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_time = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the time (in seconds) that the transfer should be below the\n" + " * +low_speed_limit+ for the library to consider it too slow and abort.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_time_set(VALUE self, VALUE low_speed_time) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, low_speed_time, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_time => fixnum or nil\n" + " *\n" + " * Obtain the time that the transfer should be below +low_speed_limit+ for\n" + " * the library to abort it.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_time_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, low_speed_time, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_send_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximal sending transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_send_speed_large_set(VALUE self, VALUE max_send_speed_large) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, max_send_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_send_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Get the maximal sending transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_send_speed_large_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, max_send_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_recv_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximal receiving transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_recv_speed_large_set(VALUE self, VALUE max_recv_speed_large) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, max_recv_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_recv_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Get the maximal receiving transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_recv_speed_large_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, max_recv_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.username = string => string\n" + " *\n" + " * Set the HTTP Authentication username.\n" + " */\n" + "static VALUE ruby_curl_easy_username_set(VALUE self, VALUE username) {\n" + "#if HAVE_CURLOPT_USERNAME\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, username);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.username => string\n" + " *\n" + " * Get the current username\n" + " */\n" + "static VALUE ruby_curl_easy_username_get(VALUE self) {\n" + "#if HAVE_CURLOPT_USERNAME\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, username);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.password = string => string\n" + " *\n" + " * Set the HTTP Authentication password.\n" + " */\n" + "static VALUE ruby_curl_easy_password_set(VALUE self, VALUE password) {\n" + "#if HAVE_CURLOPT_PASSWORD\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, password);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.password => string\n" + " *\n" + " * Get the current password\n" + " */\n" + "static VALUE ruby_curl_easy_password_get(VALUE self) {\n" + "#if HAVE_CURLOPT_PASSWORD\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, password);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_version = value => fixnum or nil\n" + " *\n" + " * Sets the version of SSL/TLS that libcurl will attempt to use. Valid\n" + " * options are:\n" + " *\n" + " * Curl::CURL_SSLVERSION_DEFAULT\n" + " * Curl::CURL_SSLVERSION_TLSv1 (TLS 1.x)\n" + " * Curl::CURL_SSLVERSION_SSLv2\n" + " * Curl::CURL_SSLVERSION_SSLv3\n" + " * Curl::CURL_SSLVERSION_TLSv1_0\n" + " * Curl::CURL_SSLVERSION_TLSv1_1\n" + " * Curl::CURL_SSLVERSION_TLSv1_2\n" + " * Curl::CURL_SSLVERSION_TLSv1_3\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_version_set(VALUE self, VALUE ssl_version) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ssl_version, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_version => fixnum\n" + " *\n" + " * Get the version of SSL/TLS that libcurl will attempt to use.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_version_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ssl_version, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_ssl = value => fixnum or nil\n" + " *\n" + " * Ensure libcurl uses SSL for FTP connections. Valid options are Curl::CURL_USESSL_NONE,\n" + " * Curl::CURL_USESSL_TRY, Curl::CURL_USESSL_CONTROL, and Curl::CURL_USESSL_ALL.\n" + " */\n" + "static VALUE ruby_curl_easy_use_ssl_set(VALUE self, VALUE use_ssl) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, use_ssl, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_ssl => fixnum\n" + " *\n" + " * Get the desired level for using SSL on FTP connections.\n" + " */\n" + "static VALUE ruby_curl_easy_use_ssl_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, use_ssl, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_filemethod = value => fixnum or nil\n" + " *\n" + " * Controls how libcurl reaches files on the server. Valid options are Curl::CURL_MULTICWD,\n" + " * Curl::CURL_NOCWD, and Curl::CURL_SINGLECWD (see libcurl docs for CURLOPT_FTP_METHOD).\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_filemethod_set(VALUE self, VALUE ftp_filemethod) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ftp_filemethod, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_filemethod => fixnum\n" + " *\n" + " * Get the configuration for how libcurl will reach files on the server.\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_filemethod_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ftp_filemethod, -1);\n" + "}\n" + "\n" + "/* ================== BOOL ATTRS ===================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_tunnel = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will use proxy tunneling.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_tunnel_set(VALUE self, VALUE proxy_tunnel) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, proxy_tunnel);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_tunnel? => boolean\n" + " *\n" + " * Determine whether this Curl instance will use proxy tunneling.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_tunnel_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, proxy_tunnel);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.fetch_file_time = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will fetch remote file\n" + " * times, if available.\n" + " */\n" + "static VALUE ruby_curl_easy_fetch_file_time_set(VALUE self, VALUE fetch_file_time) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, fetch_file_time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.fetch_file_time? => boolean\n" + " *\n" + " * Determine whether this Curl instance will fetch remote file\n" + " * times, if available.\n" + " */\n" + "static VALUE ruby_curl_easy_fetch_file_time_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, fetch_file_time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_peer = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will verify the SSL peer\n" + " * certificate. When true (the default), and the verification fails to\n" + " * prove that the certificate is authentic, the connection fails. When\n" + " * false, the connection succeeds regardless.\n" + " *\n" + " * Authenticating the certificate is not by itself very useful. You\n" + " * typically want to ensure that the server, as authentically identified\n" + " * by its certificate, is the server you mean to be talking to.\n" + " * The ssl_verify_host? options controls that.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_peer_set(VALUE self, VALUE ssl_verify_peer) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, ssl_verify_peer);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_peer? => boolean\n" + " *\n" + " * Determine whether this Curl instance will verify the SSL peer\n" + " * certificate.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_peer_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, ssl_verify_peer);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_host = [0, 1, 2] => [0, 1, 2]\n" + " *\n" + " * Configure whether this Curl instance will verify that the server cert\n" + " * is for the server it is known as. When true (the default) the server\n" + " * certificate must indicate that the server is the server to which you\n" + " * meant to connect, or the connection fails. When false, the connection\n" + " * will succeed regardless of the names in the certificate.\n" + " *\n" + " * this option controls is of the identity that the server claims.\n" + " * The server could be lying. To control lying, see ssl_verify_peer? .\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_host_set(VALUE self, VALUE ssl_verify_host) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ssl_verify_host, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_host => number\n" + " *\n" + " * Determine whether this Curl instance will verify that the server cert\n" + " * is for the server it is known as.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_host_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ssl_verify_host, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_in_body = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will return HTTP headers\n" + " * combined with body data. If this option is set true, both header\n" + " * and body data will go to +body_str+ (or the configured +on_body+ handler).\n" + " */\n" + "static VALUE ruby_curl_easy_header_in_body_set(VALUE self, VALUE header_in_body) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, header_in_body);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_in_body? => boolean\n" + " *\n" + " * Determine whether this Curl instance will return HTTP headers\n" + " * combined with body data.\n" + " */\n" + "static VALUE ruby_curl_easy_header_in_body_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, header_in_body);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_netrc = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will use data from the user's\n" + " * .netrc file for FTP connections.\n" + " */\n" + "static VALUE ruby_curl_easy_use_netrc_set(VALUE self, VALUE use_netrc) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, use_netrc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_netrc? => boolean\n" + " *\n" + " * Determine whether this Curl instance will use data from the user's\n" + " * .netrc file for FTP connections.\n" + " */\n" + "static VALUE ruby_curl_easy_use_netrc_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, use_netrc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " *\n" + " * easy = Curl::Easy.new\n" + " * easy.autoreferer=true\n" + " */\n" + "static VALUE ruby_curl_easy_autoreferer_set(VALUE self, VALUE autoreferer) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (Qtrue == autoreferer) {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_AUTOREFERER, 1);\n" + " }\n" + " else {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_AUTOREFERER, 0);\n" + " }\n" + "\n" + " return autoreferer;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.follow_location? => boolean\n" + " *\n" + " * Determine whether this Curl instance will follow Location: headers\n" + " * in HTTP responses.\n" + " */\n" + "static VALUE ruby_curl_easy_follow_location_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, follow_location);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.unrestricted_auth = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance may use any HTTP authentication\n" + " * method available when necessary.\n" + " */\n" + "static VALUE ruby_curl_easy_unrestricted_auth_set(VALUE self, VALUE unrestricted_auth) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, unrestricted_auth);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.unrestricted_auth? => boolean\n" + " *\n" + " * Determine whether this Curl instance may use any HTTP authentication\n" + " * method available when necessary.\n" + " */\n" + "static VALUE ruby_curl_easy_unrestricted_auth_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, unrestricted_auth);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.verbose = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance gives verbose output to STDERR\n" + " * during transfers. Ignored if this instance has an on_debug handler.\n" + " */\n" + "static VALUE ruby_curl_easy_verbose_set(VALUE self, VALUE verbose) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, verbose);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.verbose? => boolean\n" + " *\n" + " * Determine whether this Curl instance gives verbose output to STDERR\n" + " * during transfers.\n" + " */\n" + "static VALUE ruby_curl_easy_verbose_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, verbose);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multipart_form_post = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance uses multipart/formdata content\n" + " * type for HTTP POST requests. If this is false (the default), then the\n" + " * application/x-www-form-urlencoded content type is used for the form\n" + " * data.\n" + " *\n" + " * If this is set true, you must pass one or more PostField instances\n" + " * to the http_post method - no support for posting multipart forms from\n" + " * a string is provided.\n" + " */\n" + "static VALUE ruby_curl_easy_multipart_form_post_set(VALUE self, VALUE multipart_form_post)\n" + "{\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, multipart_form_post);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multipart_form_post? => boolean\n" + " *\n" + " * Determine whether this Curl instance uses multipart/formdata content\n" + " * type for HTTP POST requests.\n" + " */\n" + "static VALUE ruby_curl_easy_multipart_form_post_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, multipart_form_post);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.enable_cookies = boolean => boolean\n" + " *\n" + " * Configure whether the libcurl cookie engine is enabled for this Curl::Easy\n" + " * instance.\n" + " */\n" + "static VALUE ruby_curl_easy_enable_cookies_set(VALUE self, VALUE enable_cookies)\n" + "{\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, enable_cookies);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.enable_cookies? => boolean\n" + " *\n" + " * Determine whether the libcurl cookie engine is enabled for this\n" + " * Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_enable_cookies_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, enable_cookies);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ignore_content_length = boolean\n" + " *\n" + " * Configure whether this Curl::Easy instance should ignore the content\n" + " * length header.\n" + " */\n" + "static VALUE ruby_curl_easy_ignore_content_length_set(VALUE self, VALUE ignore_content_length)\n" + "{\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, ignore_content_length);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ignore_content_length? => boolean\n" + " *\n" + " * Determine whether this Curl::Easy instance ignores the content\n" + " * length header.\n" + " */\n" + "static VALUE ruby_curl_easy_ignore_content_length_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, ignore_content_length);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve_mode => symbol\n" + " *\n" + " * Determines what type of IP address this Curl::Easy instance\n" + " * resolves DNS names to.\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_mode(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " unsigned short rm;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " rm = rbce->resolve_mode;\n" + "\n" + " switch(rm) {\n" + " case CURL_IPRESOLVE_V4:\n" + " return rb_easy_sym(\"ipv4\");\n" + " case CURL_IPRESOLVE_V6:\n" + " return rb_easy_sym(\"ipv6\");\n" + " default:\n" + " return rb_easy_sym(\"auto\");\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve_mode = symbol => symbol\n" + " *\n" + " * Configures what type of IP address this Curl::Easy instance\n" + " * resolves DNS names to. Valid options are:\n" + " *\n" + " * [:auto] resolves DNS names to all IP versions your system allows\n" + " * [:ipv4] resolves DNS names to IPv4 only\n" + " * [:ipv6] resolves DNS names to IPv6 only\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_mode_set(VALUE self, VALUE resolve_mode) {\n" + " if (TYPE(resolve_mode) != T_SYMBOL) {\n" + " rb_raise(rb_eTypeError, \"Must pass a symbol\");\n" + " return Qnil;\n" + " } else {\n" + " ruby_curl_easy *rbce;\n" + " ID resolve_mode_id;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " resolve_mode_id = rb_to_id(resolve_mode);\n" + "\n" + " if (resolve_mode_id == rb_intern(\"auto\")) {\n" + " rbce->resolve_mode = CURL_IPRESOLVE_WHATEVER;\n" + " return resolve_mode;\n" + " } else if (resolve_mode_id == rb_intern(\"ipv4\")) {\n" + " rbce->resolve_mode = CURL_IPRESOLVE_V4;\n" + " return resolve_mode;\n" + " } else if (resolve_mode_id == rb_intern(\"ipv6\")) {\n" + " rbce->resolve_mode = CURL_IPRESOLVE_V6;\n" + " return resolve_mode;\n" + " } else {\n" + " rb_raise(rb_eArgError, \"Must set to one of :auto, :ipv4, :ipv6\");\n" + " return Qnil;\n" + " }\n" + " }\n" + "}\n" + "\n" + "\n" + "/* ================= EVENT PROCS ================== */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_body { |body_data| ... } => \n" + " *\n" + " * Assign or remove the +on_body+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_body+ handler is called for each chunk of response body passed back\n" + " * by libcurl during +perform+. It should perform any processing necessary,\n" + " * and return the actual number of bytes handled. Normally, this will\n" + " * equal the length of the data string, and CURL will continue processing.\n" + " * If the returned length does not equal the input length, CURL will abort\n" + " * the processing with a Curl::Err::AbortedByCallbackError.\n" + " */\n" + "static VALUE ruby_curl_easy_on_body_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, body_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_success { |easy| ... } => \n" + " *\n" + " * Assign or remove the +on_success+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_success+ handler is called when the request is finished with a\n" + " * status of 20x\n" + " */\n" + "static VALUE ruby_curl_easy_on_success_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, success_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_failure {|easy,code| ... } => \n" + " *\n" + " * Assign or remove the +on_failure+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_failure+ handler is called when the request is finished with a\n" + " * status of 50x\n" + " */\n" + "static VALUE ruby_curl_easy_on_failure_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, failure_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_missing {|easy,code| ... } => \n" + " *\n" + " * Assign or remove the on_missing handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no attached\n" + " * block.\n" + " *\n" + " * The +on_missing+ handler is called when request is finished with a\n" + " * status of 40x\n" + " */\n" + "static VALUE ruby_curl_easy_on_missing_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, missing_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_redirect {|easy,code| ... } => \n" + " *\n" + " * Assign or remove the on_redirect handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no attached\n" + " * block.\n" + " *\n" + " * The +on_redirect+ handler is called when request is finished with a\n" + " * status of 30x\n" + " */\n" + "static VALUE ruby_curl_easy_on_redirect_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, redirect_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_complete {|easy| ... } => \n" + " *\n" + " * Assign or remove the +on_complete+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_complete+ handler is called when the request is finished.\n" + " */\n" + "static VALUE ruby_curl_easy_on_complete_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, complete_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_header { |header_data| ... } => \n" + " *\n" + " * Assign or remove the +on_header+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_header+ handler is called for each chunk of response header passed\n" + " * back by libcurl during +perform+. The semantics are the same as for the\n" + " * block supplied to +on_body+.\n" + " */\n" + "static VALUE ruby_curl_easy_on_header_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, header_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_progress { |dl_total, dl_now, ul_total, ul_now| ... } => \n" + " *\n" + " * Assign or remove the +on_progress+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_progress+ handler is called regularly by libcurl (approximately once\n" + " * per second) during transfers to allow the application to receive progress\n" + " * information. There is no guarantee that the reported progress will change\n" + " * between calls.\n" + " *\n" + " * The result of the block call determines whether libcurl continues the transfer.\n" + " * Returning a non-true value (i.e. nil or false) will cause the transfer to abort,\n" + " * throwing a Curl::Err::AbortedByCallbackError.\n" + " */\n" + "static VALUE ruby_curl_easy_on_progress_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, progress_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_debug { |type, data| ... } => \n" + " *\n" + " * Assign or remove the +on_debug+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_debug+ handler, if configured, will receive detailed information\n" + " * from libcurl during the perform call. This can be useful for debugging.\n" + " * Setting a debug handler overrides libcurl's internal handler, disabling\n" + " * any output from +verbose+, if set.\n" + " *\n" + " * The type argument will match one of the Curl::Easy::CURLINFO_XXXX\n" + " * constants, and specifies the kind of information contained in the\n" + " * data. The data is passed as a String.\n" + " */\n" + "static VALUE ruby_curl_easy_on_debug_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, debug_proc);\n" + "}\n" + "\n" + "\n" + "/* =================== PERFORM =====================*/\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up http headers.\n" + " */\n" + "static VALUE cb_each_http_header(VALUE header, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE header_str = Qnil;\n" + "\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " //rb_p(header);\n" + "\n" + " if (rb_type(header) == T_ARRAY) {\n" + " // we're processing a hash, header is [name, val]\n" + " VALUE name, value;\n" + "\n" + " name = rb_obj_as_string(rb_ary_entry(header, 0));\n" + " value = rb_obj_as_string(rb_ary_entry(header, 1));\n" + " if (rb_str_strlen(value) == 0) { // removing the header e.g. Accept: with nothing trailing should remove it see: https://curl.se/libcurl/c/CURLOPT_HTTPHEADER.html\n" + " header_str = rb_str_plus(name, rb_str_new2(\":\"));\n" + " } else {\n" + " // This is a bit inefficient, but we don't want to be modifying\n" + " // the actual values in the original hash.\n" + " header_str = rb_str_plus(name, rb_str_new2(\": \"));\n" + " header_str = rb_str_plus(header_str, value);\n" + " }\n" + " } else {\n" + " header_str = rb_obj_as_string(header);\n" + " }\n" + "\n" + " //rb_p(header_str);\n" + "\n" + " *list = curl_slist_append(*list, StringValuePtr(header_str));\n" + " return header_str;\n" + "}\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up http proxy headers.\n" + " */\n" + "static VALUE cb_each_http_proxy_header(VALUE proxy_header, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE proxy_header_str = Qnil;\n" + "\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " //rb_p(proxy_header);\n" + "\n" + " if (rb_type(proxy_header) == T_ARRAY) {\n" + " // we're processing a hash, proxy header is [name, val]\n" + " VALUE name, value;\n" + "\n" + " name = rb_obj_as_string(rb_ary_entry(proxy_header, 0));\n" + " value = rb_obj_as_string(rb_ary_entry(proxy_header, 1));\n" + "\n" + " // This is a bit inefficient, but we don't want to be modifying\n" + " // the actual values in the original hash.\n" + " proxy_header_str = rb_str_plus(name, rb_str_new2(\": \"));\n" + " proxy_header_str = rb_str_plus(proxy_header_str, value);\n" + " } else {\n" + " proxy_header_str = rb_obj_as_string(proxy_header);\n" + " }\n" + "\n" + " //rb_p(header_str);\n" + "\n" + " *list = curl_slist_append(*list, StringValuePtr(proxy_header_str));\n" + " return proxy_header_str;\n" + "}\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up ftp commands.\n" + " */\n" + "static VALUE cb_each_ftp_command(VALUE ftp_command, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE ftp_command_string;\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " ftp_command_string = rb_obj_as_string(ftp_command);\n" + " *list = curl_slist_append(*list, StringValuePtr(ftp_command));\n" + "\n" + " return ftp_command_string;\n" + "}\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up the resolve list.\n" + " */\n" + "static VALUE cb_each_resolve(VALUE resolve, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE resolve_string;\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " resolve_string = rb_obj_as_string(resolve);\n" + " *list = curl_slist_append(*list, StringValuePtr(resolve));\n" + "\n" + " return resolve_string;\n" + "}\n" + "\n" + "/***********************************************\n" + " *\n" + " * Setup a connection\n" + " *\n" + " * Always returns Qtrue, rb_raise on error.\n" + " */\n" + "VALUE ruby_curl_easy_setup(ruby_curl_easy *rbce) {\n" + " // TODO this could do with a bit of refactoring...\n" + " CURL *curl;\n" + " VALUE url, _url = rb_easy_get(\"url\");\n" + " struct curl_slist **hdrs = &(rbce->curl_headers);\n" + " struct curl_slist **phdrs = &(rbce->curl_proxy_headers);\n" + " struct curl_slist **cmds = &(rbce->curl_ftp_commands);\n" + " struct curl_slist **rslv = &(rbce->curl_resolve);\n" + "\n" + " curl = rbce->curl;\n" + "\n" + " if (_url == Qnil) {\n" + " rb_raise(eCurlErrError, \"No URL supplied\");\n" + " }\n" + "\n" + " url = rb_check_string_type(_url);\n" + " curl_easy_setopt(curl, CURLOPT_URL, StringValuePtr(url));\n" + "\n" + " // network stuff and auth\n" + " if (!rb_easy_nil(\"interface_hm\")) {\n" + " curl_easy_setopt(curl, CURLOPT_INTERFACE, rb_easy_get_str(\"interface_hm\"));\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_INTERFACE, NULL);\n" + " }\n" + "\n" + "#if HAVE_CURLOPT_USERNAME == 1 && HAVE_CURLOPT_PASSWORD == 1\n" + " if (!rb_easy_nil(\"username\")) {\n" + " curl_easy_setopt(curl, CURLOPT_USERNAME, rb_easy_get_str(\"username\"));\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_USERNAME, NULL);\n" + " }\n" + " if (!rb_easy_nil(\"password\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PASSWORD, rb_easy_get_str(\"password\"));\n" + " }\n" + " else {\n" + " curl_easy_setopt(curl, CURLOPT_PASSWORD, NULL);\n" + " }\n" + "#endif\n" + "\n" + " if (!rb_easy_nil(\"userpwd\")) {\n" + " curl_easy_setopt(curl, CURLOPT_USERPWD, rb_easy_get_str(\"userpwd\"));\n" + "#if HAVE_CURLOPT_USERNAME == 1\n" + " } else if (rb_easy_nil(\"username\") && rb_easy_nil(\"password\")) { /* don't set this even to NULL if we have set username and password */\n" + "#else\n" + " } else {\n" + "#endif\n" + " curl_easy_setopt(curl, CURLOPT_USERPWD, NULL);\n" + " }\n" + "\n" + " if (rb_easy_nil(\"proxy_url\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXY, NULL);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXY, rb_easy_get_str(\"proxy_url\"));\n" + " }\n" + "\n" + " if (rb_easy_nil(\"proxypwd\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, NULL);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, rb_easy_get_str(\"proxypwd\"));\n" + " }\n" + "\n" + " // body/header procs\n" + " if (!rb_easy_nil(\"body_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)&proc_data_handler_body);\n" + " curl_easy_setopt(curl, CURLOPT_WRITEDATA, rbce);\n" + " /* clear out the body_data if it was set */\n" + " rb_easy_del(\"body_data\");\n" + " } else {\n" + " VALUE body_buffer = rb_easy_set(\"body_data\", rb_str_buf_new(32768));\n" + " curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)&default_data_handler);\n" + " curl_easy_setopt(curl, CURLOPT_WRITEDATA, body_buffer);\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"header_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, (curl_write_callback)&proc_data_handler_header);\n" + " curl_easy_setopt(curl, CURLOPT_HEADERDATA, rbce);\n" + " /* clear out the header_data if it was set */\n" + " rb_easy_del(\"header_data\");\n" + " } else {\n" + " VALUE header_buffer = rb_easy_set(\"header_data\", rb_str_buf_new(16384));\n" + " curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, (curl_write_callback)&default_data_handler);\n" + " curl_easy_setopt(curl, CURLOPT_HEADERDATA, header_buffer);\n" + " }\n" + "\n" + " /* encoding */\n" + " if (!rb_easy_nil(\"encoding\")) {\n" + " curl_easy_setopt(curl, CURLOPT_ENCODING, rb_easy_get_str(\"encoding\"));\n" + " }\n" + "\n" + " // progress and debug procs\n" + " if (!rb_easy_nil(\"progress_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, (curl_progress_callback)&proc_progress_handler);\n" + " curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, rb_easy_get(\"progress_proc\"));\n" + " curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"debug_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, (curl_debug_callback)&proc_debug_handler);\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGDATA, rb_easy_get(\"debug_proc\"));\n" + " curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);\n" + " } else {\n" + " // have to remove handler to re-enable standard verbosity\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGDATA, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_VERBOSE, rbce->verbose);\n" + " }\n" + "\n" + " /* general opts */\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_HEADER, rbce->header_in_body);\n" + " curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, rbce->follow_location);\n" + " curl_easy_setopt(curl, CURLOPT_MAXREDIRS, rbce->max_redirs);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, rbce->proxy_tunnel);\n" + " curl_easy_setopt(curl, CURLOPT_FILETIME, rbce->fetch_file_time);\n" + " curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, rbce->ssl_verify_peer);\n" + " curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, rbce->ssl_verify_host);\n" + "\n" + " if ((rbce->use_netrc != Qnil) && (rbce->use_netrc != Qfalse)) {\n" + " curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_IGNORED);\n" + " }\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, rbce->unrestricted_auth);\n" + "\n" + "#if HAVE_CURLOPT_TIMEOUT_MS\n" + " curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, rbce->timeout_ms);\n" + "#endif\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, rbce->connect_timeout);\n" + "#if HAVE_CURLOPT_CONNECTTIMEOUT_MS\n" + " curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, rbce->connect_timeout_ms);\n" + "#endif\n" + " curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, rbce->dns_cache_timeout);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, rbce->ignore_content_length);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_IPRESOLVE, rbce->resolve_mode);\n" + "\n" + "\n" + "#if LIBCURL_VERSION_NUM >= 0x070a08\n" + " curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, rbce->ftp_response_timeout);\n" + "#else\n" + " if (rbce->ftp_response_timeout > 0) {\n" + " rb_warn(\"Installed libcurl is too old to support ftp_response_timeout\");\n" + " }\n" + "#endif\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, rbce->low_speed_limit);\n" + " curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, rbce->low_speed_time);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, rbce->max_recv_speed_large);\n" + " curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, rbce->max_send_speed_large);\n" + "\n" + " // Set up localport / proxy port\n" + " // FIXME these won't get returned to default if they're unset Ruby\n" + " if (rbce->proxy_port > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYPORT, rbce->proxy_port);\n" + " }\n" + "\n" + " if (rbce->local_port > 0) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070f02\n" + " curl_easy_setopt(curl, CURLOPT_LOCALPORT, rbce->local_port);\n" + "\n" + " if (rbce->local_port_range > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, rbce->local_port_range);\n" + " }\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support local_port\");\n" + "#endif\n" + " }\n" + "\n" + " if (rbce->proxy_type != -1) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070a00\n" + " if (rbce->proxy_type == -2) {\n" + " rb_warn(\"Installed libcurl is too old to support the selected proxy type\");\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYTYPE, rbce->proxy_type);\n" + " }\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support proxy_type\");\n" + "#endif\n" + " }\n" + "\n" + " /*\n" + " * NOTE: we used to set CURLAUTH_ANY but see: http://curl.haxx.se/mail/lib-2015-06/0033.html\n" + " */\n" + " if (rbce->http_auth_types != 0) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070a06\n" + " curl_easy_setopt(curl, CURLOPT_HTTPAUTH, rbce->http_auth_types);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support http_auth_types\");\n" + "#endif\n" + " }\n" + "\n" + " if (rbce->proxy_auth_types != 0) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070a07\n" + " curl_easy_setopt(curl, CURLOPT_PROXYAUTH, rbce->proxy_auth_types);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support proxy_auth_types\");\n" + "#endif\n" + " }\n" + "\n" + " /* Set up HTTP cookie handling if necessary\n" + " FIXME this may not get disabled if it's enabled, the disabled again from ruby.\n" + " */\n" + " if (rbce->enable_cookies) {\n" + " if (!rb_easy_nil(\"cookiejar\")) {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIEJAR, rb_easy_get_str(\"cookiejar\"));\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"cookiefile\")) {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIEFILE, rb_easy_get_str(\"cookiefile\"));\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIEFILE, \"\"); /* \"\" = magic to just enable */\n" + " }\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"cookies\")) {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIE, rb_easy_get_str(\"cookies\"));\n" + " }\n" + "\n" + " /* Set up HTTPS cert handling if necessary */\n" + " if (!rb_easy_nil(\"cert\")) {\n" + " if (!rb_easy_nil(\"certtype\")) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, rb_easy_get_str(\"certtype\"));\n" + " }\n" + " curl_easy_setopt(curl, CURLOPT_SSLCERT, rb_easy_get_str(\"cert\"));\n" + " if (!rb_easy_nil(\"certpassword\")) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLCERTPASSWD, rb_easy_get_str(\"certpassword\"));\n" + " }\n" + " if (!rb_easy_nil(\"cert_key\")) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLKEY, rb_easy_get_str(\"cert_key\"));\n" + " }\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"cacert\")) {\n" + " curl_easy_setopt(curl, CURLOPT_CAINFO, rb_easy_get_str(\"cacert\"));\n" + " }\n" + "#ifdef HAVE_CURL_CONFIG_CA\n" + " else {\n" + " curl_easy_setopt(curl, CURLOPT_CAINFO, CURL_CONFIG_CA);\n" + " }\n" + "#endif\n" + "\n" + "#ifdef CURL_VERSION_SSL\n" + " if (rbce->ssl_version > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLVERSION, rbce->ssl_version);\n" + " }\n" + "\n" + " if (rbce->use_ssl > 0) {\n" + " curl_easy_setopt(curl, CURB_FTPSSL, rbce->use_ssl);\n" + " }\n" + "#else\n" + " if (rbce->ssl_version > 0 || rbce->use_ssl > 0) {\n" + " rb_warn(\"libcurl is not configured with SSL support\");\n" + " }\n" + "#endif\n" + "\n" + " if (rbce->ftp_filemethod > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, rbce->ftp_filemethod);\n" + " }\n" + "\n" + " /* Set the user-agent string if specified */\n" + " if (!rb_easy_nil(\"useragent\")) {\n" + " curl_easy_setopt(curl, CURLOPT_USERAGENT, rb_easy_get_str(\"useragent\"));\n" + " }\n" + "\n" + " /* Setup HTTP headers if necessary */\n" + " curl_easy_setopt(curl, CURLOPT_HTTPHEADER, NULL); // XXX: maybe we shouldn't be clearing this?\n" + "\n" + " if (!rb_easy_nil(\"headers\")) {\n" + " if (rb_easy_type_check(\"headers\", T_ARRAY) || rb_easy_type_check(\"headers\", T_HASH)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, hdrs);\n" + " rb_iterate(rb_each, rb_easy_get(\"headers\"), cb_each_http_header, wrap);\n" + " } else {\n" + " VALUE headers_str = rb_obj_as_string(rb_easy_get(\"headers\"));\n" + " *hdrs = curl_slist_append(*hdrs, StringValuePtr(headers_str));\n" + " }\n" + "\n" + " if (*hdrs) {\n" + " curl_easy_setopt(curl, CURLOPT_HTTPHEADER, *hdrs);\n" + " }\n" + " }\n" + "\n" + "#if HAVE_CURLOPT_PROXYHEADER\n" + " /* Setup HTTP proxy headers if necessary */\n" + " curl_easy_setopt(curl, CURLOPT_PROXYHEADER, NULL); // XXX: maybe we shouldn't be clearing this?\n" + "\n" + " if (!rb_easy_nil(\"proxy_headers\")) {\n" + " if (rb_easy_type_check(\"proxy_headers\", T_ARRAY) || rb_easy_type_check(\"proxy_headers\", T_HASH)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, phdrs);\n" + " rb_iterate(rb_each, rb_easy_get(\"proxy_headers\"), cb_each_http_proxy_header, wrap);\n" + " } else {\n" + " VALUE proxy_headers_str = rb_obj_as_string(rb_easy_get(\"proxy_headers\"));\n" + " *phdrs = curl_slist_append(*hdrs, StringValuePtr(proxy_headers_str));\n" + " }\n" + "\n" + " if (*phdrs) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYHEADER, *phdrs);\n" + " }\n" + " }\n" + "#endif\n" + "\n" + " /* Setup FTP commands if necessary */\n" + " if (!rb_easy_nil(\"ftp_commands\")) {\n" + " if (rb_easy_type_check(\"ftp_commands\", T_ARRAY)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, cmds);\n" + " rb_iterate(rb_each, rb_easy_get(\"ftp_commands\"), cb_each_ftp_command, wrap);\n" + " }\n" + "\n" + " if (*cmds) {\n" + " curl_easy_setopt(curl, CURLOPT_QUOTE, *cmds);\n" + " }\n" + " }\n" + "\n" + "#if HAVE_CURLOPT_RESOLVE\n" + " /* Setup resolve list if necessary */\n" + " if (!rb_easy_nil(\"resolve\")) {\n" + " if (rb_easy_type_check(\"resolve\", T_ARRAY)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, rslv);\n" + " rb_iterate(rb_each, rb_easy_get(\"resolve\"), cb_each_resolve, wrap);\n" + " }\n" + "\n" + " if (*rslv) {\n" + " curl_easy_setopt(curl, CURLOPT_RESOLVE, *rslv);\n" + " }\n" + " }\n" + "#endif\n" + "\n" + " return Qnil;\n" + "}\n" + "/***********************************************\n" + " *\n" + " * Clean up a connection\n" + " *\n" + " * Always returns Qnil.\n" + " */\n" + "VALUE ruby_curl_easy_cleanup( VALUE self, ruby_curl_easy *rbce ) {\n" + "\n" + " CURL *curl = rbce->curl;\n" + " struct curl_slist *ftp_commands;\n" + " struct curl_slist *resolve;\n" + "\n" + " /* Free everything up */\n" + " if (rbce->curl_headers) {\n" + " curl_slist_free_all(rbce->curl_headers);\n" + " rbce->curl_headers = NULL;\n" + " }\n" + "\n" + " if (rbce->curl_proxy_headers) {\n" + " curl_slist_free_all(rbce->curl_proxy_headers);\n" + " rbce->curl_proxy_headers = NULL;\n" + " }\n" + "\n" + " ftp_commands = rbce->curl_ftp_commands;\n" + " if (ftp_commands) {\n" + " curl_slist_free_all(ftp_commands);\n" + " rbce->curl_ftp_commands = NULL;\n" + " }\n" + "\n" + " resolve = rbce->curl_resolve;\n" + " if (resolve) {\n" + " curl_slist_free_all(resolve);\n" + " rbce->curl_resolve = NULL;\n" + " }\n" + "\n" + " /* clean up a PUT request's curl options. */\n" + " if (!rb_easy_nil(\"upload\")) {\n" + " rb_easy_del(\"upload\"); // set the upload object to Qnil to let the GC clean up\n" + " curl_easy_setopt(curl, CURLOPT_UPLOAD, 0);\n" + " curl_easy_setopt(curl, CURLOPT_READFUNCTION, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_READDATA, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0);\n" + " }\n" + "\n" + " // set values on cleanup to nil\n" + " //rb_easy_del(\"multi\");\n" + "\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * Common implementation of easy.http(verb) and easy.http_delete\n" + " */\n" + "static VALUE ruby_curl_easy_perform_verb_str(VALUE self, const char *verb) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + " VALUE retval;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl = rbce->curl;\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, verb);\n" + "\n" + " retval = rb_funcall(self, rb_intern(\"perform\"), 0);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);\n" + "\n" + " return retval;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http(verb)\n" + " *\n" + " * Send an HTTP request with method set to verb, using the current options set for this Curl::Easy instance.\n" + " * This method always returns true or raises an exception (defined under Curl::Err) on error.\n" + " */\n" + "static VALUE ruby_curl_easy_perform_verb(VALUE self, VALUE verb) {\n" + " VALUE str_verb;\n" + " if (rb_type(verb) == T_STRING) {\n" + " return ruby_curl_easy_perform_verb_str(self, StringValueCStr(verb));\n" + " }\n" + " else if (rb_respond_to(verb,rb_intern(\"to_s\"))) {\n" + " str_verb = rb_funcall(verb, rb_intern(\"to_s\"), 0);\n" + " return ruby_curl_easy_perform_verb_str(self, StringValueCStr(str_verb));\n" + " }\n" + " else {\n" + " rb_raise(rb_eRuntimeError, \"Invalid HTTP VERB, must response to 'to_s'\");\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_post(\"url=encoded%20form%20data;and=so%20on\") => true\n" + " * easy.http_post(\"url=encoded%20form%20data\", \"and=so%20on\", ...) => true\n" + " * easy.http_post(\"url=encoded%20form%20data\", Curl::PostField, \"and=so%20on\", ...) => true\n" + " * easy.http_post(Curl::PostField, Curl::PostField ..., Curl::PostField) => true\n" + " *\n" + " * POST the specified formdata to the currently configured URL using\n" + " * the current options set for this Curl::Easy instance. This method\n" + " * always returns true, or raises an exception (defined under\n" + " * Curl::Err) on error.\n" + " *\n" + " * The Content-type of the POST is determined by the current setting\n" + " * of multipart_form_post? , according to the following rules:\n" + " * * When false (the default): the form will be POSTed with a\n" + " * content-type of 'application/x-www-form-urlencoded', and any of the\n" + " * four calling forms may be used.\n" + " * * When true: the form will be POSTed with a content-type of\n" + " * 'multipart/formdata'. Only the last calling form may be used,\n" + " * i.e. only PostField instances may be POSTed. In this mode,\n" + " * individual fields' content-types are recognised, and file upload\n" + " * fields are supported.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_perform_post(int argc, VALUE *argv, VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + " int i;\n" + " VALUE args_ary;\n" + "\n" + " rb_scan_args(argc, argv, \"*\", &args_ary);\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl = rbce->curl;\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);\n" + "\n" + " if (rbce->multipart_form_post) {\n" + " VALUE ret;\n" + " struct curl_httppost *first = NULL, *last = NULL;\n" + "\n" + " // Make the multipart form\n" + " for (i = 0; i < argc; i++) {\n" + " if (rb_obj_is_instance_of(argv[i], cCurlPostField)) {\n" + " append_to_form(argv[i], &first, &last);\n" + " } else if (rb_type(argv[i]) == T_ARRAY) {\n" + " // see: https://github.com/rvanlieshout/curb/commit/8bcdefddc0162484681ebd1a92d52a642666a445\n" + " long c = 0, argv_len = RARRAY_LEN(argv[i]);\n" + " for (; c < argv_len; ++c) {\n" + " if (rb_obj_is_instance_of(rb_ary_entry(argv[i],c), cCurlPostField)) {\n" + " append_to_form(rb_ary_entry(argv[i],c), &first, &last);\n" + " } else {\n" + " rb_raise(eCurlErrInvalidPostField, \"You must use PostFields only with multipart form posts\");\n" + " return Qnil;\n" + " }\n" + " }\n" + " } else {\n" + " rb_raise(eCurlErrInvalidPostField, \"You must use PostFields only with multipart form posts\");\n" + " return Qnil;\n" + " }\n" + " }\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_POST, 0);\n" + " curl_easy_setopt(curl, CURLOPT_HTTPPOST, first);\n" + " ret = rb_funcall(self, rb_intern(\"perform\"), 0);\n" + " curl_formfree(first);\n" + "\n" + " return ret;\n" + " } else {\n" + " VALUE post_body = Qnil;\n" + " /* TODO: check for PostField.file and raise error before to_s fails */\n" + " if ((post_body = rb_funcall(args_ary, idJoin, 1, rbstrAmp)) == Qnil) {\n" + " rb_raise(eCurlErrError, \"Failed to join arguments\");\n" + " return Qnil;\n" + " } else {\n" + " /* if the function call above returns an empty string because no additional arguments were passed this makes sure\n" + " a previously set easy.post_body = \"arg=foo&bar=bin\" will be honored */\n" + " if( post_body != Qnil && rb_type(post_body) == T_STRING && RSTRING_LEN(post_body) > 0 ) {\n" + " ruby_curl_easy_post_body_set(self, post_body);\n" + " }\n" + "\n" + " /* if post body is not defined, set it so we enable POST header, even though the request body is empty */\n" + " if( rb_easy_nil(\"postdata_buffer\") ) {\n" + " ruby_curl_easy_post_body_set(self, post_body);\n" + " }\n" + "\n" + " return rb_funcall(self, rb_intern(\"perform\"), 0);\n" + " }\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_put(data) => true\n" + " *\n" + " * PUT the supplied data to the currently configured URL using the\n" + " * current options set for this Curl::Easy instance. This method always\n" + " * returns true, or raises an exception (defined under Curl::Err) on error.\n" + " */\n" + "static VALUE ruby_curl_easy_perform_put(VALUE self, VALUE data) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl = rbce->curl;\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);\n" + " ruby_curl_easy_put_data_set(self, data);\n" + "\n" + " return rb_funcall(self, rb_intern(\"perform\"), 0);\n" + "}\n" + "\n" + "\n" + "/* =================== DATA FUNCS =============== */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.body_str => \"response body\"\n" + " *\n" + " * Return the response body from the previous call to +perform+. This\n" + " * is populated by the default +on_body+ handler - if you supply\n" + " * your own body handler, this string will be empty.\n" + " */\n" + "static VALUE ruby_curl_easy_body_str_get(VALUE self) {\n" + " /*\n" + " TODO: can we force_encoding on the return here if we see charset=utf-8 in the content-type header?\n" + " Content-Type: application/json; charset=utf-8\n" + " */\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, body_data);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_str => \"response header\"\n" + " *\n" + " * Return the response header from the previous call to +perform+. This\n" + " * is populated by the default +on_header+ handler - if you supply\n" + " * your own header handler, this string will be empty.\n" + " */\n" + "static VALUE ruby_curl_easy_header_str_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, header_data);\n" + "}\n" + "\n" + "\n" + "/* ============== LASTCONN INFO FUNCS ============ */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.last_effective_url => \"http://some.url\" or nil\n" + " *\n" + " * Retrieve the last effective URL used by this instance.\n" + " * This is the URL used in the last +perform+ call,\n" + " * and may differ from the value of easy.url.\n" + " */\n" + "static VALUE ruby_curl_easy_last_effective_url_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " char* url;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_EFFECTIVE_URL, &url);\n" + "\n" + " if (url && url[0]) { // curl returns empty string if none\n" + " return rb_str_new2(url);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.response_code => fixnum\n" + " *\n" + " * Retrieve the last received HTTP or FTP code. This will be zero\n" + " * if no server response code has been received. Note that a proxy's\n" + " * CONNECT response should be read with +http_connect_code+\n" + " * and not this method.\n" + " */\n" + "static VALUE ruby_curl_easy_response_code_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long code;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "#ifdef HAVE_CURLINFO_RESPONSE_CODE\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_RESPONSE_CODE, &code);\n" + "#else\n" + " // old libcurl\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_HTTP_CODE, &code);\n" + "#endif\n" + "\n" + " return LONG2NUM(code);\n" + "}\n" + "\n" + "#if defined(HAVE_CURLINFO_PRIMARY_IP)\n" + "/*\n" + " * call-seq:\n" + " * easy.primary_ip => \"xx.xx.xx.xx\" or nil\n" + " *\n" + " * Retrieve the resolved IP of the most recent connection\n" + " * done with this curl handle. This string may be IPv6 if\n" + " * that's enabled. This feature requires curl 7.19.x and above\n" + " */\n" + "static VALUE ruby_curl_easy_primary_ip_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " char* ip;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_PRIMARY_IP, &ip);\n" + "\n" + " if (ip && ip[0]) { // curl returns empty string if none\n" + " return rb_str_new2(ip);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "#endif\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_connect_code => fixnum\n" + " *\n" + " * Retrieve the last received proxy response code to a CONNECT request.\n" + " */\n" + "static VALUE ruby_curl_easy_http_connect_code_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long code;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_HTTP_CONNECTCODE, &code);\n" + "\n" + " return LONG2NUM(code);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.file_time => fixnum\n" + " *\n" + " * Retrieve the remote time of the retrieved document (in number of\n" + " * seconds since 1 jan 1970 in the GMT/UTC time zone). If you get -1,\n" + " * it can be because of many reasons (unknown, the server hides it\n" + " * or the server doesn't support the command that tells document time\n" + " * etc) and the time of the document is unknown.\n" + " *\n" + " * Note that you must tell the server to collect this information\n" + " * before the transfer is made, by setting +fetch_file_time?+ to true,\n" + " * or you will unconditionally get a -1 back.\n" + " *\n" + " * This requires libcurl 7.5 or higher - otherwise -1 is unconditionally\n" + " * returned.\n" + " */\n" + "static VALUE ruby_curl_easy_file_time_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_FILETIME\n" + " ruby_curl_easy *rbce;\n" + " long time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_FILETIME, &time);\n" + "\n" + " return LONG2NUM(time);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support file_time\");\n" + " return LONG2NUM(0);\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.total_time => float\n" + " *\n" + " * Retrieve the total time in seconds for the previous transfer,\n" + " * including name resolving, TCP connect etc.\n" + " */\n" + "static VALUE ruby_curl_easy_total_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_TOTAL_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.name_lookup_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the\n" + " * name resolving was completed.\n" + " */\n" + "static VALUE ruby_curl_easy_name_lookup_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_NAMELOOKUP_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the\n" + " * connect to the remote host (or proxy) was completed.\n" + " */\n" + "static VALUE ruby_curl_easy_connect_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONNECT_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.app_connect_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the SSL/SSH\n" + " * connect/handshake to the remote host was completed. This time is most often\n" + " * very near to the pre transfer time, except for cases such as HTTP\n" + " * pipelining where the pretransfer time can be delayed due to waits in line\n" + " * for the pipeline and more.\n" + " */\n" + "#if defined(HAVE_CURLINFO_APPCONNECT_TIME)\n" + "static VALUE ruby_curl_easy_app_connect_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_APPCONNECT_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "#endif\n" + "\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.pre_transfer_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the\n" + " * file transfer is just about to begin. This includes all pre-transfer\n" + " * commands and negotiations that are specific to the particular protocol(s)\n" + " * involved.\n" + " */\n" + "static VALUE ruby_curl_easy_pre_transfer_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_PRETRANSFER_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.start_transfer_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the first byte\n" + " * is just about to be transferred. This includes the +pre_transfer_time+ and\n" + " * also the time the server needs to calculate the result.\n" + " */\n" + "static VALUE ruby_curl_easy_start_transfer_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_STARTTRANSFER_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.redirect_time => float\n" + " *\n" + " * Retrieve the total time, in seconds, it took for all redirection steps\n" + " * include name lookup, connect, pretransfer and transfer before final\n" + " * transaction was started. +redirect_time+ contains the complete\n" + " * execution time for multiple redirections.\n" + " *\n" + " * Requires libcurl 7.9.7 or higher, otherwise -1 is always returned.\n" + " */\n" + "static VALUE ruby_curl_easy_redirect_time_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_REDIRECT_TIME\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support redirect_time\");\n" + " return rb_float_new(-1);\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.redirect_count => integer\n" + " *\n" + " * Retrieve the total number of redirections that were actually followed.\n" + " *\n" + " * Requires libcurl 7.9.7 or higher, otherwise -1 is always returned.\n" + " */\n" + "static VALUE ruby_curl_easy_redirect_count_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_REDIRECT_COUNT\n" + " ruby_curl_easy *rbce;\n" + " long count;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_COUNT, &count);\n" + "\n" + " return LONG2NUM(count);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support redirect_count\");\n" + " return LONG2NUM(-1);\n" + "#endif\n" + "\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.redirect_url => \"http://some.url\" or nil\n" + " *\n" + " * Retrieve the URL a redirect would take you to if you\n" + " * would enable CURLOPT_FOLLOWLOCATION.\n" + " *\n" + " * Requires libcurl 7.18.2 or higher, otherwise -1 is always returned.\n" + " */\n" + "static VALUE ruby_curl_easy_redirect_url_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_REDIRECT_URL\n" + " ruby_curl_easy *rbce;\n" + " char* url;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_URL, &url);\n" + "\n" + " if (url && url[0]) { // curl returns empty string if none\n" + " return rb_str_new2(url);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support redirect_url\");\n" + " return LONG2NUM(-1);\n" + "#endif\n" + "}\n" + "\n" + "\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.uploaded_bytes => float\n" + " *\n" + " * Retrieve the total amount of bytes that were uploaded in the\n" + " * preceeding transfer.\n" + " */\n" + "static VALUE ruby_curl_easy_uploaded_bytes_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_UPLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.downloaded_bytes => float\n" + " *\n" + " * Retrieve the total amount of bytes that were downloaded in the\n" + " * preceeding transfer.\n" + " */\n" + "static VALUE ruby_curl_easy_downloaded_bytes_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_DOWNLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.upload_speed => float\n" + " *\n" + " * Retrieve the average upload speed that curl measured for the\n" + " * preceeding complete upload.\n" + " */\n" + "static VALUE ruby_curl_easy_upload_speed_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_UPLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.download_speed => float\n" + " *\n" + " * Retrieve the average download speed that curl measured for\n" + " * the preceeding complete download.\n" + " */\n" + "static VALUE ruby_curl_easy_download_speed_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_DOWNLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_size => fixnum\n" + " *\n" + " * Retrieve the total size of all the headers received in the\n" + " * preceeding transfer.\n" + " */\n" + "static VALUE ruby_curl_easy_header_size_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long size;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_HEADER_SIZE, &size);\n" + "\n" + " return LONG2NUM(size);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.request_size => fixnum\n" + " *\n" + " * Retrieve the total size of the issued requests. This is so far\n" + " * only for HTTP requests. Note that this may be more than one request\n" + " * if +follow_location?+ is true.\n" + " */\n" + "static VALUE ruby_curl_easy_request_size_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long size;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REQUEST_SIZE, &size);\n" + "\n" + " return LONG2NUM(size);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_result => integer\n" + " *\n" + " * Retrieve the result of the certification verification that was requested\n" + " * (by setting +ssl_verify_peer?+ to +true+).\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_result_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long result;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SSL_VERIFYRESULT, &result);\n" + "\n" + " return LONG2NUM(result);\n" + "}\n" + "\n" + "/* TODO CURLINFO_SSL_ENGINES\n" + "\n" + "Pass the address of a 'struct curl_slist *' to receive a linked-list of OpenSSL crypto-engines supported.\n" + "Note that engines are normally implemented in separate dynamic libraries.\n" + "Hence not all the returned engines may be available at run-time.\n" + "NOTE: you must call curl_slist_free_all(3) on the list pointer once you're done with it, as libcurl will not free the data for you. (Added in 7.12.3)\n" + "*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.downloaded_content_length => float\n" + " *\n" + " * Retrieve the content-length of the download. This is the value read\n" + " * from the Content-Length: field.\n" + " */\n" + "static VALUE ruby_curl_easy_downloaded_content_length_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.uploaded_content_length => float\n" + " *\n" + " * Retrieve the content-length of the upload.\n" + " */\n" + "static VALUE ruby_curl_easy_uploaded_content_length_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.content_type => \"content/type\" or nil\n" + " *\n" + " * Retrieve the content-type of the downloaded object. This is the value read\n" + " * from the Content-Type: field. If you get +nil+, it means that the server\n" + " * didn't send a valid Content-Type header or that the protocol used doesn't\n" + " * support this.\n" + " */\n" + "static VALUE ruby_curl_easy_content_type_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " char* type;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_TYPE, &type);\n" + "\n" + " if (type && type[0]) { // curl returns empty string if none\n" + " return rb_str_new2(type);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "\n" + "\n" + "/* NOT REQUIRED?\n" + "CURLINFO_PRIVATE\n" + "\n" + "Pass a pointer to a 'char *' to receive the pointer to the private data associated with the curl handle (set with the CURLOPT_PRIVATE option to curl_easy_setopt(3)). (Added in 7.10.3)\n" + "*/\n" + "\n" + "/* TODO these will need constants setting up too for checking the bits.\n" + " *\n" + " * Alternatively, could return an object that wraps the long, and has\n" + " * question methods to query the auth types. Could return long from to_i(nt)\n" + " *\n" + "CURLINFO_HTTPAUTH_AVAIL\n" + "\n" + "Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available. The meaning of the bits is explained in the CURLOPT_HTTPAUTH option for curl_easy_setopt(3). (Added in 7.10.8)\n" + "\n" + "CURLINFO_PROXYAUTH_AVAIL\n" + "\n" + "Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available for your proxy authentication. (Added in 7.10.8)\n" + "*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.os_errno => integer\n" + " *\n" + " * Retrieve the errno variable from a connect failure (requires\n" + " * libcurl 7.12.2 or higher, otherwise 0 is always returned).\n" + " */\n" + "static VALUE ruby_curl_easy_os_errno_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_OS_ERRNO\n" + " ruby_curl_easy *rbce;\n" + " long result;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_OS_ERRNO, &result);\n" + "\n" + " return LONG2NUM(result);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support os_errno\");\n" + " return LONG2NUM(0);\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.num_connects => integer\n" + " *\n" + " * Retrieve the number of new connections libcurl had to create to achieve\n" + " * the previous transfer (only the successful connects are counted).\n" + " * Combined with +redirect_count+ you are able to know how many times libcurl\n" + " * successfully reused existing connection(s) or not.\n" + " *\n" + " * See the Connection Options of curl_easy_setopt(3) to see how libcurl tries\n" + " * to make persistent connections to save time.\n" + " *\n" + " * (requires libcurl 7.12.3 or higher, otherwise -1 is always returned).\n" + " */\n" + "static VALUE ruby_curl_easy_num_connects_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_NUM_CONNECTS\n" + " ruby_curl_easy *rbce;\n" + " long result;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_NUM_CONNECTS, &result);\n" + "\n" + " return LONG2NUM(result);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support num_connects\");\n" + " return LONG2NUM(-1);\n" + "#endif\n" + "}\n" + "\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookielist => array\n" + " *\n" + " * Retrieves the cookies curl knows in an array of strings.\n" + " * Returned strings are in Netscape cookiejar format or in Set-Cookie format.\n" + " *\n" + " * See also option CURLINFO_COOKIELIST of curl_easy_getopt(3) to see how libcurl behaves.\n" + " *\n" + " * (requires libcurl 7.14.1 or higher, otherwise -1 is always returned).\n" + "*/\n" + "static VALUE ruby_curl_easy_cookielist_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_COOKIELIST\n" + " ruby_curl_easy *rbce;\n" + " struct curl_slist *cookies;\n" + " struct curl_slist *cookie;\n" + " VALUE rb_cookies;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_COOKIELIST, &cookies);\n" + " if (!cookies)\n" + " return Qnil;\n" + " rb_cookies = rb_ary_new();\n" + " for (cookie = cookies; cookie; cookie = cookie->next)\n" + " rb_ary_push(rb_cookies, rb_str_new2(cookie->data));\n" + " curl_slist_free_all(cookies);\n" + " return rb_cookies;\n" + "\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support cookielist\");\n" + " return INT2FIX(-1);\n" + "#endif\n" + "}\n" + "\n" + "\n" + "/* TODO this needs to be implemented. Could probably support CONNECT_ONLY by having this\n" + " * return an open Socket or something.\n" + " *\n" + "CURLINFO_LASTSOCKET\n" + "\n" + "Pass a pointer to a long to receive the last socket used by this curl session. If the socket is no longer valid, -1 is returned. When you finish working with the socket, you must call curl_easy_cleanup() as usual and let libcurl close the socket and cleanup other resources associated with the handle. This is typically used in combination with CURLOPT_CONNECT_ONLY. (Added in 7.15.2)\n" + "*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_entry_path => \"C:\\ftp\\root\\\" or nil\n" + " *\n" + " * Retrieve the path of the entry path. That is the initial path libcurl ended\n" + " * up in when logging on to the remote FTP server. This returns +nil+ if\n" + " * something is wrong.\n" + " *\n" + " * (requires libcurl 7.15.4 or higher, otherwise +nil+ is always returned).\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_entry_path_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_FTP_ENTRY_PATH\n" + " ruby_curl_easy *rbce;\n" + " char* path = NULL;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_FTP_ENTRY_PATH, &path);\n" + "\n" + " if (path && path[0]) { // curl returns NULL or empty string if none\n" + " return rb_str_new2(path);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support num_connects\");\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multi => \"#\"\n" + " */\n" + "static VALUE ruby_curl_easy_multi_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return rbce->multi;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multi=multi => \"#\"\n" + " */\n" + "static VALUE ruby_curl_easy_multi_set(VALUE self, VALUE multi) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " rbce->multi = multi;\n" + " return rbce->multi;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.last_result => 0\n" + " */\n" + "static VALUE ruby_curl_easy_last_result(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return LONG2NUM(rbce->last_result);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.last_error => \"Error details\" or nil\n" + " */\n" + "static VALUE ruby_curl_easy_last_error(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (rbce->err_buf[0]) { // curl returns NULL or empty string if none\n" + " return rb_str_new2(rbce->err_buf);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.setopt Fixnum, value => value\n" + " *\n" + " * Initial access to libcurl curl_easy_setopt\n" + " */\n" + "static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {\n" + " ruby_curl_easy *rbce;\n" + " long option = NUM2LONG(opt);\n" + " rb_io_t *open_f_ptr;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " switch (option) {\n" + " /* BEHAVIOR OPTIONS */\n" + " case CURLOPT_VERBOSE: {\n" + " VALUE verbose = val;\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, verbose);\n" + " } break;\n" + " case CURLOPT_FOLLOWLOCATION: {\n" + " VALUE follow_location = val;\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, follow_location);\n" + " } break;\n" + " /* TODO: CALLBACK OPTIONS */\n" + " /* TODO: ERROR OPTIONS */\n" + " /* NETWORK OPTIONS */\n" + " case CURLOPT_URL: {\n" + " VALUE url = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, url);\n" + " } break;\n" + " case CURLOPT_CUSTOMREQUEST:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_CUSTOMREQUEST, NIL_P(val) ? NULL : StringValueCStr(val));\n" + " break;\n" + " case CURLOPT_HTTP_VERSION:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HTTP_VERSION, NUM2LONG(val));\n" + " break;\n" + " case CURLOPT_PROXY: {\n" + " VALUE proxy_url = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_url);\n" + " } break;\n" + " case CURLOPT_INTERFACE: {\n" + " VALUE interface_hm = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, interface_hm);\n" + " } break;\n" + " case CURLOPT_HEADER:\n" + " case CURLOPT_NOPROGRESS:\n" + " case CURLOPT_NOSIGNAL:\n" + "#if HAVE_CURLOPT_PATH_AS_IS\n" + " case CURLOPT_PATH_AS_IS:\n" + "#endif\n" + "#if HAVE_CURLOPT_PIPEWAIT\n" + " case CURLOPT_PIPEWAIT:\n" + "#endif\n" + " case CURLOPT_HTTPGET:\n" + " case CURLOPT_NOBODY: {\n" + " int type = rb_type(val);\n" + " VALUE value;\n" + " if (type == T_TRUE) {\n" + " value = rb_int_new(1);\n" + " } else if (type == T_FALSE) {\n" + " value = rb_int_new(0);\n" + " } else {\n" + " value = rb_funcall(val, rb_intern(\"to_i\"), 0);\n" + " }\n" + " curl_easy_setopt(rbce->curl, option, NUM2LONG(value));\n" + " } break;\n" + " case CURLOPT_POST: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_POST, rb_type(val) == T_TRUE);\n" + " } break;\n" + " case CURLOPT_MAXCONNECTS: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAXCONNECTS, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_POSTFIELDS: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_POSTFIELDS, NIL_P(val) ? NULL : StringValueCStr(val));\n" + " } break;\n" + " case CURLOPT_USERPWD: {\n" + " VALUE userpwd = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, userpwd);\n" + " } break;\n" + " case CURLOPT_PROXYUSERPWD: {\n" + " VALUE proxypwd = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, proxypwd);\n" + " } break;\n" + " case CURLOPT_COOKIE: {\n" + " VALUE cookies = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cookies);\n" + " } break;\n" + " case CURLOPT_COOKIEFILE: {\n" + " VALUE cookiefile = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cookiefile);\n" + " } break;\n" + " case CURLOPT_COOKIEJAR: {\n" + " VALUE cookiejar = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cookiejar);\n" + " } break;\n" + " case CURLOPT_TCP_NODELAY: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_NODELAY, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_RANGE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_RANGE, StringValueCStr(val));\n" + " } break;\n" + " case CURLOPT_RESUME_FROM: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_RESUME_FROM, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_FAILONERROR: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_FAILONERROR, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_SSL_CIPHER_LIST: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_SSL_CIPHER_LIST, StringValueCStr(val));\n" + " } break;\n" + " case CURLOPT_FORBID_REUSE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_FORBID_REUSE, NUM2LONG(val));\n" + " } break;\n" + "#if HAVE_CURLOPT_GSSAPI_DELEGATION\n" + " case CURLOPT_GSSAPI_DELEGATION: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_GSSAPI_DELEGATION, NUM2LONG(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_UNIX_SOCKET_PATH\n" + " case CURLOPT_UNIX_SOCKET_PATH: {\n" + "\tcurl_easy_setopt(rbce->curl, CURLOPT_UNIX_SOCKET_PATH, StringValueCStr(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_MAX_SEND_SPEED_LARGE\n" + " case CURLOPT_MAX_SEND_SPEED_LARGE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t) NUM2LL(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_MAX_RECV_SPEED_LARGE\n" + " case CURLOPT_MAX_RECV_SPEED_LARGE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t) NUM2LL(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_MAXFILESIZE\n" + " case CURLOPT_MAXFILESIZE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAXFILESIZE, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + "#if HAVE_CURLOPT_TCP_KEEPALIVE\n" + " case CURLOPT_TCP_KEEPALIVE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPALIVE, NUM2LONG(val));\n" + " break;\n" + " case CURLOPT_TCP_KEEPIDLE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPIDLE, NUM2LONG(val));\n" + " break;\n" + " case CURLOPT_TCP_KEEPINTVL:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPINTVL, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + "#if HAVE_CURLOPT_HAPROXYPROTOCOL\n" + " case CURLOPT_HAPROXYPROTOCOL:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HAPROXYPROTOCOL, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + " case CURLOPT_STDERR:\n" + " // libcurl requires raw FILE pointer and this should be IO object in Ruby.\n" + " // Tempfile or StringIO won't work.\n" + " Check_Type(val, T_FILE);\n" + " GetOpenFile(val, open_f_ptr);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_STDERR, rb_io_stdio_file(open_f_ptr));\n" + " break;\n" + " case CURLOPT_PROTOCOLS:\n" + " case CURLOPT_REDIR_PROTOCOLS:\n" + " curl_easy_setopt(rbce->curl, option, NUM2LONG(val));\n" + " break;\n" + "#if HAVE_CURLOPT_SSL_SESSIONID_CACHE\n" + " case CURLOPT_SSL_SESSIONID_CACHE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_SSL_SESSIONID_CACHE, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + "#if HAVE_CURLOPT_PROXY_SSL_VERIFYHOST\n" + " case CURLOPT_PROXY_SSL_VERIFYHOST:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_PROXY_SSL_VERIFYHOST, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + " default:\n" + " rb_raise(rb_eTypeError, \"Curb unsupported option\");\n" + " }\n" + "\n" + " return val;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.getinfo Fixnum => value\n" + " *\n" + " * Iniital access to libcurl curl_easy_getinfo, remember getinfo doesn't return the same values as setopt\n" + " */\n" + "static VALUE ruby_curl_easy_get_opt(VALUE self, VALUE opt) {\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.inspect => \"#\"\n" + " */\n" + "static VALUE ruby_curl_easy_inspect(VALUE self) {\n" + " char buf[64];\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " /* if we don't have a url set... we'll crash... */\n" + " if( !rb_easy_nil(\"url\") && rb_easy_type_check(\"url\", T_STRING)) {\n" + " VALUE url = rb_easy_get(\"url\");\n" + " size_t len = 13+((RSTRING_LEN(url) > 50) ? 50 : RSTRING_LEN(url));\n" + " /* \"#\" */\n" + " memcpy(buf,\"#\");\n" + "}\n" + "\n" + "\n" + "/* ================== ESCAPING FUNCS ==============*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.escape(\"some text\") => \"some%20text\"\n" + " *\n" + " * Convert the given input string to a URL encoded string and return\n" + " * the result. All input characters that are not a-z, A-Z or 0-9 are\n" + " * converted to their \"URL escaped\" version (%NN where NN is a\n" + " * two-digit hexadecimal number).\n" + " */\n" + "static VALUE ruby_curl_easy_escape(VALUE self, VALUE svalue) {\n" + " ruby_curl_easy *rbce;\n" + " char *result;\n" + " VALUE rresult;\n" + " VALUE str = svalue;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " /* NOTE: make sure the value is a string, if not call to_s */\n" + " if( rb_type(str) != T_STRING ) { str = rb_funcall(str,rb_intern(\"to_s\"),0); }\n" + "\n" + "#if (LIBCURL_VERSION_NUM >= 0x070f04)\n" + " result = (char*)curl_easy_escape(rbce->curl, StringValuePtr(str), (int)RSTRING_LEN(str));\n" + "#else\n" + " result = (char*)curl_escape(StringValuePtr(str), (int)RSTRING_LEN(str));\n" + "#endif\n" + "\n" + " rresult = rb_str_new2(result);\n" + " curl_free(result);\n" + "\n" + " return rresult;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.unescape(\"some%20text\") => \"some text\"\n" + " *\n" + " * Convert the given URL encoded input string to a \"plain string\" and return\n" + " * the result. All input characters that are URL encoded (%XX where XX is a\n" + " * two-digit hexadecimal number) are converted to their binary versions.\n" + " */\n" + "static VALUE ruby_curl_easy_unescape(VALUE self, VALUE str) {\n" + " ruby_curl_easy *rbce;\n" + " int rlen;\n" + " char *result;\n" + " VALUE rresult;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + "#if (LIBCURL_VERSION_NUM >= 0x070f04)\n" + " result = (char*)curl_easy_unescape(rbce->curl, StringValuePtr(str), (int)RSTRING_LEN(str), &rlen);\n" + "#else\n" + " result = (char*)curl_unescape(StringValuePtr(str), (int)RSTRING_LEN(str));\n" + " rlen = strlen(result);\n" + "#endif\n" + "\n" + " rresult = rb_str_new(result, rlen);\n" + " curl_free(result);\n" + "\n" + " return rresult;\n" + "}\n" + "\n" + "\n" + "/* ================= CLASS METHODS ==================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * Curl::Easy.error(code) => [ErrCode, String]\n" + " *\n" + " * translate an internal libcurl error to ruby error class\n" + " */\n" + "static VALUE ruby_curl_easy_error_message(VALUE klass, VALUE code) {\n" + " return rb_curl_easy_error(NUM2INT(code));\n" + "}\n" + "\n" + "/* =================== INIT LIB =====================*/\n" + "// TODO: https://bugs.ruby-lang.org/issues/18007\n" + "void init_curb_easy() {\n" + " idCall = rb_intern(\"call\");\n" + " idJoin = rb_intern(\"join\");\n" + "\n" + " rbstrAmp = rb_str_new2(\"&\");\n" + " rb_global_variable(&rbstrAmp);\n" + "\n" + " cCurlEasy = rb_define_class_under(mCurl, \"Easy\", rb_cObject);\n" + "\n" + " /* Class methods */\n" + " rb_define_alloc_func(cCurlEasy, ruby_curl_easy_allocate);\n" + " rb_define_singleton_method(cCurlEasy, \"error\", ruby_curl_easy_error_message, 1);\n" + "\n" + " /* Initialize method */\n" + " rb_define_method(cCurlEasy, \"initialize\", ruby_curl_easy_initialize, -1);\n" + "\n" + " /* Attributes for config next perform */\n" + " rb_define_method(cCurlEasy, \"url\", ruby_curl_easy_url_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_url\", ruby_curl_easy_proxy_url_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"proxy_headers=\", ruby_curl_easy_proxy_headers_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_headers\", ruby_curl_easy_proxy_headers_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"headers=\", ruby_curl_easy_headers_set, 1);\n" + " rb_define_method(cCurlEasy, \"headers\", ruby_curl_easy_headers_get, 0);\n" + " rb_define_method(cCurlEasy, \"interface\", ruby_curl_easy_interface_get, 0);\n" + " rb_define_method(cCurlEasy, \"userpwd\", ruby_curl_easy_userpwd_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxypwd\", ruby_curl_easy_proxypwd_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookies\", ruby_curl_easy_cookies_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookiefile\", ruby_curl_easy_cookiefile_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookiejar\", ruby_curl_easy_cookiejar_get, 0);\n" + " rb_define_method(cCurlEasy, \"cert=\", ruby_curl_easy_cert_set, 1);\n" + " rb_define_method(cCurlEasy, \"cert\", ruby_curl_easy_cert_get, 0);\n" + " rb_define_method(cCurlEasy, \"cert_key=\", ruby_curl_easy_cert_key_set, 1);\n" + " rb_define_method(cCurlEasy, \"cert_key\", ruby_curl_easy_cert_key_get, 0);\n" + " rb_define_method(cCurlEasy, \"cacert=\", ruby_curl_easy_cacert_set, 1);\n" + " rb_define_method(cCurlEasy, \"cacert\", ruby_curl_easy_cacert_get, 0);\n" + " rb_define_method(cCurlEasy, \"certpassword=\", ruby_curl_easy_certpassword_set, 1);\n" + " rb_define_method(cCurlEasy, \"certtype=\", ruby_curl_easy_certtype_set, 1);\n" + " rb_define_method(cCurlEasy, \"certtype\", ruby_curl_easy_certtype_get, 0);\n" + " rb_define_method(cCurlEasy, \"encoding=\", ruby_curl_easy_encoding_set, 1);\n" + " rb_define_method(cCurlEasy, \"encoding\", ruby_curl_easy_encoding_get, 0);\n" + " rb_define_method(cCurlEasy, \"useragent=\", ruby_curl_easy_useragent_set, 1);\n" + " rb_define_method(cCurlEasy, \"useragent\", ruby_curl_easy_useragent_get, 0);\n" + " rb_define_method(cCurlEasy, \"post_body=\", ruby_curl_easy_post_body_set, 1);\n" + " rb_define_method(cCurlEasy, \"post_body\", ruby_curl_easy_post_body_get, 0);\n" + " rb_define_method(cCurlEasy, \"put_data=\", ruby_curl_easy_put_data_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_commands=\", ruby_curl_easy_ftp_commands_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_commands\", ruby_curl_easy_ftp_commands_get, 0);\n" + " rb_define_method(cCurlEasy, \"resolve=\", ruby_curl_easy_resolve_set, 1);\n" + " rb_define_method(cCurlEasy, \"resolve\", ruby_curl_easy_resolve_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"local_port=\", ruby_curl_easy_local_port_set, 1);\n" + " rb_define_method(cCurlEasy, \"local_port\", ruby_curl_easy_local_port_get, 0);\n" + " rb_define_method(cCurlEasy, \"local_port_range=\", ruby_curl_easy_local_port_range_set, 1);\n" + " rb_define_method(cCurlEasy, \"local_port_range\", ruby_curl_easy_local_port_range_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_port=\", ruby_curl_easy_proxy_port_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_port\", ruby_curl_easy_proxy_port_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_type=\", ruby_curl_easy_proxy_type_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_type\", ruby_curl_easy_proxy_type_get, 0);\n" + " rb_define_method(cCurlEasy, \"http_auth_types=\", ruby_curl_easy_http_auth_types_set, -1);\n" + " rb_define_method(cCurlEasy, \"http_auth_types\", ruby_curl_easy_http_auth_types_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_auth_types=\", ruby_curl_easy_proxy_auth_types_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_auth_types\", ruby_curl_easy_proxy_auth_types_get, 0);\n" + " rb_define_method(cCurlEasy, \"max_redirects=\", ruby_curl_easy_max_redirects_set, 1);\n" + " rb_define_method(cCurlEasy, \"max_redirects\", ruby_curl_easy_max_redirects_get, 0);\n" + " rb_define_method(cCurlEasy, \"timeout=\", ruby_curl_easy_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"timeout\", ruby_curl_easy_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"timeout_ms=\", ruby_curl_easy_timeout_ms_set, 1);\n" + " rb_define_method(cCurlEasy, \"timeout_ms\", ruby_curl_easy_timeout_ms_get, 0);\n" + " rb_define_method(cCurlEasy, \"connect_timeout=\", ruby_curl_easy_connect_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"connect_timeout\", ruby_curl_easy_connect_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"connect_timeout_ms=\", ruby_curl_easy_connect_timeout_ms_set, 1);\n" + " rb_define_method(cCurlEasy, \"connect_timeout_ms\", ruby_curl_easy_connect_timeout_ms_get, 0);\n" + " rb_define_method(cCurlEasy, \"dns_cache_timeout=\", ruby_curl_easy_dns_cache_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"dns_cache_timeout\", ruby_curl_easy_dns_cache_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"ftp_response_timeout=\", ruby_curl_easy_ftp_response_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_response_timeout\", ruby_curl_easy_ftp_response_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"low_speed_limit=\", ruby_curl_easy_low_speed_limit_set, 1);\n" + " rb_define_method(cCurlEasy, \"low_speed_limit\", ruby_curl_easy_low_speed_limit_get, 0);\n" + " rb_define_method(cCurlEasy, \"low_speed_time=\", ruby_curl_easy_low_speed_time_set, 1);\n" + " rb_define_method(cCurlEasy, \"low_speed_time\", ruby_curl_easy_low_speed_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"max_send_speed_large=\", ruby_curl_easy_max_send_speed_large_set, 1);\n" + " rb_define_method(cCurlEasy, \"max_send_speed_large\", ruby_curl_easy_max_send_speed_large_get, 0);\n" + " rb_define_method(cCurlEasy, \"max_recv_speed_large=\", ruby_curl_easy_max_recv_speed_large_set, 1);\n" + " rb_define_method(cCurlEasy, \"max_recv_speed_large\", ruby_curl_easy_max_recv_speed_large_get, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_version=\", ruby_curl_easy_ssl_version_set, 1);\n" + " rb_define_method(cCurlEasy, \"ssl_version\", ruby_curl_easy_ssl_version_get, 0);\n" + " rb_define_method(cCurlEasy, \"use_ssl=\", ruby_curl_easy_use_ssl_set, 1);\n" + " rb_define_method(cCurlEasy, \"use_ssl\", ruby_curl_easy_use_ssl_get, 0);\n" + " rb_define_method(cCurlEasy, \"ftp_filemethod=\", ruby_curl_easy_ftp_filemethod_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_filemethod\", ruby_curl_easy_ftp_filemethod_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"username=\", ruby_curl_easy_username_set, 1);\n" + " rb_define_method(cCurlEasy, \"username\", ruby_curl_easy_username_get, 0);\n" + " rb_define_method(cCurlEasy, \"password=\", ruby_curl_easy_password_set, 1);\n" + " rb_define_method(cCurlEasy, \"password\", ruby_curl_easy_password_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"proxy_tunnel=\", ruby_curl_easy_proxy_tunnel_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_tunnel?\", ruby_curl_easy_proxy_tunnel_q, 0);\n" + " rb_define_method(cCurlEasy, \"fetch_file_time=\", ruby_curl_easy_fetch_file_time_set, 1);\n" + " rb_define_method(cCurlEasy, \"fetch_file_time?\", ruby_curl_easy_fetch_file_time_q, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_peer=\", ruby_curl_easy_ssl_verify_peer_set, 1);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_peer?\", ruby_curl_easy_ssl_verify_peer_q, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_host_integer=\", ruby_curl_easy_ssl_verify_host_set, 1);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_host\", ruby_curl_easy_ssl_verify_host_get, 0);\n" + " rb_define_method(cCurlEasy, \"header_in_body=\", ruby_curl_easy_header_in_body_set, 1);\n" + " rb_define_method(cCurlEasy, \"header_in_body?\", ruby_curl_easy_header_in_body_q, 0);\n" + " rb_define_method(cCurlEasy, \"use_netrc=\", ruby_curl_easy_use_netrc_set, 1);\n" + " rb_define_method(cCurlEasy, \"use_netrc?\", ruby_curl_easy_use_netrc_q, 0);\n" + " rb_define_method(cCurlEasy, \"follow_location?\", ruby_curl_easy_follow_location_q, 0);\n" + " rb_define_method(cCurlEasy, \"autoreferer=\", ruby_curl_easy_autoreferer_set, 1);\n" + " rb_define_method(cCurlEasy, \"unrestricted_auth=\", ruby_curl_easy_unrestricted_auth_set, 1);\n" + " rb_define_method(cCurlEasy, \"unrestricted_auth?\", ruby_curl_easy_unrestricted_auth_q, 0);\n" + " rb_define_method(cCurlEasy, \"verbose=\", ruby_curl_easy_verbose_set, 1);\n" + " rb_define_method(cCurlEasy, \"verbose?\", ruby_curl_easy_verbose_q, 0);\n" + " rb_define_method(cCurlEasy, \"multipart_form_post=\", ruby_curl_easy_multipart_form_post_set, 1);\n" + " rb_define_method(cCurlEasy, \"multipart_form_post?\", ruby_curl_easy_multipart_form_post_q, 0);\n" + " rb_define_method(cCurlEasy, \"enable_cookies=\", ruby_curl_easy_enable_cookies_set, 1);\n" + " rb_define_method(cCurlEasy, \"enable_cookies?\", ruby_curl_easy_enable_cookies_q, 0);\n" + " rb_define_method(cCurlEasy, \"ignore_content_length=\", ruby_curl_easy_ignore_content_length_set, 1);\n" + " rb_define_method(cCurlEasy, \"ignore_content_length?\", ruby_curl_easy_ignore_content_length_q, 0);\n" + " rb_define_method(cCurlEasy, \"resolve_mode\", ruby_curl_easy_resolve_mode, 0);\n" + " rb_define_method(cCurlEasy, \"resolve_mode=\", ruby_curl_easy_resolve_mode_set, 1);\n" + "\n" + " rb_define_method(cCurlEasy, \"on_body\", ruby_curl_easy_on_body_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_header\", ruby_curl_easy_on_header_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_progress\", ruby_curl_easy_on_progress_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_debug\", ruby_curl_easy_on_debug_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_success\", ruby_curl_easy_on_success_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_failure\", ruby_curl_easy_on_failure_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_missing\", ruby_curl_easy_on_missing_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_redirect\", ruby_curl_easy_on_redirect_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_complete\", ruby_curl_easy_on_complete_set, -1);\n" + "\n" + " rb_define_method(cCurlEasy, \"http\", ruby_curl_easy_perform_verb, 1);\n" + " rb_define_method(cCurlEasy, \"http_post\", ruby_curl_easy_perform_post, -1);\n" + " rb_define_method(cCurlEasy, \"http_put\", ruby_curl_easy_perform_put, 1);\n" + "\n" + " /* Post-perform info methods */\n" + " rb_define_method(cCurlEasy, \"body_str\", ruby_curl_easy_body_str_get, 0);\n" + " rb_define_method(cCurlEasy, \"header_str\", ruby_curl_easy_header_str_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"last_effective_url\", ruby_curl_easy_last_effective_url_get, 0);\n" + " rb_define_method(cCurlEasy, \"response_code\", ruby_curl_easy_response_code_get, 0);\n" + " rb_define_method(cCurlEasy, \"code\", ruby_curl_easy_response_code_get, 0);\n" + "#if defined(HAVE_CURLINFO_PRIMARY_IP)\n" + " rb_define_method(cCurlEasy, \"primary_ip\", ruby_curl_easy_primary_ip_get, 0);\n" + "#endif\n" + " rb_define_method(cCurlEasy, \"http_connect_code\", ruby_curl_easy_http_connect_code_get, 0);\n" + " rb_define_method(cCurlEasy, \"file_time\", ruby_curl_easy_file_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"total_time\", ruby_curl_easy_total_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"name_lookup_time\", ruby_curl_easy_name_lookup_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"connect_time\", ruby_curl_easy_connect_time_get, 0);\n" + "#if defined(HAVE_CURLINFO_APPCONNECT_TIME)\n" + " rb_define_method(cCurlEasy, \"app_connect_time\", ruby_curl_easy_app_connect_time_get, 0);\n" + "#endif\n" + " rb_define_method(cCurlEasy, \"pre_transfer_time\", ruby_curl_easy_pre_transfer_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"start_transfer_time\", ruby_curl_easy_start_transfer_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"redirect_time\", ruby_curl_easy_redirect_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"redirect_count\", ruby_curl_easy_redirect_count_get, 0);\n" + " rb_define_method(cCurlEasy, \"redirect_url\", ruby_curl_easy_redirect_url_get, 0);\n" + " rb_define_method(cCurlEasy, \"downloaded_bytes\", ruby_curl_easy_downloaded_bytes_get, 0);\n" + " rb_define_method(cCurlEasy, \"uploaded_bytes\", ruby_curl_easy_uploaded_bytes_get, 0);\n" + " rb_define_method(cCurlEasy, \"download_speed\", ruby_curl_easy_download_speed_get, 0);\n" + " rb_define_method(cCurlEasy, \"upload_speed\", ruby_curl_easy_upload_speed_get, 0);\n" + " rb_define_method(cCurlEasy, \"header_size\", ruby_curl_easy_header_size_get, 0);\n" + " rb_define_method(cCurlEasy, \"request_size\", ruby_curl_easy_request_size_get, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_result\", ruby_curl_easy_ssl_verify_result_get, 0);\n" + " rb_define_method(cCurlEasy, \"downloaded_content_length\", ruby_curl_easy_downloaded_content_length_get, 0);\n" + " rb_define_method(cCurlEasy, \"uploaded_content_length\", ruby_curl_easy_uploaded_content_length_get, 0);\n" + " rb_define_method(cCurlEasy, \"content_type\", ruby_curl_easy_content_type_get, 0);\n" + " rb_define_method(cCurlEasy, \"os_errno\", ruby_curl_easy_os_errno_get, 0);\n" + " rb_define_method(cCurlEasy, \"num_connects\", ruby_curl_easy_num_connects_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookielist\", ruby_curl_easy_cookielist_get, 0);\n" + " rb_define_method(cCurlEasy, \"ftp_entry_path\", ruby_curl_easy_ftp_entry_path_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"close\", ruby_curl_easy_close, 0);\n" + " rb_define_method(cCurlEasy, \"reset\", ruby_curl_easy_reset, 0);\n" + "\n" + " /* Curl utils */\n" + " rb_define_method(cCurlEasy, \"escape\", ruby_curl_easy_escape, 1);\n" + " rb_define_method(cCurlEasy, \"unescape\", ruby_curl_easy_unescape, 1);\n" + "\n" + " /* Runtime support */\n" + " rb_define_method(cCurlEasy, \"clone\", ruby_curl_easy_clone, 0);\n" + " rb_define_alias(cCurlEasy, \"dup\", \"clone\");\n" + " rb_define_method(cCurlEasy, \"inspect\", ruby_curl_easy_inspect, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"multi\", ruby_curl_easy_multi_get, 0);\n" + " rb_define_method(cCurlEasy, \"multi=\", ruby_curl_easy_multi_set, 1);\n" + " rb_define_method(cCurlEasy, \"last_result\", ruby_curl_easy_last_result, 0);\n" + " rb_define_method(cCurlEasy, \"last_error\", ruby_curl_easy_last_error, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"setopt\", ruby_curl_easy_set_opt, 2);\n" + " rb_define_method(cCurlEasy, \"getinfo\", ruby_curl_easy_get_opt, 1);\n" + "}\n"> expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/ext/curb_easy.c'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n"> =============================================================================== F =============================================================================== Failure: test_download_url_to_file_via_io(TestCurbCurlDownload) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_download.rb:59:in 'TestCurbCurlDownload#test_download_url_to_file_via_io' <"/* curb_easy.c - Curl easy mode\n" + " * Copyright (c)2006 Ross Bamford.\n" + " * Licensed under the Ruby License. See LICENSE for details.\n" + " *\n" + " * $Id: curb_easy.c 30 2006-12-09 12:30:24Z roscopeco $\n" + " */\n" + "#include \"curb_easy.h\"\n" + "#include \"curb_errors.h\"\n" + "#include \"curb_postfield.h\"\n" + "#include \"curb_upload.h\"\n" + "#include \"curb_multi.h\"\n" + "\n" + "#include \n" + "#include \n" + "\n" + "extern VALUE mCurl;\n" + "\n" + "static VALUE idCall;\n" + "static VALUE idJoin;\n" + "static VALUE rbstrAmp;\n" + "\n" + "#ifdef RDOC_NEVER_DEFINED\n" + " mCurl = rb_define_module(\"Curl\");\n" + "#endif\n" + "\n" + "VALUE cCurlEasy;\n" + "\n" + "// for Ruby 1.8\n" + "#ifndef HAVE_RB_IO_STDIO_FILE\n" + "static FILE * rb_io_stdio_file(rb_io_t *fptr) {\n" + " return fptr->f;\n" + "}\n" + "#endif\n" + "\n" + "/* ================== CURL HANDLER FUNCS ==============*/\n" + "\n" + "static VALUE callback_exception(VALUE unused, VALUE exception) {\n" + " return Qfalse;\n" + "}\n" + "\n" + "/* These handle both body and header data */\n" + "static size_t default_data_handler(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " VALUE out) {\n" + " rb_str_buf_cat(out, stream, size * nmemb);\n" + " return size * nmemb;\n" + "}\n" + "\n" + "// size_t function( void *ptr, size_t size, size_t nmemb, void *stream);\n" + "static size_t read_data_handler(void *ptr,\n" + " size_t size,\n" + " size_t nmemb,\n" + " ruby_curl_easy *rbce) {\n" + " VALUE upload = rb_easy_get(\"upload\");\n" + " size_t read_bytes = (size*nmemb);\n" + " VALUE stream = ruby_curl_upload_stream_get(upload);\n" + "\n" + " if (rb_respond_to(stream, rb_intern(\"read\"))) {//if (rb_respond_to(stream, rb_intern(\"to_s\"))) {\n" + " /* copy read_bytes from stream into ptr */\n" + " VALUE str = rb_funcall(stream, rb_intern(\"read\"), 1, rb_int_new(read_bytes) );\n" + " if( str != Qnil ) {\n" + " memcpy(ptr, RSTRING_PTR(str), RSTRING_LEN(str));\n" + " return RSTRING_LEN(str);\n" + " }\n" + " else {\n" + " return 0;\n" + " }\n" + " }\n" + " else if (rb_respond_to(stream, rb_intern(\"to_s\"))) {\n" + " ruby_curl_upload *rbcu;\n" + " VALUE str;\n" + " size_t len;\n" + " size_t remaining;\n" + " char *str_ptr;\n" + " Data_Get_Struct(upload, ruby_curl_upload, rbcu);\n" + " str = rb_funcall(stream, rb_intern(\"to_s\"), 0);\n" + " len = RSTRING_LEN(str);\n" + " remaining = len - rbcu->offset;\n" + " str_ptr = RSTRING_PTR(str);\n" + "\n" + " if( remaining <= read_bytes ) {\n" + " if( remaining > 0 ) {\n" + " memcpy(ptr, str_ptr+rbcu->offset, remaining);\n" + " read_bytes = remaining;\n" + " rbcu->offset += remaining;\n" + " }\n" + " return remaining;\n" + " }\n" + " else { // read_bytes < remaining - send what we can fit in the buffer(ptr)\n" + " memcpy(ptr, str_ptr+rbcu->offset, read_bytes);\n" + " rbcu->offset += read_bytes;\n" + " }\n" + " return read_bytes;\n" + " }\n" + " else {\n" + " return 0;\n" + " }\n" + "}\n" + "\n" + "int seek_data_handler(ruby_curl_easy *rbce,\n" + " curl_off_t offset,\n" + " int origin) {\n" + "\n" + " VALUE upload = rb_easy_get(\"upload\");\n" + " VALUE stream = ruby_curl_upload_stream_get(upload);\n" + "\n" + " if (rb_respond_to(stream, rb_intern(\"seek\"))) {\n" + " rb_funcall(stream, rb_intern(\"seek\"), 2, SEEK_SET, offset);\n" + " } else {\n" + " ruby_curl_upload *rbcu;\n" + " Data_Get_Struct(upload, ruby_curl_upload, rbcu);\n" + " // This OK because curl only uses SEEK_SET as per the documentation\n" + " rbcu->offset = offset;\n" + " }\n" + "\n" + " return 0;\n" + "}\n" + "\n" + "static size_t proc_data_handler(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " VALUE proc) {\n" + " VALUE procret;\n" + "\n" + " procret = rb_funcall(proc, idCall, 1, rb_str_new(stream, size * nmemb));\n" + "\n" + " switch (rb_type(procret)) {\n" + " case T_FIXNUM:\n" + " return FIX2LONG(procret);\n" + " case T_BIGNUM:\n" + " return NUM2LONG(procret);\n" + " default:\n" + " rb_warn(\"Curl data handlers should return the number of bytes read as an Integer\");\n" + " return size * nmemb;\n" + " }\n" + "}\n" + "\n" + "static size_t proc_data_handler_body(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " ruby_curl_easy *rbce)\n" + "{\n" + " size_t ret;\n" + " rbce->callback_active = 1;\n" + " ret = proc_data_handler(stream, size, nmemb, rb_easy_get(\"body_proc\"));\n" + " rbce->callback_active = 0;\n" + " return ret;\n" + "}\n" + "static size_t proc_data_handler_header(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " ruby_curl_easy *rbce)\n" + "{\n" + " size_t ret;\n" + " rbce->callback_active = 1;\n" + " ret = proc_data_handler(stream, size, nmemb, rb_easy_get(\"header_proc\"));\n" + " rbce->callback_active = 0;\n" + " return ret;\n" + "}\n" + "\n" + "\n" + "static VALUE call_progress_handler(VALUE ary) {\n" + " return rb_funcall(rb_ary_entry(ary, 0), idCall, 4,\n" + " rb_ary_entry(ary, 1), // rb_float_new(dltotal),\n" + " rb_ary_entry(ary, 2), // rb_float_new(dlnow),\n" + " rb_ary_entry(ary, 3), // rb_float_new(ultotal),\n" + " rb_ary_entry(ary, 4)); // rb_float_new(ulnow));\n" + "}\n" + "\n" + "static int proc_progress_handler(VALUE proc,\n" + " double dltotal,\n" + " double dlnow,\n" + " double ultotal,\n" + " double ulnow) {\n" + " VALUE procret;\n" + " VALUE callargs = rb_ary_new2(5);\n" + "\n" + " rb_ary_store(callargs, 0, proc);\n" + " rb_ary_store(callargs, 1, rb_float_new(dltotal));\n" + " rb_ary_store(callargs, 2, rb_float_new(dlnow));\n" + " rb_ary_store(callargs, 3, rb_float_new(ultotal));\n" + " rb_ary_store(callargs, 4, rb_float_new(ulnow));\n" + "\n" + "\t//v = rb_rescue(range_check, (VALUE)args, range_failed, 0);\n" + " //procret = rb_funcall(proc, idCall, 4, rb_float_new(dltotal),\n" + " // rb_float_new(dlnow),\n" + " // rb_float_new(ultotal),\n" + " // rb_float_new(ulnow));\n" + " procret = rb_rescue(call_progress_handler, callargs, callback_exception, Qnil);\n" + "\n" + " return(((procret == Qfalse) || (procret == Qnil)) ? -1 : 0);\n" + "}\n" + "\n" + "static VALUE call_debug_handler(VALUE ary) {\n" + " return rb_funcall(rb_ary_entry(ary, 0), idCall, 2,\n" + " rb_ary_entry(ary, 1), // INT2NUM(type),\n" + " rb_ary_entry(ary, 2)); // rb_str_new(data, data_len)\n" + "}\n" + "static int proc_debug_handler(CURL *curl,\n" + " curl_infotype type,\n" + " char *data,\n" + " size_t data_len,\n" + " VALUE proc) {\n" + " VALUE callargs = rb_ary_new2(3);\n" + " rb_ary_store(callargs, 0, proc);\n" + " rb_ary_store(callargs, 1, INT2NUM(type));\n" + " rb_ary_store(callargs, 2, rb_str_new(data, data_len));\n" + " rb_rescue(call_debug_handler, callargs, callback_exception, Qnil);\n" + " /* no way to indicate to libcurl that we should break out given an exception in the on_debug handler...\n" + " * this means exceptions will be swallowed\n" + " */\n" + " //rb_funcall(proc, idCall, 2, INT2NUM(type), rb_str_new(data, data_len));\n" + " return 0;\n" + "}\n" + "\n" + "/* ================== MARK/FREE FUNC ==================*/\n" + "void curl_easy_mark(ruby_curl_easy *rbce) {\n" + " if (!NIL_P(rbce->opts)) { rb_gc_mark(rbce->opts); }\n" + " if (!NIL_P(rbce->multi)) { rb_gc_mark(rbce->multi); }\n" + "}\n" + "\n" + "static void ruby_curl_easy_free(ruby_curl_easy *rbce) {\n" + " if (rbce->curl_headers) {\n" + " curl_slist_free_all(rbce->curl_headers);\n" + " }\n" + "\n" + " if (rbce->curl_proxy_headers) {\n" + " curl_slist_free_all(rbce->curl_proxy_headers);\n" + " }\n" + "\n" + " if (rbce->curl_ftp_commands) {\n" + " curl_slist_free_all(rbce->curl_ftp_commands);\n" + " }\n" + "\n" + " if (rbce->curl_resolve) {\n" + " curl_slist_free_all(rbce->curl_resolve);\n" + " }\n" + "\n" + " if (rbce->curl) {\n" + " /* disable any progress or debug events */\n" + " curl_easy_setopt(rbce->curl, CURLOPT_WRITEFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_WRITEDATA, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HEADERFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HEADERDATA, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_DEBUGFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_DEBUGDATA, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_VERBOSE, 0);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_PROGRESSFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_NOPROGRESS, 1);\n" + " curl_easy_cleanup(rbce->curl);\n" + " rbce->curl = NULL;\n" + " }\n" + "}\n" + "\n" + "void curl_easy_free(ruby_curl_easy *rbce) {\n" + " ruby_curl_easy_free(rbce);\n" + " free(rbce);\n" + "}\n" + "\n" + "\n" + "/* ================= ALLOC METHODS ====================*/\n" + "\n" + "static void ruby_curl_easy_zero(ruby_curl_easy *rbce) {\n" + " rbce->opts = rb_hash_new();\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " rbce->curl_headers = NULL;\n" + " rbce->curl_proxy_headers = NULL;\n" + " rbce->curl_ftp_commands = NULL;\n" + " rbce->curl_resolve = NULL;\n" + "\n" + " /* various-typed opts */\n" + " rbce->local_port = 0;\n" + " rbce->local_port_range = 0;\n" + " rbce->proxy_port = 0;\n" + " rbce->proxy_type = -1;\n" + " rbce->http_auth_types = 0;\n" + " rbce->proxy_auth_types = 0;\n" + " rbce->max_redirs = -1;\n" + " rbce->timeout = 0;\n" + " rbce->timeout_ms = 0;\n" + " rbce->connect_timeout = 0;\n" + " rbce->connect_timeout_ms = 0;\n" + " rbce->dns_cache_timeout = 60;\n" + " rbce->ftp_response_timeout = 0;\n" + " rbce->low_speed_limit = 0;\n" + " rbce->low_speed_time = 0;\n" + " rbce->max_send_speed_large = 0;\n" + " rbce->max_recv_speed_large = 0;\n" + " rbce->ssl_version = -1;\n" + " rbce->use_ssl = -1;\n" + " rbce->ftp_filemethod = -1;\n" + " rbce->resolve_mode = CURL_IPRESOLVE_WHATEVER;\n" + "\n" + " /* bool opts */\n" + " rbce->proxy_tunnel = 0;\n" + " rbce->fetch_file_time = 0;\n" + " rbce->ssl_verify_peer = 1;\n" + " rbce->ssl_verify_host = 2;\n" + " rbce->header_in_body = 0;\n" + " rbce->use_netrc = 0;\n" + " rbce->follow_location = 0;\n" + " rbce->unrestricted_auth = 0;\n" + " rbce->verbose = 0;\n" + " rbce->multipart_form_post = 0;\n" + " rbce->enable_cookies = 0;\n" + " rbce->ignore_content_length = 0;\n" + " rbce->callback_active = 0;\n" + "}\n" + "\n" + "/*\n" + " * Allocate space for a Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_allocate(VALUE klass) {\n" + " ruby_curl_easy *rbce;\n" + " rbce = ALLOC(ruby_curl_easy);\n" + " rbce->curl = NULL;\n" + " rbce->opts = Qnil;\n" + " rbce->multi = Qnil;\n" + " ruby_curl_easy_zero(rbce);\n" + " return Data_Wrap_Struct(klass, curl_easy_mark, curl_easy_free, rbce);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * Curl::Easy.new => #\n" + " * Curl::Easy.new(url = nil) => #\n" + " * Curl::Easy.new(url = nil) { |self| ... } => #\n" + " *\n" + " * Initialize a new Curl::Easy instance, optionally supplying the URL.\n" + " * The block form allows further configuration to be supplied before\n" + " * the instance is returned.\n" + " */\n" + "static VALUE ruby_curl_easy_initialize(int argc, VALUE *argv, VALUE self) {\n" + " CURLcode ecode;\n" + " VALUE url, blk;\n" + " ruby_curl_easy *rbce;\n" + "\n" + " rb_scan_args(argc, argv, \"01&\", &url, &blk);\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " /* handler */\n" + " rbce->curl = curl_easy_init();\n" + " if (!rbce->curl) {\n" + " rb_raise(eCurlErrFailedInit, \"Failed to initialize easy handle\");\n" + " }\n" + "\n" + " rbce->multi = Qnil;\n" + " rbce->opts = Qnil;\n" + "\n" + " ruby_curl_easy_zero(rbce);\n" + "\n" + " curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf);\n" + "\n" + " rb_easy_set(\"url\", url);\n" + "\n" + " /* set the pointer to the curl handle */\n" + " ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self);\n" + " if (ecode != CURLE_OK) {\n" + " raise_curl_easy_error_exception(ecode);\n" + " }\n" + "\n" + " if (blk != Qnil) {\n" + " rb_funcall(blk, idCall, 1, self);\n" + " }\n" + "\n" + " return self;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.clone => \n" + " * easy.dup => \n" + " *\n" + " * Clone this Curl::Easy instance, creating a new instance.\n" + " * This method duplicates the underlying CURL* handle.\n" + " */\n" + "static VALUE ruby_curl_easy_clone(VALUE self) {\n" + " ruby_curl_easy *rbce, *newrbce;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " newrbce = ALLOC(ruby_curl_easy);\n" + " memcpy(newrbce, rbce, sizeof(ruby_curl_easy));\n" + " newrbce->curl = curl_easy_duphandle(rbce->curl);\n" + " newrbce->curl_headers = NULL;\n" + " newrbce->curl_proxy_headers = NULL;\n" + " newrbce->curl_ftp_commands = NULL;\n" + " newrbce->curl_resolve = NULL;\n" + "\n" + " curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf);\n" + "\n" + " return Data_Wrap_Struct(cCurlEasy, curl_easy_mark, curl_easy_free, newrbce);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.close => nil\n" + " *\n" + " * Close the Curl::Easy instance. Any open connections are closed\n" + " * The easy handle is reinitialized. If a previous multi handle was\n" + " * open it is set to nil and will be cleared after a GC.\n" + " */\n" + "static VALUE ruby_curl_easy_close(VALUE self) {\n" + " CURLcode ecode;\n" + " ruby_curl_easy *rbce;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (rbce->callback_active) {\n" + " rb_raise(rb_eRuntimeError, \"Cannot close an active curl handle within a callback\");\n" + " }\n" + "\n" + " ruby_curl_easy_free(rbce);\n" + "\n" + " /* reinit the handle */\n" + " rbce->curl = curl_easy_init();\n" + " if (!rbce->curl) {\n" + " rb_raise(eCurlErrFailedInit, \"Failed to initialize easy handle\");\n" + " }\n" + "\n" + " rbce->multi = Qnil;\n" + "\n" + " ruby_curl_easy_zero(rbce);\n" + "\n" + " /* give the new curl handle a reference back to the ruby object */\n" + " ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self);\n" + " if (ecode != CURLE_OK) {\n" + " raise_curl_easy_error_exception(ecode);\n" + " }\n" + "\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.reset => Hash\n" + " *\n" + " * Reset the Curl::Easy instance, clears out all settings.\n" + " *\n" + " * from http://curl.haxx.se/libcurl/c/curl_easy_reset.html\n" + " * Re-initializes all options previously set on a specified CURL handle to the default values. This puts back the handle to the same state as it was in when it was just created with curl_easy_init(3).\n" + " * It does not change the following information kept in the handle: live connections, the Session ID cache, the DNS cache, the cookies and shares.\n" + " *\n" + " * The return value contains all settings stored.\n" + " */\n" + "static VALUE ruby_curl_easy_reset(VALUE self) {\n" + " CURLcode ecode;\n" + " ruby_curl_easy *rbce;\n" + " VALUE opts_dup;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (rbce->callback_active) {\n" + " rb_raise(rb_eRuntimeError, \"Cannot close an active curl handle within a callback\");\n" + " }\n" + "\n" + " opts_dup = rb_funcall(rbce->opts, rb_intern(\"dup\"), 0);\n" + "\n" + " curl_easy_reset(rbce->curl);\n" + " ruby_curl_easy_zero(rbce);\n" + "\n" + " curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf);\n" + "\n" + " /* reset clobbers the private setting, so reset it to self */\n" + " ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self);\n" + " if (ecode != CURLE_OK) {\n" + " raise_curl_easy_error_exception(ecode);\n" + " }\n" + "\n" + " /* Free everything up */\n" + " if (rbce->curl_headers) {\n" + " curl_slist_free_all(rbce->curl_headers);\n" + " rbce->curl_headers = NULL;\n" + " }\n" + "\n" + " /* Free everything up */\n" + " if (rbce->curl_proxy_headers) {\n" + " curl_slist_free_all(rbce->curl_proxy_headers);\n" + " rbce->curl_proxy_headers = NULL;\n" + " }\n" + "\n" + " return opts_dup;\n" + "}\n" + "\n" + "\n" + "/* ================ OBJ ATTRIBUTES ==================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.url => string\n" + " *\n" + " * Obtain the URL that will be used by subsequent calls to +perform+.\n" + " */\n" + "static VALUE ruby_curl_easy_url_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, url);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_url => string\n" + " *\n" + " * Obtain the HTTP Proxy URL that will be used by subsequent calls to +perform+.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_url_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, proxy_url);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.headers = \"Header: val\" => \"Header: val\"\n" + " * easy.headers = {\"Header\" => \"val\" ..., \"Header\" => \"val\"} => {\"Header: val\", ...}\n" + " * easy.headers = [\"Header: val\" ..., \"Header: val\"] => [\"Header: val\", ...]\n" + " *\n" + " * Set custom HTTP headers for following requests. This can be used to add\n" + " * custom headers, or override standard headers used by libcurl. It defaults to a\n" + " * Hash.\n" + " *\n" + " * For example to set a standard or custom header:\n" + " *\n" + " * easy.headers[\"MyHeader\"] = \"myval\"\n" + " *\n" + " * To remove a standard header (this is useful when removing libcurls default\n" + " * 'Expect: 100-Continue' header when using HTTP form posts):\n" + " *\n" + " * easy.headers[\"Expect\"] = ''\n" + " *\n" + " * Anything passed to libcurl as a header will be converted to a string during\n" + " * the perform step.\n" + " */\n" + "static VALUE ruby_curl_easy_headers_set(VALUE self, VALUE headers) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, headers);\n" + "}\n" + "\n" + "static VALUE ruby_curl_easy_proxy_headers_set(VALUE self, VALUE proxy_headers) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_headers);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.headers => Hash, Array or Str\n" + " *\n" + " * Obtain the custom HTTP headers for following requests.\n" + " */\n" + "static VALUE ruby_curl_easy_headers_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " VALUE headers;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " headers = rb_easy_get(\"headers\");//rb_hash_aref(rbce->opts, rb_intern(\"headers\"));\n" + " if (headers == Qnil) { headers = rb_easy_set(\"headers\", rb_hash_new()); }\n" + " return headers;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_headers = \"Header: val\" => \"Header: val\"\n" + " * easy.proxy_headers = {\"Header\" => \"val\" ..., \"Header\" => \"val\"} => {\"Header: val\", ...}\n" + " * easy.proxy_headers = [\"Header: val\" ..., \"Header: val\"] => [\"Header: val\", ...]\n" + " *\n" + " *\n" + " * For example to set a standard or custom header:\n" + " *\n" + " * easy.proxy_headers[\"MyHeader\"] = \"myval\"\n" + " *\n" + " * To remove a standard header (this is useful when removing libcurls default\n" + " * 'Expect: 100-Continue' header when using HTTP form posts):\n" + " *\n" + " * easy.proxy_headers[\"Expect\"] = ''\n" + " *\n" + " * Anything passed to libcurl as a header will be converted to a string during\n" + " * the perform step.\n" + " */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_headers => Hash, Array or Str\n" + " *\n" + " * Obtain the custom HTTP proxy_headers for following requests.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_headers_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " VALUE proxy_headers;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " proxy_headers = rb_easy_get(\"proxy_headers\");//rb_hash_aref(rbce->opts, rb_intern(\"proxy_headers\"));\n" + " if (proxy_headers == Qnil) { proxy_headers = rb_easy_set(\"proxy_headers\", rb_hash_new()); }\n" + " return proxy_headers;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.interface => string\n" + " *\n" + " * Obtain the interface name that is used as the outgoing network interface.\n" + " * The name can be an interface name, an IP address or a host name.\n" + " */\n" + "static VALUE ruby_curl_easy_interface_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, interface_hm);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.userpwd => string\n" + " *\n" + " * Obtain the username/password string that will be used for subsequent\n" + " * calls to +perform+.\n" + " */\n" + "static VALUE ruby_curl_easy_userpwd_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, userpwd);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxypwd => string\n" + " *\n" + " * Obtain the username/password string that will be used for proxy\n" + " * connection during subsequent calls to +perform+. The supplied string\n" + " * should have the form \"username:password\"\n" + " */\n" + "static VALUE ruby_curl_easy_proxypwd_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, proxypwd);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookies => \"name1=content1; name2=content2;\"\n" + " *\n" + " * Obtain the cookies for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cookies_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cookies);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookiefile => string\n" + " *\n" + " * Obtain the cookiefile file for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cookiefile_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cookiefile);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookiejar => string\n" + " *\n" + " * Obtain the cookiejar file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cookiejar_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cookiejar);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert = string => \"\"\n" + " *\n" + " * Set a cert file to use for this Curl::Easy instance. This file\n" + " * will be used to validate SSL connections.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_cert_set(VALUE self, VALUE cert) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert => string\n" + " *\n" + " * Obtain the cert file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cert_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert_key = \"cert_key.file\" => \"\"\n" + " *\n" + " * Set a cert key to use for this Curl::Easy instance. This file\n" + " * will be used to validate SSL certificates.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_cert_key_set(VALUE self, VALUE cert_key) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cert_key);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert_key => \"cert_key.file\"\n" + " *\n" + " * Obtain the cert key file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cert_key_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cert_key);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cacert = string => \"\"\n" + " *\n" + " * Set a cacert bundle to use for this Curl::Easy instance. This file\n" + " * will be used to validate SSL certificates.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_cacert_set(VALUE self, VALUE cacert) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cacert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cacert => string\n" + " *\n" + " * Obtain the cacert file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cacert_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cacert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.certpassword = string => \"\"\n" + " *\n" + " * Set a password used to open the specified cert\n" + " */\n" + "static VALUE ruby_curl_easy_certpassword_set(VALUE self, VALUE certpassword) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, certpassword);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.certtype = \"PEM|DER\" => \"\"\n" + " *\n" + " * Set a cert type to use for this Curl::Easy instance.\n" + " * Default is PEM\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_certtype_set(VALUE self, VALUE certtype) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, certtype);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.certtype => string\n" + " *\n" + " * Obtain the cert type used for this Curl::Easy instance\n" + " */\n" + "static VALUE ruby_curl_easy_certtype_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, certtype);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.encoding = string => string\n" + " *\n" + " * Set the accepted encoding types, curl will handle all of the decompression\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_encoding_set(VALUE self, VALUE encoding) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, encoding);\n" + "}\n" + "/*\n" + " * call-seq:\n" + " * easy.encoding => string\n" + " *\n" + " * Get the set encoding types\n" + " *\n" + "*/\n" + "static VALUE ruby_curl_easy_encoding_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, encoding);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.useragent = \"Ruby/Curb\" => \"\"\n" + " *\n" + " * Set the user agent string for this Curl::Easy instance\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_useragent_set(VALUE self, VALUE useragent) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, useragent);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.useragent => \"Ruby/Curb\"\n" + " *\n" + " * Obtain the user agent string used for this Curl::Easy instance\n" + " */\n" + "static VALUE ruby_curl_easy_useragent_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, useragent);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.post_body = \"some=form%20data&to=send\" => string or nil\n" + " *\n" + " * Sets the POST body of this Curl::Easy instance. This is expected to be\n" + " * URL encoded; no additional processing or encoding is done on the string.\n" + " * The content-type header will be set to application/x-www-form-urlencoded.\n" + " *\n" + " * This is handy if you want to perform a POST against a Curl::Multi instance.\n" + " */\n" + "static VALUE ruby_curl_easy_post_body_set(VALUE self, VALUE post_body) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + "\n" + " char *data;\n" + " long len;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " curl = rbce->curl;\n" + "\n" + " if ( post_body == Qnil ) {\n" + " rb_easy_del(\"postdata_buffer\");\n" + " curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);\n" + "\n" + " } else {\n" + " if (rb_type(post_body) == T_STRING) {\n" + " data = StringValuePtr(post_body);\n" + " len = RSTRING_LEN(post_body);\n" + " }\n" + " else if (rb_respond_to(post_body, rb_intern(\"to_s\"))) {\n" + " VALUE str_body = rb_funcall(post_body, rb_intern(\"to_s\"), 0);\n" + " data = StringValuePtr(str_body);\n" + " len = RSTRING_LEN(post_body);\n" + " }\n" + " else {\n" + " rb_raise(rb_eRuntimeError, \"post data must respond_to .to_s\");\n" + " }\n" + "\n" + " // Store the string, since it has to hang around for the duration of the\n" + " // request. See CURLOPT_POSTFIELDS in the libcurl docs.\n" + " //rbce->postdata_buffer = post_body;\n" + " rb_easy_set(\"postdata_buffer\", post_body);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_POST, 1);\n" + " curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);\n" + " curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, len);\n" + "\n" + " return post_body;\n" + " }\n" + "\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.post_body => string or nil\n" + " *\n" + " * Obtain the POST body used in this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_post_body_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, postdata_buffer);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.put_data = data => \"\"\n" + " *\n" + " * Points this Curl::Easy instance to data to be uploaded via PUT. This\n" + " * sets the request to a PUT type request - useful if you want to PUT via\n" + " * a multi handle.\n" + " */\n" + "static VALUE ruby_curl_easy_put_data_set(VALUE self, VALUE data) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + " VALUE upload;\n" + " VALUE headers;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " upload = ruby_curl_upload_new(cCurlUpload);\n" + " ruby_curl_upload_stream_set(upload,data);\n" + "\n" + " curl = rbce->curl;\n" + " rb_easy_set(\"upload\", upload); /* keep the upload object alive as long as\n" + " the easy handle is active or until the upload\n" + " is complete or terminated... */\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_NOBODY, 0);\n" + " curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);\n" + " curl_easy_setopt(curl, CURLOPT_READFUNCTION, (curl_read_callback)read_data_handler);\n" + "#if HAVE_CURLOPT_SEEKFUNCTION\n" + " curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, (curl_seek_callback)seek_data_handler);\n" + "#endif\n" + " curl_easy_setopt(curl, CURLOPT_READDATA, rbce);\n" + "#if HAVE_CURLOPT_SEEKDATA\n" + " curl_easy_setopt(curl, CURLOPT_SEEKDATA, rbce);\n" + "#endif\n" + "\n" + " /*\n" + " * we need to set specific headers for the PUT to work... so\n" + " * convert the internal headers structure to a HASH if one is set\n" + " */\n" + " if (!rb_easy_nil(\"headers\")) {\n" + " if (rb_easy_type_check(\"headers\", T_ARRAY) || rb_easy_type_check(\"headers\", T_STRING)) {\n" + " rb_raise(rb_eRuntimeError, \"Must set headers as a HASH to modify the headers in an PUT request\");\n" + " }\n" + " }\n" + "\n" + " // exit fast if the payload is empty\n" + " if (NIL_P(data)) { return data; }\n" + "\n" + " headers = rb_easy_get(\"headers\");\n" + " if( headers == Qnil ) {\n" + " headers = rb_hash_new();\n" + " }\n" + "\n" + " if (rb_respond_to(data, rb_intern(\"read\"))) {\n" + " VALUE stat = rb_funcall(data, rb_intern(\"stat\"), 0);\n" + " if( stat && rb_hash_aref(headers, rb_str_new2(\"Content-Length\")) == Qnil) {\n" + " VALUE size;\n" + " if( rb_hash_aref(headers, rb_str_new2(\"Expect\")) == Qnil ) {\n" + " rb_hash_aset(headers, rb_str_new2(\"Expect\"), rb_str_new2(\"\"));\n" + " }\n" + " size = rb_funcall(stat, rb_intern(\"size\"), 0);\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, NUM2LONG(size));\n" + " }\n" + " else if( rb_hash_aref(headers, rb_str_new2(\"Content-Length\")) == Qnil && rb_hash_aref(headers, rb_str_new2(\"Transfer-Encoding\")) == Qnil ) {\n" + " rb_hash_aset(headers, rb_str_new2(\"Transfer-Encoding\"), rb_str_new2(\"chunked\"));\n" + " }\n" + " else if( rb_hash_aref(headers, rb_str_new2(\"Content-Length\")) ) {\n" + " VALUE size = rb_funcall(rb_hash_aref(headers, rb_str_new2(\"Content-Length\")), rb_intern(\"to_i\"), 0);\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, NUM2LONG(size));\n" + " }\n" + " }\n" + " else if (rb_respond_to(data, rb_intern(\"to_s\"))) {\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, RSTRING_LEN(data));\n" + " if( rb_hash_aref(headers, rb_str_new2(\"Expect\")) == Qnil ) {\n" + " rb_hash_aset(headers, rb_str_new2(\"Expect\"), rb_str_new2(\"\"));\n" + " }\n" + " }\n" + " else {\n" + " rb_raise(rb_eRuntimeError, \"PUT data must respond to read or to_s\");\n" + " }\n" + " rb_easy_set(\"headers\",headers);\n" + "\n" + " // if we made it this far, all should be well.\n" + " return data;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_commands = [\"CWD /\", \"MKD directory\"] => [\"CWD /\", ...]\n" + " *\n" + " * Explicitly sets the list of commands to execute on the FTP server when calling perform\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_commands_set(VALUE self, VALUE ftp_commands) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, ftp_commands);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_commands => array or nil\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_commands_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, ftp_commands);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve = [ \"example.com:80:127.0.0.1\" ] => [ \"example.com:80:127.0.0.1\" ]\n" + " *\n" + " * Set the resolve list to statically resolve hostnames to IP addresses,\n" + " * bypassing DNS for matching hostname/port combinations.\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_set(VALUE self, VALUE resolve) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, resolve);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve => array or nil\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, resolve);\n" + "}\n" + "\n" + "/* ================== IMMED ATTRS ==================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the local port that will be used for the following +perform+ calls.\n" + " *\n" + " * Passing +nil+ will return to the default behaviour (no local port\n" + " * preference).\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_set(VALUE self, VALUE local_port) {\n" + " CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port, \"port\");\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port => fixnum or nil\n" + " *\n" + " * Obtain the local port that will be used for the following +perform+ calls.\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_get(VALUE self) {\n" + " CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port_range = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the local port range that will be used for the following +perform+\n" + " * calls. This is a number (between 0 and 65535) that determines how far\n" + " * libcurl may deviate from the supplied +local_port+ in order to find\n" + " * an available port.\n" + " *\n" + " * If you set +local_port+ it's also recommended that you set this, since\n" + " * it is fairly likely that your specified port will be unavailable.\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_range_set(VALUE self, VALUE local_port_range) {\n" + " CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port_range, \"port range\");\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port_range => fixnum or nil\n" + " *\n" + " * Obtain the local port range that will be used for the following +perform+\n" + " * calls.\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_range_get(VALUE self) {\n" + " CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port_range);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_port = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the proxy port that will be used for the following +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_port_set(VALUE self, VALUE proxy_port) {\n" + " CURB_IMMED_PORT_SETTER(ruby_curl_easy, proxy_port, \"port\");\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_port => fixnum or nil\n" + " *\n" + " * Obtain the proxy port that will be used for the following +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_port_get(VALUE self) {\n" + " CURB_IMMED_PORT_GETTER(ruby_curl_easy, proxy_port);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_type = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the proxy type that will be used for the following +perform+ calls.\n" + " * This should be one of the Curl::CURLPROXY constants.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_type_set(VALUE self, VALUE proxy_type) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, proxy_type, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_type => fixnum or nil\n" + " *\n" + " * Obtain the proxy type that will be used for the following +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_type_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, proxy_type, -1);\n" + "}\n" + "\n" + "#if defined(HAVE_CURLAUTH_DIGEST_IE)\n" + "#define CURL_HTTPAUTH_STR_TO_NUM(node) \\\n" + " (!strncmp(\"basic\",node,5)) ? CURLAUTH_BASIC : \\\n" + " (!strncmp(\"digest_ie\",node,9)) ? CURLAUTH_DIGEST_IE : \\\n" + " (!strncmp(\"digest\",node,6)) ? CURLAUTH_DIGEST : \\\n" + " (!strncmp(\"gssnegotiate\",node,12)) ? CURLAUTH_GSSNEGOTIATE : \\\n" + " (!strncmp(\"ntlm\",node,4)) ? CURLAUTH_NTLM : \\\n" + " (!strncmp(\"anysafe\",node,7)) ? CURLAUTH_ANYSAFE : \\\n" + " (!strncmp(\"any\",node,3)) ? CURLAUTH_ANY : 0\n" + "#else\n" + "#define CURL_HTTPAUTH_STR_TO_NUM(node) \\\n" + " (!strncmp(\"basic\",node,5)) ? CURLAUTH_BASIC : \\\n" + " (!strncmp(\"digest\",node,6)) ? CURLAUTH_DIGEST : \\\n" + " (!strncmp(\"gssnegotiate\",node,12)) ? CURLAUTH_GSSNEGOTIATE : \\\n" + " (!strncmp(\"ntlm\",node,4)) ? CURLAUTH_NTLM : \\\n" + " (!strncmp(\"anysafe\",node,7)) ? CURLAUTH_ANYSAFE : \\\n" + " (!strncmp(\"any\",node,3)) ? CURLAUTH_ANY : 0\n" + "#endif\n" + "/*\n" + " * call-seq:\n" + " * easy.http_auth_types = fixnum or nil => fixnum or nil\n" + " * easy.http_auth_types = [:basic,:digest,:digest_ie,:gssnegotiate, :ntlm, :any, :anysafe]\n" + " *\n" + " * Set the HTTP authentication types that may be used for the following\n" + " * +perform+ calls. This is a bitmap made by ORing together the\n" + " * Curl::CURLAUTH constants.\n" + " */\n" + "static VALUE ruby_curl_easy_http_auth_types_set(int argc, VALUE *argv, VALUE self) {//VALUE self, VALUE http_auth_types) {\n" + " ruby_curl_easy *rbce;\n" + " VALUE args_ary;\n" + " long i, len;\n" + " char* node = NULL;\n" + " long mask = 0;\n" + "\n" + " rb_scan_args(argc, argv, \"*\", &args_ary);\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " len = RARRAY_LEN(args_ary);\n" + "\n" + " if (len == 1 && (rb_ary_entry(args_ary,0) == Qnil || TYPE(rb_ary_entry(args_ary,0)) == T_FIXNUM ||\n" + " TYPE(rb_ary_entry(args_ary,0)) == T_BIGNUM)) {\n" + " if (rb_ary_entry(args_ary,0) == Qnil) {\n" + " rbce->http_auth_types = 0;\n" + " }\n" + " else {\n" + " rbce->http_auth_types = NUM2LONG(rb_ary_entry(args_ary,0));\n" + " }\n" + " }\n" + " else {\n" + " // we could have multiple values, but they should be symbols\n" + " node = RSTRING_PTR(rb_funcall(rb_ary_entry(args_ary,0),rb_intern(\"to_s\"),0));\n" + " mask = CURL_HTTPAUTH_STR_TO_NUM(node);\n" + " for( i = 1; i < len; ++i ) {\n" + " node = RSTRING_PTR(rb_funcall(rb_ary_entry(args_ary,i),rb_intern(\"to_s\"),0));\n" + " mask |= CURL_HTTPAUTH_STR_TO_NUM(node);\n" + " }\n" + " rbce->http_auth_types = mask;\n" + " }\n" + " return LONG2NUM(rbce->http_auth_types);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_auth_types => fixnum or nil\n" + " *\n" + " * Obtain the HTTP authentication types that may be used for the following\n" + " * +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_http_auth_types_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, http_auth_types, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_auth_types = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the proxy authentication types that may be used for the following\n" + " * +perform+ calls. This is a bitmap made by ORing together the\n" + " * Curl::CURLAUTH constants.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_auth_types_set(VALUE self, VALUE proxy_auth_types) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, proxy_auth_types, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_auth_types => fixnum or nil\n" + " *\n" + " * Obtain the proxy authentication types that may be used for the following\n" + " * +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_auth_types_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, proxy_auth_types, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_redirects = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum number of redirections to follow in the following +perform+\n" + " * calls. Set to nil or -1 allow an infinite number (the default). Setting this\n" + " * option only makes sense if +follow_location+ is also set true.\n" + " *\n" + " * With libcurl >= 7.15.1, setting this to 0 will cause libcurl to refuse any\n" + " * redirect.\n" + " */\n" + "static VALUE ruby_curl_easy_max_redirects_set(VALUE self, VALUE max_redirs) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, max_redirs, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_redirects => fixnum or nil\n" + " *\n" + " * Obtain the maximum number of redirections to follow in the following\n" + " * +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_max_redirects_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, max_redirs, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout = float, fixnum or nil => numeric\n" + " *\n" + " * Set the maximum time in seconds that you allow the libcurl transfer\n" + " * operation to take. Normally, name lookups can take a considerable time\n" + " * and limiting operations to less than a few minutes risk aborting\n" + " * perfectly normal operations.\n" + " *\n" + " * Set to nil (or zero) to disable timeout (it will then only timeout\n" + " * on the system's internal timeouts).\n" + " *\n" + " * Uses timeout_ms internally instead of timeout because it allows for\n" + " * better precision and libcurl will use the last set value when both\n" + " * timeout and timeout_ms are set.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_set(VALUE self, VALUE timeout_s) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (Qnil == timeout_s || NUM2DBL(timeout_s) <= 0.0) {\n" + " rbce->timeout_ms = 0;\n" + " } else {\n" + " rbce->timeout_ms = (unsigned long)(NUM2DBL(timeout_s) * 1000);\n" + " }\n" + "\n" + " return DBL2NUM(rbce->timeout_ms / 1000.0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout => numeric\n" + " *\n" + " * Obtain the maximum time in seconds that you allow the libcurl transfer\n" + " * operation to take.\n" + " *\n" + " * Uses timeout_ms internally instead of timeout.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return DBL2NUM(rbce->timeout_ms / 1000.0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout_ms = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum time in milliseconds that you allow the libcurl transfer\n" + " * operation to take. Normally, name lookups can take a considerable time\n" + " * and limiting operations to less than a few minutes risk aborting\n" + " * perfectly normal operations.\n" + " *\n" + " * Set to nil (or zero) to disable timeout (it will then only timeout\n" + " * on the system's internal timeouts).\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_ms_set(VALUE self, VALUE timeout_ms) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (Qnil == timeout_ms || NUM2DBL(timeout_ms) <= 0.0) {\n" + " rbce->timeout_ms = 0;\n" + " } else {\n" + " rbce->timeout_ms = NUM2ULONG(timeout_ms);\n" + " }\n" + "\n" + " return ULONG2NUM(rbce->timeout_ms);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout_ms => fixnum or nil\n" + " *\n" + " * Obtain the maximum time in milliseconds that you allow the libcurl transfer\n" + " * operation to take.\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_ms_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return LONG2NUM(rbce->timeout_ms);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum time in seconds that you allow the connection to the\n" + " * server to take. This only limits the connection phase, once it has\n" + " * connected, this option is of no more use.\n" + " *\n" + " * Set to nil (or zero) to disable connection timeout (it will then only\n" + " * timeout on the system's internal timeouts).\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_set(VALUE self, VALUE connect_timeout) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout => fixnum or nil\n" + " *\n" + " * Obtain the maximum time in seconds that you allow the connection to the\n" + " * server to take.\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout_ms = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum time in milliseconds that you allow the connection to the\n" + " * server to take. This only limits the connection phase, once it has\n" + " * connected, this option is of no more use.\n" + " *\n" + " * Set to nil (or zero) to disable connection timeout (it will then only\n" + " * timeout on the system's internal timeouts).\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_ms_set(VALUE self, VALUE connect_timeout_ms) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout_ms, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout_ms => fixnum or nil\n" + " *\n" + " * Obtain the maximum time in milliseconds that you allow the connection to the\n" + " * server to take.\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_ms_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout_ms, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.dns_cache_timeout = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the dns cache timeout in seconds. Name resolves will be kept in\n" + " * memory for this number of seconds. Set to zero (0) to completely disable\n" + " * caching, or set to nil (or -1) to make the cached entries remain forever.\n" + " * By default, libcurl caches this info for 60 seconds.\n" + " */\n" + "static VALUE ruby_curl_easy_dns_cache_timeout_set(VALUE self, VALUE dns_cache_timeout) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, dns_cache_timeout, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.dns_cache_timeout => fixnum or nil\n" + " *\n" + " * Obtain the dns cache timeout in seconds.\n" + " */\n" + "static VALUE ruby_curl_easy_dns_cache_timeout_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, dns_cache_timeout, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_response_timeout = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set a timeout period (in seconds) on the amount of time that the server\n" + " * is allowed to take in order to generate a response message for a command\n" + " * before the session is considered hung. While curl is waiting for a\n" + " * response, this value overrides +timeout+. It is recommended that if used\n" + " * in conjunction with +timeout+, you set +ftp_response_timeout+ to a value\n" + " * smaller than +timeout+.\n" + " *\n" + " * Ignored if libcurl version is < 7.10.8.\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_response_timeout_set(VALUE self, VALUE ftp_response_timeout) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ftp_response_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_response_timeout => fixnum or nil\n" + " *\n" + " * Obtain the maximum time that libcurl will wait for FTP command responses.\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_response_timeout_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ftp_response_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_limit = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the transfer speed (in bytes per second) that the transfer should be\n" + " * below during +low_speed_time+ seconds for the library to consider it too\n" + " * slow and abort.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_limit_set(VALUE self, VALUE low_speed_limit) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, low_speed_limit, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_limit => fixnum or nil\n" + " *\n" + " * Obtain the minimum transfer speed over +low_speed+time+ below which the\n" + " * transfer will be aborted.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_limit_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, low_speed_limit, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_time = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the time (in seconds) that the transfer should be below the\n" + " * +low_speed_limit+ for the library to consider it too slow and abort.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_time_set(VALUE self, VALUE low_speed_time) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, low_speed_time, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_time => fixnum or nil\n" + " *\n" + " * Obtain the time that the transfer should be below +low_speed_limit+ for\n" + " * the library to abort it.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_time_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, low_speed_time, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_send_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximal sending transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_send_speed_large_set(VALUE self, VALUE max_send_speed_large) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, max_send_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_send_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Get the maximal sending transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_send_speed_large_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, max_send_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_recv_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximal receiving transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_recv_speed_large_set(VALUE self, VALUE max_recv_speed_large) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, max_recv_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_recv_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Get the maximal receiving transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_recv_speed_large_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, max_recv_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.username = string => string\n" + " *\n" + " * Set the HTTP Authentication username.\n" + " */\n" + "static VALUE ruby_curl_easy_username_set(VALUE self, VALUE username) {\n" + "#if HAVE_CURLOPT_USERNAME\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, username);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.username => string\n" + " *\n" + " * Get the current username\n" + " */\n" + "static VALUE ruby_curl_easy_username_get(VALUE self) {\n" + "#if HAVE_CURLOPT_USERNAME\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, username);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.password = string => string\n" + " *\n" + " * Set the HTTP Authentication password.\n" + " */\n" + "static VALUE ruby_curl_easy_password_set(VALUE self, VALUE password) {\n" + "#if HAVE_CURLOPT_PASSWORD\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, password);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.password => string\n" + " *\n" + " * Get the current password\n" + " */\n" + "static VALUE ruby_curl_easy_password_get(VALUE self) {\n" + "#if HAVE_CURLOPT_PASSWORD\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, password);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_version = value => fixnum or nil\n" + " *\n" + " * Sets the version of SSL/TLS that libcurl will attempt to use. Valid\n" + " * options are:\n" + " *\n" + " * Curl::CURL_SSLVERSION_DEFAULT\n" + " * Curl::CURL_SSLVERSION_TLSv1 (TLS 1.x)\n" + " * Curl::CURL_SSLVERSION_SSLv2\n" + " * Curl::CURL_SSLVERSION_SSLv3\n" + " * Curl::CURL_SSLVERSION_TLSv1_0\n" + " * Curl::CURL_SSLVERSION_TLSv1_1\n" + " * Curl::CURL_SSLVERSION_TLSv1_2\n" + " * Curl::CURL_SSLVERSION_TLSv1_3\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_version_set(VALUE self, VALUE ssl_version) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ssl_version, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_version => fixnum\n" + " *\n" + " * Get the version of SSL/TLS that libcurl will attempt to use.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_version_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ssl_version, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_ssl = value => fixnum or nil\n" + " *\n" + " * Ensure libcurl uses SSL for FTP connections. Valid options are Curl::CURL_USESSL_NONE,\n" + " * Curl::CURL_USESSL_TRY, Curl::CURL_USESSL_CONTROL, and Curl::CURL_USESSL_ALL.\n" + " */\n" + "static VALUE ruby_curl_easy_use_ssl_set(VALUE self, VALUE use_ssl) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, use_ssl, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_ssl => fixnum\n" + " *\n" + " * Get the desired level for using SSL on FTP connections.\n" + " */\n" + "static VALUE ruby_curl_easy_use_ssl_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, use_ssl, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_filemethod = value => fixnum or nil\n" + " *\n" + " * Controls how libcurl reaches files on the server. Valid options are Curl::CURL_MULTICWD,\n" + " * Curl::CURL_NOCWD, and Curl::CURL_SINGLECWD (see libcurl docs for CURLOPT_FTP_METHOD).\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_filemethod_set(VALUE self, VALUE ftp_filemethod) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ftp_filemethod, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_filemethod => fixnum\n" + " *\n" + " * Get the configuration for how libcurl will reach files on the server.\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_filemethod_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ftp_filemethod, -1);\n" + "}\n" + "\n" + "/* ================== BOOL ATTRS ===================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_tunnel = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will use proxy tunneling.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_tunnel_set(VALUE self, VALUE proxy_tunnel) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, proxy_tunnel);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_tunnel? => boolean\n" + " *\n" + " * Determine whether this Curl instance will use proxy tunneling.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_tunnel_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, proxy_tunnel);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.fetch_file_time = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will fetch remote file\n" + " * times, if available.\n" + " */\n" + "static VALUE ruby_curl_easy_fetch_file_time_set(VALUE self, VALUE fetch_file_time) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, fetch_file_time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.fetch_file_time? => boolean\n" + " *\n" + " * Determine whether this Curl instance will fetch remote file\n" + " * times, if available.\n" + " */\n" + "static VALUE ruby_curl_easy_fetch_file_time_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, fetch_file_time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_peer = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will verify the SSL peer\n" + " * certificate. When true (the default), and the verification fails to\n" + " * prove that the certificate is authentic, the connection fails. When\n" + " * false, the connection succeeds regardless.\n" + " *\n" + " * Authenticating the certificate is not by itself very useful. You\n" + " * typically want to ensure that the server, as authentically identified\n" + " * by its certificate, is the server you mean to be talking to.\n" + " * The ssl_verify_host? options controls that.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_peer_set(VALUE self, VALUE ssl_verify_peer) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, ssl_verify_peer);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_peer? => boolean\n" + " *\n" + " * Determine whether this Curl instance will verify the SSL peer\n" + " * certificate.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_peer_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, ssl_verify_peer);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_host = [0, 1, 2] => [0, 1, 2]\n" + " *\n" + " * Configure whether this Curl instance will verify that the server cert\n" + " * is for the server it is known as. When true (the default) the server\n" + " * certificate must indicate that the server is the server to which you\n" + " * meant to connect, or the connection fails. When false, the connection\n" + " * will succeed regardless of the names in the certificate.\n" + " *\n" + " * this option controls is of the identity that the server claims.\n" + " * The server could be lying. To control lying, see ssl_verify_peer? .\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_host_set(VALUE self, VALUE ssl_verify_host) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ssl_verify_host, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_host => number\n" + " *\n" + " * Determine whether this Curl instance will verify that the server cert\n" + " * is for the server it is known as.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_host_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ssl_verify_host, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_in_body = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will return HTTP headers\n" + " * combined with body data. If this option is set true, both header\n" + " * and body data will go to +body_str+ (or the configured +on_body+ handler).\n" + " */\n" + "static VALUE ruby_curl_easy_header_in_body_set(VALUE self, VALUE header_in_body) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, header_in_body);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_in_body? => boolean\n" + " *\n" + " * Determine whether this Curl instance will return HTTP headers\n" + " * combined with body data.\n" + " */\n" + "static VALUE ruby_curl_easy_header_in_body_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, header_in_body);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_netrc = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will use data from the user's\n" + " * .netrc file for FTP connections.\n" + " */\n" + "static VALUE ruby_curl_easy_use_netrc_set(VALUE self, VALUE use_netrc) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, use_netrc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_netrc? => boolean\n" + " *\n" + " * Determine whether this Curl instance will use data from the user's\n" + " * .netrc file for FTP connections.\n" + " */\n" + "static VALUE ruby_curl_easy_use_netrc_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, use_netrc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " *\n" + " * easy = Curl::Easy.new\n" + " * easy.autoreferer=true\n" + " */\n" + "static VALUE ruby_curl_easy_autoreferer_set(VALUE self, VALUE autoreferer) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (Qtrue == autoreferer) {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_AUTOREFERER, 1);\n" + " }\n" + " else {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_AUTOREFERER, 0);\n" + " }\n" + "\n" + " return autoreferer;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.follow_location? => boolean\n" + " *\n" + " * Determine whether this Curl instance will follow Location: headers\n" + " * in HTTP responses.\n" + " */\n" + "static VALUE ruby_curl_easy_follow_location_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, follow_location);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.unrestricted_auth = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance may use any HTTP authentication\n" + " * method available when necessary.\n" + " */\n" + "static VALUE ruby_curl_easy_unrestricted_auth_set(VALUE self, VALUE unrestricted_auth) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, unrestricted_auth);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.unrestricted_auth? => boolean\n" + " *\n" + " * Determine whether this Curl instance may use any HTTP authentication\n" + " * method available when necessary.\n" + " */\n" + "static VALUE ruby_curl_easy_unrestricted_auth_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, unrestricted_auth);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.verbose = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance gives verbose output to STDERR\n" + " * during transfers. Ignored if this instance has an on_debug handler.\n" + " */\n" + "static VALUE ruby_curl_easy_verbose_set(VALUE self, VALUE verbose) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, verbose);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.verbose? => boolean\n" + " *\n" + " * Determine whether this Curl instance gives verbose output to STDERR\n" + " * during transfers.\n" + " */\n" + "static VALUE ruby_curl_easy_verbose_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, verbose);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multipart_form_post = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance uses multipart/formdata content\n" + " * type for HTTP POST requests. If this is false (the default), then the\n" + " * application/x-www-form-urlencoded content type is used for the form\n" + " * data.\n" + " *\n" + " * If this is set true, you must pass one or more PostField instances\n" + " * to the http_post method - no support for posting multipart forms from\n" + " * a string is provided.\n" + " */\n" + "static VALUE ruby_curl_easy_multipart_form_post_set(VALUE self, VALUE multipart_form_post)\n" + "{\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, multipart_form_post);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multipart_form_post? => boolean\n" + " *\n" + " * Determine whether this Curl instance uses multipart/formdata content\n" + " * type for HTTP POST requests.\n" + " */\n" + "static VALUE ruby_curl_easy_multipart_form_post_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, multipart_form_post);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.enable_cookies = boolean => boolean\n" + " *\n" + " * Configure whether the libcurl cookie engine is enabled for this Curl::Easy\n" + " * instance.\n" + " */\n" + "static VALUE ruby_curl_easy_enable_cookies_set(VALUE self, VALUE enable_cookies)\n" + "{\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, enable_cookies);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.enable_cookies? => boolean\n" + " *\n" + " * Determine whether the libcurl cookie engine is enabled for this\n" + " * Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_enable_cookies_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, enable_cookies);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ignore_content_length = boolean\n" + " *\n" + " * Configure whether this Curl::Easy instance should ignore the content\n" + " * length header.\n" + " */\n" + "static VALUE ruby_curl_easy_ignore_content_length_set(VALUE self, VALUE ignore_content_length)\n" + "{\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, ignore_content_length);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ignore_content_length? => boolean\n" + " *\n" + " * Determine whether this Curl::Easy instance ignores the content\n" + " * length header.\n" + " */\n" + "static VALUE ruby_curl_easy_ignore_content_length_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, ignore_content_length);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve_mode => symbol\n" + " *\n" + " * Determines what type of IP address this Curl::Easy instance\n" + " * resolves DNS names to.\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_mode(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " unsigned short rm;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " rm = rbce->resolve_mode;\n" + "\n" + " switch(rm) {\n" + " case CURL_IPRESOLVE_V4:\n" + " return rb_easy_sym(\"ipv4\");\n" + " case CURL_IPRESOLVE_V6:\n" + " return rb_easy_sym(\"ipv6\");\n" + " default:\n" + " return rb_easy_sym(\"auto\");\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve_mode = symbol => symbol\n" + " *\n" + " * Configures what type of IP address this Curl::Easy instance\n" + " * resolves DNS names to. Valid options are:\n" + " *\n" + " * [:auto] resolves DNS names to all IP versions your system allows\n" + " * [:ipv4] resolves DNS names to IPv4 only\n" + " * [:ipv6] resolves DNS names to IPv6 only\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_mode_set(VALUE self, VALUE resolve_mode) {\n" + " if (TYPE(resolve_mode) != T_SYMBOL) {\n" + " rb_raise(rb_eTypeError, \"Must pass a symbol\");\n" + " return Qnil;\n" + " } else {\n" + " ruby_curl_easy *rbce;\n" + " ID resolve_mode_id;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " resolve_mode_id = rb_to_id(resolve_mode);\n" + "\n" + " if (resolve_mode_id == rb_intern(\"auto\")) {\n" + " rbce->resolve_mode = CURL_IPRESOLVE_WHATEVER;\n" + " return resolve_mode;\n" + " } else if (resolve_mode_id == rb_intern(\"ipv4\")) {\n" + " rbce->resolve_mode = CURL_IPRESOLVE_V4;\n" + " return resolve_mode;\n" + " } else if (resolve_mode_id == rb_intern(\"ipv6\")) {\n" + " rbce->resolve_mode = CURL_IPRESOLVE_V6;\n" + " return resolve_mode;\n" + " } else {\n" + " rb_raise(rb_eArgError, \"Must set to one of :auto, :ipv4, :ipv6\");\n" + " return Qnil;\n" + " }\n" + " }\n" + "}\n" + "\n" + "\n" + "/* ================= EVENT PROCS ================== */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_body { |body_data| ... } => \n" + " *\n" + " * Assign or remove the +on_body+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_body+ handler is called for each chunk of response body passed back\n" + " * by libcurl during +perform+. It should perform any processing necessary,\n" + " * and return the actual number of bytes handled. Normally, this will\n" + " * equal the length of the data string, and CURL will continue processing.\n" + " * If the returned length does not equal the input length, CURL will abort\n" + " * the processing with a Curl::Err::AbortedByCallbackError.\n" + " */\n" + "static VALUE ruby_curl_easy_on_body_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, body_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_success { |easy| ... } => \n" + " *\n" + " * Assign or remove the +on_success+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_success+ handler is called when the request is finished with a\n" + " * status of 20x\n" + " */\n" + "static VALUE ruby_curl_easy_on_success_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, success_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_failure {|easy,code| ... } => \n" + " *\n" + " * Assign or remove the +on_failure+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_failure+ handler is called when the request is finished with a\n" + " * status of 50x\n" + " */\n" + "static VALUE ruby_curl_easy_on_failure_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, failure_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_missing {|easy,code| ... } => \n" + " *\n" + " * Assign or remove the on_missing handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no attached\n" + " * block.\n" + " *\n" + " * The +on_missing+ handler is called when request is finished with a\n" + " * status of 40x\n" + " */\n" + "static VALUE ruby_curl_easy_on_missing_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, missing_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_redirect {|easy,code| ... } => \n" + " *\n" + " * Assign or remove the on_redirect handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no attached\n" + " * block.\n" + " *\n" + " * The +on_redirect+ handler is called when request is finished with a\n" + " * status of 30x\n" + " */\n" + "static VALUE ruby_curl_easy_on_redirect_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, redirect_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_complete {|easy| ... } => \n" + " *\n" + " * Assign or remove the +on_complete+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_complete+ handler is called when the request is finished.\n" + " */\n" + "static VALUE ruby_curl_easy_on_complete_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, complete_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_header { |header_data| ... } => \n" + " *\n" + " * Assign or remove the +on_header+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_header+ handler is called for each chunk of response header passed\n" + " * back by libcurl during +perform+. The semantics are the same as for the\n" + " * block supplied to +on_body+.\n" + " */\n" + "static VALUE ruby_curl_easy_on_header_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, header_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_progress { |dl_total, dl_now, ul_total, ul_now| ... } => \n" + " *\n" + " * Assign or remove the +on_progress+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_progress+ handler is called regularly by libcurl (approximately once\n" + " * per second) during transfers to allow the application to receive progress\n" + " * information. There is no guarantee that the reported progress will change\n" + " * between calls.\n" + " *\n" + " * The result of the block call determines whether libcurl continues the transfer.\n" + " * Returning a non-true value (i.e. nil or false) will cause the transfer to abort,\n" + " * throwing a Curl::Err::AbortedByCallbackError.\n" + " */\n" + "static VALUE ruby_curl_easy_on_progress_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, progress_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_debug { |type, data| ... } => \n" + " *\n" + " * Assign or remove the +on_debug+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_debug+ handler, if configured, will receive detailed information\n" + " * from libcurl during the perform call. This can be useful for debugging.\n" + " * Setting a debug handler overrides libcurl's internal handler, disabling\n" + " * any output from +verbose+, if set.\n" + " *\n" + " * The type argument will match one of the Curl::Easy::CURLINFO_XXXX\n" + " * constants, and specifies the kind of information contained in the\n" + " * data. The data is passed as a String.\n" + " */\n" + "static VALUE ruby_curl_easy_on_debug_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, debug_proc);\n" + "}\n" + "\n" + "\n" + "/* =================== PERFORM =====================*/\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up http headers.\n" + " */\n" + "static VALUE cb_each_http_header(VALUE header, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE header_str = Qnil;\n" + "\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " //rb_p(header);\n" + "\n" + " if (rb_type(header) == T_ARRAY) {\n" + " // we're processing a hash, header is [name, val]\n" + " VALUE name, value;\n" + "\n" + " name = rb_obj_as_string(rb_ary_entry(header, 0));\n" + " value = rb_obj_as_string(rb_ary_entry(header, 1));\n" + " if (rb_str_strlen(value) == 0) { // removing the header e.g. Accept: with nothing trailing should remove it see: https://curl.se/libcurl/c/CURLOPT_HTTPHEADER.html\n" + " header_str = rb_str_plus(name, rb_str_new2(\":\"));\n" + " } else {\n" + " // This is a bit inefficient, but we don't want to be modifying\n" + " // the actual values in the original hash.\n" + " header_str = rb_str_plus(name, rb_str_new2(\": \"));\n" + " header_str = rb_str_plus(header_str, value);\n" + " }\n" + " } else {\n" + " header_str = rb_obj_as_string(header);\n" + " }\n" + "\n" + " //rb_p(header_str);\n" + "\n" + " *list = curl_slist_append(*list, StringValuePtr(header_str));\n" + " return header_str;\n" + "}\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up http proxy headers.\n" + " */\n" + "static VALUE cb_each_http_proxy_header(VALUE proxy_header, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE proxy_header_str = Qnil;\n" + "\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " //rb_p(proxy_header);\n" + "\n" + " if (rb_type(proxy_header) == T_ARRAY) {\n" + " // we're processing a hash, proxy header is [name, val]\n" + " VALUE name, value;\n" + "\n" + " name = rb_obj_as_string(rb_ary_entry(proxy_header, 0));\n" + " value = rb_obj_as_string(rb_ary_entry(proxy_header, 1));\n" + "\n" + " // This is a bit inefficient, but we don't want to be modifying\n" + " // the actual values in the original hash.\n" + " proxy_header_str = rb_str_plus(name, rb_str_new2(\": \"));\n" + " proxy_header_str = rb_str_plus(proxy_header_str, value);\n" + " } else {\n" + " proxy_header_str = rb_obj_as_string(proxy_header);\n" + " }\n" + "\n" + " //rb_p(header_str);\n" + "\n" + " *list = curl_slist_append(*list, StringValuePtr(proxy_header_str));\n" + " return proxy_header_str;\n" + "}\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up ftp commands.\n" + " */\n" + "static VALUE cb_each_ftp_command(VALUE ftp_command, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE ftp_command_string;\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " ftp_command_string = rb_obj_as_string(ftp_command);\n" + " *list = curl_slist_append(*list, StringValuePtr(ftp_command));\n" + "\n" + " return ftp_command_string;\n" + "}\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up the resolve list.\n" + " */\n" + "static VALUE cb_each_resolve(VALUE resolve, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE resolve_string;\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " resolve_string = rb_obj_as_string(resolve);\n" + " *list = curl_slist_append(*list, StringValuePtr(resolve));\n" + "\n" + " return resolve_string;\n" + "}\n" + "\n" + "/***********************************************\n" + " *\n" + " * Setup a connection\n" + " *\n" + " * Always returns Qtrue, rb_raise on error.\n" + " */\n" + "VALUE ruby_curl_easy_setup(ruby_curl_easy *rbce) {\n" + " // TODO this could do with a bit of refactoring...\n" + " CURL *curl;\n" + " VALUE url, _url = rb_easy_get(\"url\");\n" + " struct curl_slist **hdrs = &(rbce->curl_headers);\n" + " struct curl_slist **phdrs = &(rbce->curl_proxy_headers);\n" + " struct curl_slist **cmds = &(rbce->curl_ftp_commands);\n" + " struct curl_slist **rslv = &(rbce->curl_resolve);\n" + "\n" + " curl = rbce->curl;\n" + "\n" + " if (_url == Qnil) {\n" + " rb_raise(eCurlErrError, \"No URL supplied\");\n" + " }\n" + "\n" + " url = rb_check_string_type(_url);\n" + " curl_easy_setopt(curl, CURLOPT_URL, StringValuePtr(url));\n" + "\n" + " // network stuff and auth\n" + " if (!rb_easy_nil(\"interface_hm\")) {\n" + " curl_easy_setopt(curl, CURLOPT_INTERFACE, rb_easy_get_str(\"interface_hm\"));\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_INTERFACE, NULL);\n" + " }\n" + "\n" + "#if HAVE_CURLOPT_USERNAME == 1 && HAVE_CURLOPT_PASSWORD == 1\n" + " if (!rb_easy_nil(\"username\")) {\n" + " curl_easy_setopt(curl, CURLOPT_USERNAME, rb_easy_get_str(\"username\"));\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_USERNAME, NULL);\n" + " }\n" + " if (!rb_easy_nil(\"password\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PASSWORD, rb_easy_get_str(\"password\"));\n" + " }\n" + " else {\n" + " curl_easy_setopt(curl, CURLOPT_PASSWORD, NULL);\n" + " }\n" + "#endif\n" + "\n" + " if (!rb_easy_nil(\"userpwd\")) {\n" + " curl_easy_setopt(curl, CURLOPT_USERPWD, rb_easy_get_str(\"userpwd\"));\n" + "#if HAVE_CURLOPT_USERNAME == 1\n" + " } else if (rb_easy_nil(\"username\") && rb_easy_nil(\"password\")) { /* don't set this even to NULL if we have set username and password */\n" + "#else\n" + " } else {\n" + "#endif\n" + " curl_easy_setopt(curl, CURLOPT_USERPWD, NULL);\n" + " }\n" + "\n" + " if (rb_easy_nil(\"proxy_url\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXY, NULL);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXY, rb_easy_get_str(\"proxy_url\"));\n" + " }\n" + "\n" + " if (rb_easy_nil(\"proxypwd\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, NULL);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, rb_easy_get_str(\"proxypwd\"));\n" + " }\n" + "\n" + " // body/header procs\n" + " if (!rb_easy_nil(\"body_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)&proc_data_handler_body);\n" + " curl_easy_setopt(curl, CURLOPT_WRITEDATA, rbce);\n" + " /* clear out the body_data if it was set */\n" + " rb_easy_del(\"body_data\");\n" + " } else {\n" + " VALUE body_buffer = rb_easy_set(\"body_data\", rb_str_buf_new(32768));\n" + " curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)&default_data_handler);\n" + " curl_easy_setopt(curl, CURLOPT_WRITEDATA, body_buffer);\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"header_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, (curl_write_callback)&proc_data_handler_header);\n" + " curl_easy_setopt(curl, CURLOPT_HEADERDATA, rbce);\n" + " /* clear out the header_data if it was set */\n" + " rb_easy_del(\"header_data\");\n" + " } else {\n" + " VALUE header_buffer = rb_easy_set(\"header_data\", rb_str_buf_new(16384));\n" + " curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, (curl_write_callback)&default_data_handler);\n" + " curl_easy_setopt(curl, CURLOPT_HEADERDATA, header_buffer);\n" + " }\n" + "\n" + " /* encoding */\n" + " if (!rb_easy_nil(\"encoding\")) {\n" + " curl_easy_setopt(curl, CURLOPT_ENCODING, rb_easy_get_str(\"encoding\"));\n" + " }\n" + "\n" + " // progress and debug procs\n" + " if (!rb_easy_nil(\"progress_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, (curl_progress_callback)&proc_progress_handler);\n" + " curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, rb_easy_get(\"progress_proc\"));\n" + " curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"debug_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, (curl_debug_callback)&proc_debug_handler);\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGDATA, rb_easy_get(\"debug_proc\"));\n" + " curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);\n" + " } else {\n" + " // have to remove handler to re-enable standard verbosity\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGDATA, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_VERBOSE, rbce->verbose);\n" + " }\n" + "\n" + " /* general opts */\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_HEADER, rbce->header_in_body);\n" + " curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, rbce->follow_location);\n" + " curl_easy_setopt(curl, CURLOPT_MAXREDIRS, rbce->max_redirs);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, rbce->proxy_tunnel);\n" + " curl_easy_setopt(curl, CURLOPT_FILETIME, rbce->fetch_file_time);\n" + " curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, rbce->ssl_verify_peer);\n" + " curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, rbce->ssl_verify_host);\n" + "\n" + " if ((rbce->use_netrc != Qnil) && (rbce->use_netrc != Qfalse)) {\n" + " curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_IGNORED);\n" + " }\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, rbce->unrestricted_auth);\n" + "\n" + "#if HAVE_CURLOPT_TIMEOUT_MS\n" + " curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, rbce->timeout_ms);\n" + "#endif\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, rbce->connect_timeout);\n" + "#if HAVE_CURLOPT_CONNECTTIMEOUT_MS\n" + " curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, rbce->connect_timeout_ms);\n" + "#endif\n" + " curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, rbce->dns_cache_timeout);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, rbce->ignore_content_length);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_IPRESOLVE, rbce->resolve_mode);\n" + "\n" + "\n" + "#if LIBCURL_VERSION_NUM >= 0x070a08\n" + " curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, rbce->ftp_response_timeout);\n" + "#else\n" + " if (rbce->ftp_response_timeout > 0) {\n" + " rb_warn(\"Installed libcurl is too old to support ftp_response_timeout\");\n" + " }\n" + "#endif\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, rbce->low_speed_limit);\n" + " curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, rbce->low_speed_time);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, rbce->max_recv_speed_large);\n" + " curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, rbce->max_send_speed_large);\n" + "\n" + " // Set up localport / proxy port\n" + " // FIXME these won't get returned to default if they're unset Ruby\n" + " if (rbce->proxy_port > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYPORT, rbce->proxy_port);\n" + " }\n" + "\n" + " if (rbce->local_port > 0) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070f02\n" + " curl_easy_setopt(curl, CURLOPT_LOCALPORT, rbce->local_port);\n" + "\n" + " if (rbce->local_port_range > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, rbce->local_port_range);\n" + " }\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support local_port\");\n" + "#endif\n" + " }\n" + "\n" + " if (rbce->proxy_type != -1) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070a00\n" + " if (rbce->proxy_type == -2) {\n" + " rb_warn(\"Installed libcurl is too old to support the selected proxy type\");\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYTYPE, rbce->proxy_type);\n" + " }\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support proxy_type\");\n" + "#endif\n" + " }\n" + "\n" + " /*\n" + " * NOTE: we used to set CURLAUTH_ANY but see: http://curl.haxx.se/mail/lib-2015-06/0033.html\n" + " */\n" + " if (rbce->http_auth_types != 0) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070a06\n" + " curl_easy_setopt(curl, CURLOPT_HTTPAUTH, rbce->http_auth_types);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support http_auth_types\");\n" + "#endif\n" + " }\n" + "\n" + " if (rbce->proxy_auth_types != 0) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070a07\n" + " curl_easy_setopt(curl, CURLOPT_PROXYAUTH, rbce->proxy_auth_types);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support proxy_auth_types\");\n" + "#endif\n" + " }\n" + "\n" + " /* Set up HTTP cookie handling if necessary\n" + " FIXME this may not get disabled if it's enabled, the disabled again from ruby.\n" + " */\n" + " if (rbce->enable_cookies) {\n" + " if (!rb_easy_nil(\"cookiejar\")) {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIEJAR, rb_easy_get_str(\"cookiejar\"));\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"cookiefile\")) {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIEFILE, rb_easy_get_str(\"cookiefile\"));\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIEFILE, \"\"); /* \"\" = magic to just enable */\n" + " }\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"cookies\")) {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIE, rb_easy_get_str(\"cookies\"));\n" + " }\n" + "\n" + " /* Set up HTTPS cert handling if necessary */\n" + " if (!rb_easy_nil(\"cert\")) {\n" + " if (!rb_easy_nil(\"certtype\")) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, rb_easy_get_str(\"certtype\"));\n" + " }\n" + " curl_easy_setopt(curl, CURLOPT_SSLCERT, rb_easy_get_str(\"cert\"));\n" + " if (!rb_easy_nil(\"certpassword\")) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLCERTPASSWD, rb_easy_get_str(\"certpassword\"));\n" + " }\n" + " if (!rb_easy_nil(\"cert_key\")) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLKEY, rb_easy_get_str(\"cert_key\"));\n" + " }\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"cacert\")) {\n" + " curl_easy_setopt(curl, CURLOPT_CAINFO, rb_easy_get_str(\"cacert\"));\n" + " }\n" + "#ifdef HAVE_CURL_CONFIG_CA\n" + " else {\n" + " curl_easy_setopt(curl, CURLOPT_CAINFO, CURL_CONFIG_CA);\n" + " }\n" + "#endif\n" + "\n" + "#ifdef CURL_VERSION_SSL\n" + " if (rbce->ssl_version > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLVERSION, rbce->ssl_version);\n" + " }\n" + "\n" + " if (rbce->use_ssl > 0) {\n" + " curl_easy_setopt(curl, CURB_FTPSSL, rbce->use_ssl);\n" + " }\n" + "#else\n" + " if (rbce->ssl_version > 0 || rbce->use_ssl > 0) {\n" + " rb_warn(\"libcurl is not configured with SSL support\");\n" + " }\n" + "#endif\n" + "\n" + " if (rbce->ftp_filemethod > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, rbce->ftp_filemethod);\n" + " }\n" + "\n" + " /* Set the user-agent string if specified */\n" + " if (!rb_easy_nil(\"useragent\")) {\n" + " curl_easy_setopt(curl, CURLOPT_USERAGENT, rb_easy_get_str(\"useragent\"));\n" + " }\n" + "\n" + " /* Setup HTTP headers if necessary */\n" + " curl_easy_setopt(curl, CURLOPT_HTTPHEADER, NULL); // XXX: maybe we shouldn't be clearing this?\n" + "\n" + " if (!rb_easy_nil(\"headers\")) {\n" + " if (rb_easy_type_check(\"headers\", T_ARRAY) || rb_easy_type_check(\"headers\", T_HASH)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, hdrs);\n" + " rb_iterate(rb_each, rb_easy_get(\"headers\"), cb_each_http_header, wrap);\n" + " } else {\n" + " VALUE headers_str = rb_obj_as_string(rb_easy_get(\"headers\"));\n" + " *hdrs = curl_slist_append(*hdrs, StringValuePtr(headers_str));\n" + " }\n" + "\n" + " if (*hdrs) {\n" + " curl_easy_setopt(curl, CURLOPT_HTTPHEADER, *hdrs);\n" + " }\n" + " }\n" + "\n" + "#if HAVE_CURLOPT_PROXYHEADER\n" + " /* Setup HTTP proxy headers if necessary */\n" + " curl_easy_setopt(curl, CURLOPT_PROXYHEADER, NULL); // XXX: maybe we shouldn't be clearing this?\n" + "\n" + " if (!rb_easy_nil(\"proxy_headers\")) {\n" + " if (rb_easy_type_check(\"proxy_headers\", T_ARRAY) || rb_easy_type_check(\"proxy_headers\", T_HASH)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, phdrs);\n" + " rb_iterate(rb_each, rb_easy_get(\"proxy_headers\"), cb_each_http_proxy_header, wrap);\n" + " } else {\n" + " VALUE proxy_headers_str = rb_obj_as_string(rb_easy_get(\"proxy_headers\"));\n" + " *phdrs = curl_slist_append(*hdrs, StringValuePtr(proxy_headers_str));\n" + " }\n" + "\n" + " if (*phdrs) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYHEADER, *phdrs);\n" + " }\n" + " }\n" + "#endif\n" + "\n" + " /* Setup FTP commands if necessary */\n" + " if (!rb_easy_nil(\"ftp_commands\")) {\n" + " if (rb_easy_type_check(\"ftp_commands\", T_ARRAY)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, cmds);\n" + " rb_iterate(rb_each, rb_easy_get(\"ftp_commands\"), cb_each_ftp_command, wrap);\n" + " }\n" + "\n" + " if (*cmds) {\n" + " curl_easy_setopt(curl, CURLOPT_QUOTE, *cmds);\n" + " }\n" + " }\n" + "\n" + "#if HAVE_CURLOPT_RESOLVE\n" + " /* Setup resolve list if necessary */\n" + " if (!rb_easy_nil(\"resolve\")) {\n" + " if (rb_easy_type_check(\"resolve\", T_ARRAY)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, rslv);\n" + " rb_iterate(rb_each, rb_easy_get(\"resolve\"), cb_each_resolve, wrap);\n" + " }\n" + "\n" + " if (*rslv) {\n" + " curl_easy_setopt(curl, CURLOPT_RESOLVE, *rslv);\n" + " }\n" + " }\n" + "#endif\n" + "\n" + " return Qnil;\n" + "}\n" + "/***********************************************\n" + " *\n" + " * Clean up a connection\n" + " *\n" + " * Always returns Qnil.\n" + " */\n" + "VALUE ruby_curl_easy_cleanup( VALUE self, ruby_curl_easy *rbce ) {\n" + "\n" + " CURL *curl = rbce->curl;\n" + " struct curl_slist *ftp_commands;\n" + " struct curl_slist *resolve;\n" + "\n" + " /* Free everything up */\n" + " if (rbce->curl_headers) {\n" + " curl_slist_free_all(rbce->curl_headers);\n" + " rbce->curl_headers = NULL;\n" + " }\n" + "\n" + " if (rbce->curl_proxy_headers) {\n" + " curl_slist_free_all(rbce->curl_proxy_headers);\n" + " rbce->curl_proxy_headers = NULL;\n" + " }\n" + "\n" + " ftp_commands = rbce->curl_ftp_commands;\n" + " if (ftp_commands) {\n" + " curl_slist_free_all(ftp_commands);\n" + " rbce->curl_ftp_commands = NULL;\n" + " }\n" + "\n" + " resolve = rbce->curl_resolve;\n" + " if (resolve) {\n" + " curl_slist_free_all(resolve);\n" + " rbce->curl_resolve = NULL;\n" + " }\n" + "\n" + " /* clean up a PUT request's curl options. */\n" + " if (!rb_easy_nil(\"upload\")) {\n" + " rb_easy_del(\"upload\"); // set the upload object to Qnil to let the GC clean up\n" + " curl_easy_setopt(curl, CURLOPT_UPLOAD, 0);\n" + " curl_easy_setopt(curl, CURLOPT_READFUNCTION, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_READDATA, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0);\n" + " }\n" + "\n" + " // set values on cleanup to nil\n" + " //rb_easy_del(\"multi\");\n" + "\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * Common implementation of easy.http(verb) and easy.http_delete\n" + " */\n" + "static VALUE ruby_curl_easy_perform_verb_str(VALUE self, const char *verb) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + " VALUE retval;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl = rbce->curl;\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, verb);\n" + "\n" + " retval = rb_funcall(self, rb_intern(\"perform\"), 0);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);\n" + "\n" + " return retval;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http(verb)\n" + " *\n" + " * Send an HTTP request with method set to verb, using the current options set for this Curl::Easy instance.\n" + " * This method always returns true or raises an exception (defined under Curl::Err) on error.\n" + " */\n" + "static VALUE ruby_curl_easy_perform_verb(VALUE self, VALUE verb) {\n" + " VALUE str_verb;\n" + " if (rb_type(verb) == T_STRING) {\n" + " return ruby_curl_easy_perform_verb_str(self, StringValueCStr(verb));\n" + " }\n" + " else if (rb_respond_to(verb,rb_intern(\"to_s\"))) {\n" + " str_verb = rb_funcall(verb, rb_intern(\"to_s\"), 0);\n" + " return ruby_curl_easy_perform_verb_str(self, StringValueCStr(str_verb));\n" + " }\n" + " else {\n" + " rb_raise(rb_eRuntimeError, \"Invalid HTTP VERB, must response to 'to_s'\");\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_post(\"url=encoded%20form%20data;and=so%20on\") => true\n" + " * easy.http_post(\"url=encoded%20form%20data\", \"and=so%20on\", ...) => true\n" + " * easy.http_post(\"url=encoded%20form%20data\", Curl::PostField, \"and=so%20on\", ...) => true\n" + " * easy.http_post(Curl::PostField, Curl::PostField ..., Curl::PostField) => true\n" + " *\n" + " * POST the specified formdata to the currently configured URL using\n" + " * the current options set for this Curl::Easy instance. This method\n" + " * always returns true, or raises an exception (defined under\n" + " * Curl::Err) on error.\n" + " *\n" + " * The Content-type of the POST is determined by the current setting\n" + " * of multipart_form_post? , according to the following rules:\n" + " * * When false (the default): the form will be POSTed with a\n" + " * content-type of 'application/x-www-form-urlencoded', and any of the\n" + " * four calling forms may be used.\n" + " * * When true: the form will be POSTed with a content-type of\n" + " * 'multipart/formdata'. Only the last calling form may be used,\n" + " * i.e. only PostField instances may be POSTed. In this mode,\n" + " * individual fields' content-types are recognised, and file upload\n" + " * fields are supported.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_perform_post(int argc, VALUE *argv, VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + " int i;\n" + " VALUE args_ary;\n" + "\n" + " rb_scan_args(argc, argv, \"*\", &args_ary);\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl = rbce->curl;\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);\n" + "\n" + " if (rbce->multipart_form_post) {\n" + " VALUE ret;\n" + " struct curl_httppost *first = NULL, *last = NULL;\n" + "\n" + " // Make the multipart form\n" + " for (i = 0; i < argc; i++) {\n" + " if (rb_obj_is_instance_of(argv[i], cCurlPostField)) {\n" + " append_to_form(argv[i], &first, &last);\n" + " } else if (rb_type(argv[i]) == T_ARRAY) {\n" + " // see: https://github.com/rvanlieshout/curb/commit/8bcdefddc0162484681ebd1a92d52a642666a445\n" + " long c = 0, argv_len = RARRAY_LEN(argv[i]);\n" + " for (; c < argv_len; ++c) {\n" + " if (rb_obj_is_instance_of(rb_ary_entry(argv[i],c), cCurlPostField)) {\n" + " append_to_form(rb_ary_entry(argv[i],c), &first, &last);\n" + " } else {\n" + " rb_raise(eCurlErrInvalidPostField, \"You must use PostFields only with multipart form posts\");\n" + " return Qnil;\n" + " }\n" + " }\n" + " } else {\n" + " rb_raise(eCurlErrInvalidPostField, \"You must use PostFields only with multipart form posts\");\n" + " return Qnil;\n" + " }\n" + " }\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_POST, 0);\n" + " curl_easy_setopt(curl, CURLOPT_HTTPPOST, first);\n" + " ret = rb_funcall(self, rb_intern(\"perform\"), 0);\n" + " curl_formfree(first);\n" + "\n" + " return ret;\n" + " } else {\n" + " VALUE post_body = Qnil;\n" + " /* TODO: check for PostField.file and raise error before to_s fails */\n" + " if ((post_body = rb_funcall(args_ary, idJoin, 1, rbstrAmp)) == Qnil) {\n" + " rb_raise(eCurlErrError, \"Failed to join arguments\");\n" + " return Qnil;\n" + " } else {\n" + " /* if the function call above returns an empty string because no additional arguments were passed this makes sure\n" + " a previously set easy.post_body = \"arg=foo&bar=bin\" will be honored */\n" + " if( post_body != Qnil && rb_type(post_body) == T_STRING && RSTRING_LEN(post_body) > 0 ) {\n" + " ruby_curl_easy_post_body_set(self, post_body);\n" + " }\n" + "\n" + " /* if post body is not defined, set it so we enable POST header, even though the request body is empty */\n" + " if( rb_easy_nil(\"postdata_buffer\") ) {\n" + " ruby_curl_easy_post_body_set(self, post_body);\n" + " }\n" + "\n" + " return rb_funcall(self, rb_intern(\"perform\"), 0);\n" + " }\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_put(data) => true\n" + " *\n" + " * PUT the supplied data to the currently configured URL using the\n" + " * current options set for this Curl::Easy instance. This method always\n" + " * returns true, or raises an exception (defined under Curl::Err) on error.\n" + " */\n" + "static VALUE ruby_curl_easy_perform_put(VALUE self, VALUE data) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl = rbce->curl;\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);\n" + " ruby_curl_easy_put_data_set(self, data);\n" + "\n" + " return rb_funcall(self, rb_intern(\"perform\"), 0);\n" + "}\n" + "\n" + "\n" + "/* =================== DATA FUNCS =============== */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.body_str => \"response body\"\n" + " *\n" + " * Return the response body from the previous call to +perform+. This\n" + " * is populated by the default +on_body+ handler - if you supply\n" + " * your own body handler, this string will be empty.\n" + " */\n" + "static VALUE ruby_curl_easy_body_str_get(VALUE self) {\n" + " /*\n" + " TODO: can we force_encoding on the return here if we see charset=utf-8 in the content-type header?\n" + " Content-Type: application/json; charset=utf-8\n" + " */\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, body_data);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_str => \"response header\"\n" + " *\n" + " * Return the response header from the previous call to +perform+. This\n" + " * is populated by the default +on_header+ handler - if you supply\n" + " * your own header handler, this string will be empty.\n" + " */\n" + "static VALUE ruby_curl_easy_header_str_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, header_data);\n" + "}\n" + "\n" + "\n" + "/* ============== LASTCONN INFO FUNCS ============ */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.last_effective_url => \"http://some.url\" or nil\n" + " *\n" + " * Retrieve the last effective URL used by this instance.\n" + " * This is the URL used in the last +perform+ call,\n" + " * and may differ from the value of easy.url.\n" + " */\n" + "static VALUE ruby_curl_easy_last_effective_url_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " char* url;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_EFFECTIVE_URL, &url);\n" + "\n" + " if (url && url[0]) { // curl returns empty string if none\n" + " return rb_str_new2(url);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.response_code => fixnum\n" + " *\n" + " * Retrieve the last received HTTP or FTP code. This will be zero\n" + " * if no server response code has been received. Note that a proxy's\n" + " * CONNECT response should be read with +http_connect_code+\n" + " * and not this method.\n" + " */\n" + "static VALUE ruby_curl_easy_response_code_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long code;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "#ifdef HAVE_CURLINFO_RESPONSE_CODE\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_RESPONSE_CODE, &code);\n" + "#else\n" + " // old libcurl\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_HTTP_CODE, &code);\n" + "#endif\n" + "\n" + " return LONG2NUM(code);\n" + "}\n" + "\n" + "#if defined(HAVE_CURLINFO_PRIMARY_IP)\n" + "/*\n" + " * call-seq:\n" + " * easy.primary_ip => \"xx.xx.xx.xx\" or nil\n" + " *\n" + " * Retrieve the resolved IP of the most recent connection\n" + " * done with this curl handle. This string may be IPv6 if\n" + " * that's enabled. This feature requires curl 7.19.x and above\n" + " */\n" + "static VALUE ruby_curl_easy_primary_ip_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " char* ip;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_PRIMARY_IP, &ip);\n" + "\n" + " if (ip && ip[0]) { // curl returns empty string if none\n" + " return rb_str_new2(ip);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "#endif\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_connect_code => fixnum\n" + " *\n" + " * Retrieve the last received proxy response code to a CONNECT request.\n" + " */\n" + "static VALUE ruby_curl_easy_http_connect_code_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long code;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_HTTP_CONNECTCODE, &code);\n" + "\n" + " return LONG2NUM(code);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.file_time => fixnum\n" + " *\n" + " * Retrieve the remote time of the retrieved document (in number of\n" + " * seconds since 1 jan 1970 in the GMT/UTC time zone). If you get -1,\n" + " * it can be because of many reasons (unknown, the server hides it\n" + " * or the server doesn't support the command that tells document time\n" + " * etc) and the time of the document is unknown.\n" + " *\n" + " * Note that you must tell the server to collect this information\n" + " * before the transfer is made, by setting +fetch_file_time?+ to true,\n" + " * or you will unconditionally get a -1 back.\n" + " *\n" + " * This requires libcurl 7.5 or higher - otherwise -1 is unconditionally\n" + " * returned.\n" + " */\n" + "static VALUE ruby_curl_easy_file_time_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_FILETIME\n" + " ruby_curl_easy *rbce;\n" + " long time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_FILETIME, &time);\n" + "\n" + " return LONG2NUM(time);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support file_time\");\n" + " return LONG2NUM(0);\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.total_time => float\n" + " *\n" + " * Retrieve the total time in seconds for the previous transfer,\n" + " * including name resolving, TCP connect etc.\n" + " */\n" + "static VALUE ruby_curl_easy_total_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_TOTAL_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.name_lookup_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the\n" + " * name resolving was completed.\n" + " */\n" + "static VALUE ruby_curl_easy_name_lookup_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_NAMELOOKUP_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the\n" + " * connect to the remote host (or proxy) was completed.\n" + " */\n" + "static VALUE ruby_curl_easy_connect_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONNECT_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.app_connect_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the SSL/SSH\n" + " * connect/handshake to the remote host was completed. This time is most often\n" + " * very near to the pre transfer time, except for cases such as HTTP\n" + " * pipelining where the pretransfer time can be delayed due to waits in line\n" + " * for the pipeline and more.\n" + " */\n" + "#if defined(HAVE_CURLINFO_APPCONNECT_TIME)\n" + "static VALUE ruby_curl_easy_app_connect_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_APPCONNECT_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "#endif\n" + "\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.pre_transfer_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the\n" + " * file transfer is just about to begin. This includes all pre-transfer\n" + " * commands and negotiations that are specific to the particular protocol(s)\n" + " * involved.\n" + " */\n" + "static VALUE ruby_curl_easy_pre_transfer_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_PRETRANSFER_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.start_transfer_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the first byte\n" + " * is just about to be transferred. This includes the +pre_transfer_time+ and\n" + " * also the time the server needs to calculate the result.\n" + " */\n" + "static VALUE ruby_curl_easy_start_transfer_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_STARTTRANSFER_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.redirect_time => float\n" + " *\n" + " * Retrieve the total time, in seconds, it took for all redirection steps\n" + " * include name lookup, connect, pretransfer and transfer before final\n" + " * transaction was started. +redirect_time+ contains the complete\n" + " * execution time for multiple redirections.\n" + " *\n" + " * Requires libcurl 7.9.7 or higher, otherwise -1 is always returned.\n" + " */\n" + "static VALUE ruby_curl_easy_redirect_time_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_REDIRECT_TIME\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support redirect_time\");\n" + " return rb_float_new(-1);\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.redirect_count => integer\n" + " *\n" + " * Retrieve the total number of redirections that were actually followed.\n" + " *\n" + " * Requires libcurl 7.9.7 or higher, otherwise -1 is always returned.\n" + " */\n" + "static VALUE ruby_curl_easy_redirect_count_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_REDIRECT_COUNT\n" + " ruby_curl_easy *rbce;\n" + " long count;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_COUNT, &count);\n" + "\n" + " return LONG2NUM(count);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support redirect_count\");\n" + " return LONG2NUM(-1);\n" + "#endif\n" + "\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.redirect_url => \"http://some.url\" or nil\n" + " *\n" + " * Retrieve the URL a redirect would take you to if you\n" + " * would enable CURLOPT_FOLLOWLOCATION.\n" + " *\n" + " * Requires libcurl 7.18.2 or higher, otherwise -1 is always returned.\n" + " */\n" + "static VALUE ruby_curl_easy_redirect_url_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_REDIRECT_URL\n" + " ruby_curl_easy *rbce;\n" + " char* url;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_URL, &url);\n" + "\n" + " if (url && url[0]) { // curl returns empty string if none\n" + " return rb_str_new2(url);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support redirect_url\");\n" + " return LONG2NUM(-1);\n" + "#endif\n" + "}\n" + "\n" + "\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.uploaded_bytes => float\n" + " *\n" + " * Retrieve the total amount of bytes that were uploaded in the\n" + " * preceeding transfer.\n" + " */\n" + "static VALUE ruby_curl_easy_uploaded_bytes_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_UPLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.downloaded_bytes => float\n" + " *\n" + " * Retrieve the total amount of bytes that were downloaded in the\n" + " * preceeding transfer.\n" + " */\n" + "static VALUE ruby_curl_easy_downloaded_bytes_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_DOWNLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.upload_speed => float\n" + " *\n" + " * Retrieve the average upload speed that curl measured for the\n" + " * preceeding complete upload.\n" + " */\n" + "static VALUE ruby_curl_easy_upload_speed_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_UPLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.download_speed => float\n" + " *\n" + " * Retrieve the average download speed that curl measured for\n" + " * the preceeding complete download.\n" + " */\n" + "static VALUE ruby_curl_easy_download_speed_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_DOWNLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_size => fixnum\n" + " *\n" + " * Retrieve the total size of all the headers received in the\n" + " * preceeding transfer.\n" + " */\n" + "static VALUE ruby_curl_easy_header_size_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long size;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_HEADER_SIZE, &size);\n" + "\n" + " return LONG2NUM(size);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.request_size => fixnum\n" + " *\n" + " * Retrieve the total size of the issued requests. This is so far\n" + " * only for HTTP requests. Note that this may be more than one request\n" + " * if +follow_location?+ is true.\n" + " */\n" + "static VALUE ruby_curl_easy_request_size_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long size;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REQUEST_SIZE, &size);\n" + "\n" + " return LONG2NUM(size);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_result => integer\n" + " *\n" + " * Retrieve the result of the certification verification that was requested\n" + " * (by setting +ssl_verify_peer?+ to +true+).\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_result_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long result;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SSL_VERIFYRESULT, &result);\n" + "\n" + " return LONG2NUM(result);\n" + "}\n" + "\n" + "/* TODO CURLINFO_SSL_ENGINES\n" + "\n" + "Pass the address of a 'struct curl_slist *' to receive a linked-list of OpenSSL crypto-engines supported.\n" + "Note that engines are normally implemented in separate dynamic libraries.\n" + "Hence not all the returned engines may be available at run-time.\n" + "NOTE: you must call curl_slist_free_all(3) on the list pointer once you're done with it, as libcurl will not free the data for you. (Added in 7.12.3)\n" + "*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.downloaded_content_length => float\n" + " *\n" + " * Retrieve the content-length of the download. This is the value read\n" + " * from the Content-Length: field.\n" + " */\n" + "static VALUE ruby_curl_easy_downloaded_content_length_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.uploaded_content_length => float\n" + " *\n" + " * Retrieve the content-length of the upload.\n" + " */\n" + "static VALUE ruby_curl_easy_uploaded_content_length_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.content_type => \"content/type\" or nil\n" + " *\n" + " * Retrieve the content-type of the downloaded object. This is the value read\n" + " * from the Content-Type: field. If you get +nil+, it means that the server\n" + " * didn't send a valid Content-Type header or that the protocol used doesn't\n" + " * support this.\n" + " */\n" + "static VALUE ruby_curl_easy_content_type_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " char* type;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_TYPE, &type);\n" + "\n" + " if (type && type[0]) { // curl returns empty string if none\n" + " return rb_str_new2(type);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "\n" + "\n" + "/* NOT REQUIRED?\n" + "CURLINFO_PRIVATE\n" + "\n" + "Pass a pointer to a 'char *' to receive the pointer to the private data associated with the curl handle (set with the CURLOPT_PRIVATE option to curl_easy_setopt(3)). (Added in 7.10.3)\n" + "*/\n" + "\n" + "/* TODO these will need constants setting up too for checking the bits.\n" + " *\n" + " * Alternatively, could return an object that wraps the long, and has\n" + " * question methods to query the auth types. Could return long from to_i(nt)\n" + " *\n" + "CURLINFO_HTTPAUTH_AVAIL\n" + "\n" + "Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available. The meaning of the bits is explained in the CURLOPT_HTTPAUTH option for curl_easy_setopt(3). (Added in 7.10.8)\n" + "\n" + "CURLINFO_PROXYAUTH_AVAIL\n" + "\n" + "Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available for your proxy authentication. (Added in 7.10.8)\n" + "*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.os_errno => integer\n" + " *\n" + " * Retrieve the errno variable from a connect failure (requires\n" + " * libcurl 7.12.2 or higher, otherwise 0 is always returned).\n" + " */\n" + "static VALUE ruby_curl_easy_os_errno_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_OS_ERRNO\n" + " ruby_curl_easy *rbce;\n" + " long result;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_OS_ERRNO, &result);\n" + "\n" + " return LONG2NUM(result);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support os_errno\");\n" + " return LONG2NUM(0);\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.num_connects => integer\n" + " *\n" + " * Retrieve the number of new connections libcurl had to create to achieve\n" + " * the previous transfer (only the successful connects are counted).\n" + " * Combined with +redirect_count+ you are able to know how many times libcurl\n" + " * successfully reused existing connection(s) or not.\n" + " *\n" + " * See the Connection Options of curl_easy_setopt(3) to see how libcurl tries\n" + " * to make persistent connections to save time.\n" + " *\n" + " * (requires libcurl 7.12.3 or higher, otherwise -1 is always returned).\n" + " */\n" + "static VALUE ruby_curl_easy_num_connects_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_NUM_CONNECTS\n" + " ruby_curl_easy *rbce;\n" + " long result;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_NUM_CONNECTS, &result);\n" + "\n" + " return LONG2NUM(result);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support num_connects\");\n" + " return LONG2NUM(-1);\n" + "#endif\n" + "}\n" + "\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookielist => array\n" + " *\n" + " * Retrieves the cookies curl knows in an array of strings.\n" + " * Returned strings are in Netscape cookiejar format or in Set-Cookie format.\n" + " *\n" + " * See also option CURLINFO_COOKIELIST of curl_easy_getopt(3) to see how libcurl behaves.\n" + " *\n" + " * (requires libcurl 7.14.1 or higher, otherwise -1 is always returned).\n" + "*/\n" + "static VALUE ruby_curl_easy_cookielist_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_COOKIELIST\n" + " ruby_curl_easy *rbce;\n" + " struct curl_slist *cookies;\n" + " struct curl_slist *cookie;\n" + " VALUE rb_cookies;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_COOKIELIST, &cookies);\n" + " if (!cookies)\n" + " return Qnil;\n" + " rb_cookies = rb_ary_new();\n" + " for (cookie = cookies; cookie; cookie = cookie->next)\n" + " rb_ary_push(rb_cookies, rb_str_new2(cookie->data));\n" + " curl_slist_free_all(cookies);\n" + " return rb_cookies;\n" + "\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support cookielist\");\n" + " return INT2FIX(-1);\n" + "#endif\n" + "}\n" + "\n" + "\n" + "/* TODO this needs to be implemented. Could probably support CONNECT_ONLY by having this\n" + " * return an open Socket or something.\n" + " *\n" + "CURLINFO_LASTSOCKET\n" + "\n" + "Pass a pointer to a long to receive the last socket used by this curl session. If the socket is no longer valid, -1 is returned. When you finish working with the socket, you must call curl_easy_cleanup() as usual and let libcurl close the socket and cleanup other resources associated with the handle. This is typically used in combination with CURLOPT_CONNECT_ONLY. (Added in 7.15.2)\n" + "*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_entry_path => \"C:\\ftp\\root\\\" or nil\n" + " *\n" + " * Retrieve the path of the entry path. That is the initial path libcurl ended\n" + " * up in when logging on to the remote FTP server. This returns +nil+ if\n" + " * something is wrong.\n" + " *\n" + " * (requires libcurl 7.15.4 or higher, otherwise +nil+ is always returned).\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_entry_path_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_FTP_ENTRY_PATH\n" + " ruby_curl_easy *rbce;\n" + " char* path = NULL;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_FTP_ENTRY_PATH, &path);\n" + "\n" + " if (path && path[0]) { // curl returns NULL or empty string if none\n" + " return rb_str_new2(path);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support num_connects\");\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multi => \"#\"\n" + " */\n" + "static VALUE ruby_curl_easy_multi_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return rbce->multi;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multi=multi => \"#\"\n" + " */\n" + "static VALUE ruby_curl_easy_multi_set(VALUE self, VALUE multi) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " rbce->multi = multi;\n" + " return rbce->multi;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.last_result => 0\n" + " */\n" + "static VALUE ruby_curl_easy_last_result(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return LONG2NUM(rbce->last_result);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.last_error => \"Error details\" or nil\n" + " */\n" + "static VALUE ruby_curl_easy_last_error(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (rbce->err_buf[0]) { // curl returns NULL or empty string if none\n" + " return rb_str_new2(rbce->err_buf);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.setopt Fixnum, value => value\n" + " *\n" + " * Initial access to libcurl curl_easy_setopt\n" + " */\n" + "static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {\n" + " ruby_curl_easy *rbce;\n" + " long option = NUM2LONG(opt);\n" + " rb_io_t *open_f_ptr;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " switch (option) {\n" + " /* BEHAVIOR OPTIONS */\n" + " case CURLOPT_VERBOSE: {\n" + " VALUE verbose = val;\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, verbose);\n" + " } break;\n" + " case CURLOPT_FOLLOWLOCATION: {\n" + " VALUE follow_location = val;\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, follow_location);\n" + " } break;\n" + " /* TODO: CALLBACK OPTIONS */\n" + " /* TODO: ERROR OPTIONS */\n" + " /* NETWORK OPTIONS */\n" + " case CURLOPT_URL: {\n" + " VALUE url = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, url);\n" + " } break;\n" + " case CURLOPT_CUSTOMREQUEST:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_CUSTOMREQUEST, NIL_P(val) ? NULL : StringValueCStr(val));\n" + " break;\n" + " case CURLOPT_HTTP_VERSION:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HTTP_VERSION, NUM2LONG(val));\n" + " break;\n" + " case CURLOPT_PROXY: {\n" + " VALUE proxy_url = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_url);\n" + " } break;\n" + " case CURLOPT_INTERFACE: {\n" + " VALUE interface_hm = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, interface_hm);\n" + " } break;\n" + " case CURLOPT_HEADER:\n" + " case CURLOPT_NOPROGRESS:\n" + " case CURLOPT_NOSIGNAL:\n" + "#if HAVE_CURLOPT_PATH_AS_IS\n" + " case CURLOPT_PATH_AS_IS:\n" + "#endif\n" + "#if HAVE_CURLOPT_PIPEWAIT\n" + " case CURLOPT_PIPEWAIT:\n" + "#endif\n" + " case CURLOPT_HTTPGET:\n" + " case CURLOPT_NOBODY: {\n" + " int type = rb_type(val);\n" + " VALUE value;\n" + " if (type == T_TRUE) {\n" + " value = rb_int_new(1);\n" + " } else if (type == T_FALSE) {\n" + " value = rb_int_new(0);\n" + " } else {\n" + " value = rb_funcall(val, rb_intern(\"to_i\"), 0);\n" + " }\n" + " curl_easy_setopt(rbce->curl, option, NUM2LONG(value));\n" + " } break;\n" + " case CURLOPT_POST: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_POST, rb_type(val) == T_TRUE);\n" + " } break;\n" + " case CURLOPT_MAXCONNECTS: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAXCONNECTS, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_POSTFIELDS: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_POSTFIELDS, NIL_P(val) ? NULL : StringValueCStr(val));\n" + " } break;\n" + " case CURLOPT_USERPWD: {\n" + " VALUE userpwd = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, userpwd);\n" + " } break;\n" + " case CURLOPT_PROXYUSERPWD: {\n" + " VALUE proxypwd = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, proxypwd);\n" + " } break;\n" + " case CURLOPT_COOKIE: {\n" + " VALUE cookies = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cookies);\n" + " } break;\n" + " case CURLOPT_COOKIEFILE: {\n" + " VALUE cookiefile = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cookiefile);\n" + " } break;\n" + " case CURLOPT_COOKIEJAR: {\n" + " VALUE cookiejar = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cookiejar);\n" + " } break;\n" + " case CURLOPT_TCP_NODELAY: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_NODELAY, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_RANGE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_RANGE, StringValueCStr(val));\n" + " } break;\n" + " case CURLOPT_RESUME_FROM: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_RESUME_FROM, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_FAILONERROR: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_FAILONERROR, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_SSL_CIPHER_LIST: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_SSL_CIPHER_LIST, StringValueCStr(val));\n" + " } break;\n" + " case CURLOPT_FORBID_REUSE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_FORBID_REUSE, NUM2LONG(val));\n" + " } break;\n" + "#if HAVE_CURLOPT_GSSAPI_DELEGATION\n" + " case CURLOPT_GSSAPI_DELEGATION: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_GSSAPI_DELEGATION, NUM2LONG(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_UNIX_SOCKET_PATH\n" + " case CURLOPT_UNIX_SOCKET_PATH: {\n" + "\tcurl_easy_setopt(rbce->curl, CURLOPT_UNIX_SOCKET_PATH, StringValueCStr(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_MAX_SEND_SPEED_LARGE\n" + " case CURLOPT_MAX_SEND_SPEED_LARGE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t) NUM2LL(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_MAX_RECV_SPEED_LARGE\n" + " case CURLOPT_MAX_RECV_SPEED_LARGE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t) NUM2LL(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_MAXFILESIZE\n" + " case CURLOPT_MAXFILESIZE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAXFILESIZE, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + "#if HAVE_CURLOPT_TCP_KEEPALIVE\n" + " case CURLOPT_TCP_KEEPALIVE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPALIVE, NUM2LONG(val));\n" + " break;\n" + " case CURLOPT_TCP_KEEPIDLE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPIDLE, NUM2LONG(val));\n" + " break;\n" + " case CURLOPT_TCP_KEEPINTVL:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPINTVL, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + "#if HAVE_CURLOPT_HAPROXYPROTOCOL\n" + " case CURLOPT_HAPROXYPROTOCOL:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HAPROXYPROTOCOL, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + " case CURLOPT_STDERR:\n" + " // libcurl requires raw FILE pointer and this should be IO object in Ruby.\n" + " // Tempfile or StringIO won't work.\n" + " Check_Type(val, T_FILE);\n" + " GetOpenFile(val, open_f_ptr);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_STDERR, rb_io_stdio_file(open_f_ptr));\n" + " break;\n" + " case CURLOPT_PROTOCOLS:\n" + " case CURLOPT_REDIR_PROTOCOLS:\n" + " curl_easy_setopt(rbce->curl, option, NUM2LONG(val));\n" + " break;\n" + "#if HAVE_CURLOPT_SSL_SESSIONID_CACHE\n" + " case CURLOPT_SSL_SESSIONID_CACHE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_SSL_SESSIONID_CACHE, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + "#if HAVE_CURLOPT_PROXY_SSL_VERIFYHOST\n" + " case CURLOPT_PROXY_SSL_VERIFYHOST:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_PROXY_SSL_VERIFYHOST, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + " default:\n" + " rb_raise(rb_eTypeError, \"Curb unsupported option\");\n" + " }\n" + "\n" + " return val;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.getinfo Fixnum => value\n" + " *\n" + " * Iniital access to libcurl curl_easy_getinfo, remember getinfo doesn't return the same values as setopt\n" + " */\n" + "static VALUE ruby_curl_easy_get_opt(VALUE self, VALUE opt) {\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.inspect => \"#\"\n" + " */\n" + "static VALUE ruby_curl_easy_inspect(VALUE self) {\n" + " char buf[64];\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " /* if we don't have a url set... we'll crash... */\n" + " if( !rb_easy_nil(\"url\") && rb_easy_type_check(\"url\", T_STRING)) {\n" + " VALUE url = rb_easy_get(\"url\");\n" + " size_t len = 13+((RSTRING_LEN(url) > 50) ? 50 : RSTRING_LEN(url));\n" + " /* \"#\" */\n" + " memcpy(buf,\"#\");\n" + "}\n" + "\n" + "\n" + "/* ================== ESCAPING FUNCS ==============*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.escape(\"some text\") => \"some%20text\"\n" + " *\n" + " * Convert the given input string to a URL encoded string and return\n" + " * the result. All input characters that are not a-z, A-Z or 0-9 are\n" + " * converted to their \"URL escaped\" version (%NN where NN is a\n" + " * two-digit hexadecimal number).\n" + " */\n" + "static VALUE ruby_curl_easy_escape(VALUE self, VALUE svalue) {\n" + " ruby_curl_easy *rbce;\n" + " char *result;\n" + " VALUE rresult;\n" + " VALUE str = svalue;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " /* NOTE: make sure the value is a string, if not call to_s */\n" + " if( rb_type(str) != T_STRING ) { str = rb_funcall(str,rb_intern(\"to_s\"),0); }\n" + "\n" + "#if (LIBCURL_VERSION_NUM >= 0x070f04)\n" + " result = (char*)curl_easy_escape(rbce->curl, StringValuePtr(str), (int)RSTRING_LEN(str));\n" + "#else\n" + " result = (char*)curl_escape(StringValuePtr(str), (int)RSTRING_LEN(str));\n" + "#endif\n" + "\n" + " rresult = rb_str_new2(result);\n" + " curl_free(result);\n" + "\n" + " return rresult;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.unescape(\"some%20text\") => \"some text\"\n" + " *\n" + " * Convert the given URL encoded input string to a \"plain string\" and return\n" + " * the result. All input characters that are URL encoded (%XX where XX is a\n" + " * two-digit hexadecimal number) are converted to their binary versions.\n" + " */\n" + "static VALUE ruby_curl_easy_unescape(VALUE self, VALUE str) {\n" + " ruby_curl_easy *rbce;\n" + " int rlen;\n" + " char *result;\n" + " VALUE rresult;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + "#if (LIBCURL_VERSION_NUM >= 0x070f04)\n" + " result = (char*)curl_easy_unescape(rbce->curl, StringValuePtr(str), (int)RSTRING_LEN(str), &rlen);\n" + "#else\n" + " result = (char*)curl_unescape(StringValuePtr(str), (int)RSTRING_LEN(str));\n" + " rlen = strlen(result);\n" + "#endif\n" + "\n" + " rresult = rb_str_new(result, rlen);\n" + " curl_free(result);\n" + "\n" + " return rresult;\n" + "}\n" + "\n" + "\n" + "/* ================= CLASS METHODS ==================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * Curl::Easy.error(code) => [ErrCode, String]\n" + " *\n" + " * translate an internal libcurl error to ruby error class\n" + " */\n" + "static VALUE ruby_curl_easy_error_message(VALUE klass, VALUE code) {\n" + " return rb_curl_easy_error(NUM2INT(code));\n" + "}\n" + "\n" + "/* =================== INIT LIB =====================*/\n" + "// TODO: https://bugs.ruby-lang.org/issues/18007\n" + "void init_curb_easy() {\n" + " idCall = rb_intern(\"call\");\n" + " idJoin = rb_intern(\"join\");\n" + "\n" + " rbstrAmp = rb_str_new2(\"&\");\n" + " rb_global_variable(&rbstrAmp);\n" + "\n" + " cCurlEasy = rb_define_class_under(mCurl, \"Easy\", rb_cObject);\n" + "\n" + " /* Class methods */\n" + " rb_define_alloc_func(cCurlEasy, ruby_curl_easy_allocate);\n" + " rb_define_singleton_method(cCurlEasy, \"error\", ruby_curl_easy_error_message, 1);\n" + "\n" + " /* Initialize method */\n" + " rb_define_method(cCurlEasy, \"initialize\", ruby_curl_easy_initialize, -1);\n" + "\n" + " /* Attributes for config next perform */\n" + " rb_define_method(cCurlEasy, \"url\", ruby_curl_easy_url_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_url\", ruby_curl_easy_proxy_url_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"proxy_headers=\", ruby_curl_easy_proxy_headers_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_headers\", ruby_curl_easy_proxy_headers_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"headers=\", ruby_curl_easy_headers_set, 1);\n" + " rb_define_method(cCurlEasy, \"headers\", ruby_curl_easy_headers_get, 0);\n" + " rb_define_method(cCurlEasy, \"interface\", ruby_curl_easy_interface_get, 0);\n" + " rb_define_method(cCurlEasy, \"userpwd\", ruby_curl_easy_userpwd_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxypwd\", ruby_curl_easy_proxypwd_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookies\", ruby_curl_easy_cookies_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookiefile\", ruby_curl_easy_cookiefile_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookiejar\", ruby_curl_easy_cookiejar_get, 0);\n" + " rb_define_method(cCurlEasy, \"cert=\", ruby_curl_easy_cert_set, 1);\n" + " rb_define_method(cCurlEasy, \"cert\", ruby_curl_easy_cert_get, 0);\n" + " rb_define_method(cCurlEasy, \"cert_key=\", ruby_curl_easy_cert_key_set, 1);\n" + " rb_define_method(cCurlEasy, \"cert_key\", ruby_curl_easy_cert_key_get, 0);\n" + " rb_define_method(cCurlEasy, \"cacert=\", ruby_curl_easy_cacert_set, 1);\n" + " rb_define_method(cCurlEasy, \"cacert\", ruby_curl_easy_cacert_get, 0);\n" + " rb_define_method(cCurlEasy, \"certpassword=\", ruby_curl_easy_certpassword_set, 1);\n" + " rb_define_method(cCurlEasy, \"certtype=\", ruby_curl_easy_certtype_set, 1);\n" + " rb_define_method(cCurlEasy, \"certtype\", ruby_curl_easy_certtype_get, 0);\n" + " rb_define_method(cCurlEasy, \"encoding=\", ruby_curl_easy_encoding_set, 1);\n" + " rb_define_method(cCurlEasy, \"encoding\", ruby_curl_easy_encoding_get, 0);\n" + " rb_define_method(cCurlEasy, \"useragent=\", ruby_curl_easy_useragent_set, 1);\n" + " rb_define_method(cCurlEasy, \"useragent\", ruby_curl_easy_useragent_get, 0);\n" + " rb_define_method(cCurlEasy, \"post_body=\", ruby_curl_easy_post_body_set, 1);\n" + " rb_define_method(cCurlEasy, \"post_body\", ruby_curl_easy_post_body_get, 0);\n" + " rb_define_method(cCurlEasy, \"put_data=\", ruby_curl_easy_put_data_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_commands=\", ruby_curl_easy_ftp_commands_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_commands\", ruby_curl_easy_ftp_commands_get, 0);\n" + " rb_define_method(cCurlEasy, \"resolve=\", ruby_curl_easy_resolve_set, 1);\n" + " rb_define_method(cCurlEasy, \"resolve\", ruby_curl_easy_resolve_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"local_port=\", ruby_curl_easy_local_port_set, 1);\n" + " rb_define_method(cCurlEasy, \"local_port\", ruby_curl_easy_local_port_get, 0);\n" + " rb_define_method(cCurlEasy, \"local_port_range=\", ruby_curl_easy_local_port_range_set, 1);\n" + " rb_define_method(cCurlEasy, \"local_port_range\", ruby_curl_easy_local_port_range_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_port=\", ruby_curl_easy_proxy_port_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_port\", ruby_curl_easy_proxy_port_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_type=\", ruby_curl_easy_proxy_type_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_type\", ruby_curl_easy_proxy_type_get, 0);\n" + " rb_define_method(cCurlEasy, \"http_auth_types=\", ruby_curl_easy_http_auth_types_set, -1);\n" + " rb_define_method(cCurlEasy, \"http_auth_types\", ruby_curl_easy_http_auth_types_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_auth_types=\", ruby_curl_easy_proxy_auth_types_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_auth_types\", ruby_curl_easy_proxy_auth_types_get, 0);\n" + " rb_define_method(cCurlEasy, \"max_redirects=\", ruby_curl_easy_max_redirects_set, 1);\n" + " rb_define_method(cCurlEasy, \"max_redirects\", ruby_curl_easy_max_redirects_get, 0);\n" + " rb_define_method(cCurlEasy, \"timeout=\", ruby_curl_easy_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"timeout\", ruby_curl_easy_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"timeout_ms=\", ruby_curl_easy_timeout_ms_set, 1);\n" + " rb_define_method(cCurlEasy, \"timeout_ms\", ruby_curl_easy_timeout_ms_get, 0);\n" + " rb_define_method(cCurlEasy, \"connect_timeout=\", ruby_curl_easy_connect_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"connect_timeout\", ruby_curl_easy_connect_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"connect_timeout_ms=\", ruby_curl_easy_connect_timeout_ms_set, 1);\n" + " rb_define_method(cCurlEasy, \"connect_timeout_ms\", ruby_curl_easy_connect_timeout_ms_get, 0);\n" + " rb_define_method(cCurlEasy, \"dns_cache_timeout=\", ruby_curl_easy_dns_cache_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"dns_cache_timeout\", ruby_curl_easy_dns_cache_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"ftp_response_timeout=\", ruby_curl_easy_ftp_response_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_response_timeout\", ruby_curl_easy_ftp_response_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"low_speed_limit=\", ruby_curl_easy_low_speed_limit_set, 1);\n" + " rb_define_method(cCurlEasy, \"low_speed_limit\", ruby_curl_easy_low_speed_limit_get, 0);\n" + " rb_define_method(cCurlEasy, \"low_speed_time=\", ruby_curl_easy_low_speed_time_set, 1);\n" + " rb_define_method(cCurlEasy, \"low_speed_time\", ruby_curl_easy_low_speed_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"max_send_speed_large=\", ruby_curl_easy_max_send_speed_large_set, 1);\n" + " rb_define_method(cCurlEasy, \"max_send_speed_large\", ruby_curl_easy_max_send_speed_large_get, 0);\n" + " rb_define_method(cCurlEasy, \"max_recv_speed_large=\", ruby_curl_easy_max_recv_speed_large_set, 1);\n" + " rb_define_method(cCurlEasy, \"max_recv_speed_large\", ruby_curl_easy_max_recv_speed_large_get, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_version=\", ruby_curl_easy_ssl_version_set, 1);\n" + " rb_define_method(cCurlEasy, \"ssl_version\", ruby_curl_easy_ssl_version_get, 0);\n" + " rb_define_method(cCurlEasy, \"use_ssl=\", ruby_curl_easy_use_ssl_set, 1);\n" + " rb_define_method(cCurlEasy, \"use_ssl\", ruby_curl_easy_use_ssl_get, 0);\n" + " rb_define_method(cCurlEasy, \"ftp_filemethod=\", ruby_curl_easy_ftp_filemethod_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_filemethod\", ruby_curl_easy_ftp_filemethod_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"username=\", ruby_curl_easy_username_set, 1);\n" + " rb_define_method(cCurlEasy, \"username\", ruby_curl_easy_username_get, 0);\n" + " rb_define_method(cCurlEasy, \"password=\", ruby_curl_easy_password_set, 1);\n" + " rb_define_method(cCurlEasy, \"password\", ruby_curl_easy_password_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"proxy_tunnel=\", ruby_curl_easy_proxy_tunnel_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_tunnel?\", ruby_curl_easy_proxy_tunnel_q, 0);\n" + " rb_define_method(cCurlEasy, \"fetch_file_time=\", ruby_curl_easy_fetch_file_time_set, 1);\n" + " rb_define_method(cCurlEasy, \"fetch_file_time?\", ruby_curl_easy_fetch_file_time_q, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_peer=\", ruby_curl_easy_ssl_verify_peer_set, 1);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_peer?\", ruby_curl_easy_ssl_verify_peer_q, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_host_integer=\", ruby_curl_easy_ssl_verify_host_set, 1);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_host\", ruby_curl_easy_ssl_verify_host_get, 0);\n" + " rb_define_method(cCurlEasy, \"header_in_body=\", ruby_curl_easy_header_in_body_set, 1);\n" + " rb_define_method(cCurlEasy, \"header_in_body?\", ruby_curl_easy_header_in_body_q, 0);\n" + " rb_define_method(cCurlEasy, \"use_netrc=\", ruby_curl_easy_use_netrc_set, 1);\n" + " rb_define_method(cCurlEasy, \"use_netrc?\", ruby_curl_easy_use_netrc_q, 0);\n" + " rb_define_method(cCurlEasy, \"follow_location?\", ruby_curl_easy_follow_location_q, 0);\n" + " rb_define_method(cCurlEasy, \"autoreferer=\", ruby_curl_easy_autoreferer_set, 1);\n" + " rb_define_method(cCurlEasy, \"unrestricted_auth=\", ruby_curl_easy_unrestricted_auth_set, 1);\n" + " rb_define_method(cCurlEasy, \"unrestricted_auth?\", ruby_curl_easy_unrestricted_auth_q, 0);\n" + " rb_define_method(cCurlEasy, \"verbose=\", ruby_curl_easy_verbose_set, 1);\n" + " rb_define_method(cCurlEasy, \"verbose?\", ruby_curl_easy_verbose_q, 0);\n" + " rb_define_method(cCurlEasy, \"multipart_form_post=\", ruby_curl_easy_multipart_form_post_set, 1);\n" + " rb_define_method(cCurlEasy, \"multipart_form_post?\", ruby_curl_easy_multipart_form_post_q, 0);\n" + " rb_define_method(cCurlEasy, \"enable_cookies=\", ruby_curl_easy_enable_cookies_set, 1);\n" + " rb_define_method(cCurlEasy, \"enable_cookies?\", ruby_curl_easy_enable_cookies_q, 0);\n" + " rb_define_method(cCurlEasy, \"ignore_content_length=\", ruby_curl_easy_ignore_content_length_set, 1);\n" + " rb_define_method(cCurlEasy, \"ignore_content_length?\", ruby_curl_easy_ignore_content_length_q, 0);\n" + " rb_define_method(cCurlEasy, \"resolve_mode\", ruby_curl_easy_resolve_mode, 0);\n" + " rb_define_method(cCurlEasy, \"resolve_mode=\", ruby_curl_easy_resolve_mode_set, 1);\n" + "\n" + " rb_define_method(cCurlEasy, \"on_body\", ruby_curl_easy_on_body_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_header\", ruby_curl_easy_on_header_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_progress\", ruby_curl_easy_on_progress_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_debug\", ruby_curl_easy_on_debug_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_success\", ruby_curl_easy_on_success_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_failure\", ruby_curl_easy_on_failure_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_missing\", ruby_curl_easy_on_missing_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_redirect\", ruby_curl_easy_on_redirect_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_complete\", ruby_curl_easy_on_complete_set, -1);\n" + "\n" + " rb_define_method(cCurlEasy, \"http\", ruby_curl_easy_perform_verb, 1);\n" + " rb_define_method(cCurlEasy, \"http_post\", ruby_curl_easy_perform_post, -1);\n" + " rb_define_method(cCurlEasy, \"http_put\", ruby_curl_easy_perform_put, 1);\n" + "\n" + " /* Post-perform info methods */\n" + " rb_define_method(cCurlEasy, \"body_str\", ruby_curl_easy_body_str_get, 0);\n" + " rb_define_method(cCurlEasy, \"header_str\", ruby_curl_easy_header_str_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"last_effective_url\", ruby_curl_easy_last_effective_url_get, 0);\n" + " rb_define_method(cCurlEasy, \"response_code\", ruby_curl_easy_response_code_get, 0);\n" + " rb_define_method(cCurlEasy, \"code\", ruby_curl_easy_response_code_get, 0);\n" + "#if defined(HAVE_CURLINFO_PRIMARY_IP)\n" + " rb_define_method(cCurlEasy, \"primary_ip\", ruby_curl_easy_primary_ip_get, 0);\n" + "#endif\n" + " rb_define_method(cCurlEasy, \"http_connect_code\", ruby_curl_easy_http_connect_code_get, 0);\n" + " rb_define_method(cCurlEasy, \"file_time\", ruby_curl_easy_file_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"total_time\", ruby_curl_easy_total_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"name_lookup_time\", ruby_curl_easy_name_lookup_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"connect_time\", ruby_curl_easy_connect_time_get, 0);\n" + "#if defined(HAVE_CURLINFO_APPCONNECT_TIME)\n" + " rb_define_method(cCurlEasy, \"app_connect_time\", ruby_curl_easy_app_connect_time_get, 0);\n" + "#endif\n" + " rb_define_method(cCurlEasy, \"pre_transfer_time\", ruby_curl_easy_pre_transfer_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"start_transfer_time\", ruby_curl_easy_start_transfer_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"redirect_time\", ruby_curl_easy_redirect_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"redirect_count\", ruby_curl_easy_redirect_count_get, 0);\n" + " rb_define_method(cCurlEasy, \"redirect_url\", ruby_curl_easy_redirect_url_get, 0);\n" + " rb_define_method(cCurlEasy, \"downloaded_bytes\", ruby_curl_easy_downloaded_bytes_get, 0);\n" + " rb_define_method(cCurlEasy, \"uploaded_bytes\", ruby_curl_easy_uploaded_bytes_get, 0);\n" + " rb_define_method(cCurlEasy, \"download_speed\", ruby_curl_easy_download_speed_get, 0);\n" + " rb_define_method(cCurlEasy, \"upload_speed\", ruby_curl_easy_upload_speed_get, 0);\n" + " rb_define_method(cCurlEasy, \"header_size\", ruby_curl_easy_header_size_get, 0);\n" + " rb_define_method(cCurlEasy, \"request_size\", ruby_curl_easy_request_size_get, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_result\", ruby_curl_easy_ssl_verify_result_get, 0);\n" + " rb_define_method(cCurlEasy, \"downloaded_content_length\", ruby_curl_easy_downloaded_content_length_get, 0);\n" + " rb_define_method(cCurlEasy, \"uploaded_content_length\", ruby_curl_easy_uploaded_content_length_get, 0);\n" + " rb_define_method(cCurlEasy, \"content_type\", ruby_curl_easy_content_type_get, 0);\n" + " rb_define_method(cCurlEasy, \"os_errno\", ruby_curl_easy_os_errno_get, 0);\n" + " rb_define_method(cCurlEasy, \"num_connects\", ruby_curl_easy_num_connects_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookielist\", ruby_curl_easy_cookielist_get, 0);\n" + " rb_define_method(cCurlEasy, \"ftp_entry_path\", ruby_curl_easy_ftp_entry_path_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"close\", ruby_curl_easy_close, 0);\n" + " rb_define_method(cCurlEasy, \"reset\", ruby_curl_easy_reset, 0);\n" + "\n" + " /* Curl utils */\n" + " rb_define_method(cCurlEasy, \"escape\", ruby_curl_easy_escape, 1);\n" + " rb_define_method(cCurlEasy, \"unescape\", ruby_curl_easy_unescape, 1);\n" + "\n" + " /* Runtime support */\n" + " rb_define_method(cCurlEasy, \"clone\", ruby_curl_easy_clone, 0);\n" + " rb_define_alias(cCurlEasy, \"dup\", \"clone\");\n" + " rb_define_method(cCurlEasy, \"inspect\", ruby_curl_easy_inspect, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"multi\", ruby_curl_easy_multi_get, 0);\n" + " rb_define_method(cCurlEasy, \"multi=\", ruby_curl_easy_multi_set, 1);\n" + " rb_define_method(cCurlEasy, \"last_result\", ruby_curl_easy_last_result, 0);\n" + " rb_define_method(cCurlEasy, \"last_error\", ruby_curl_easy_last_error, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"setopt\", ruby_curl_easy_set_opt, 2);\n" + " rb_define_method(cCurlEasy, \"getinfo\", ruby_curl_easy_get_opt, 1);\n" + "}\n"> expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/ext/curb_easy.c'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n"> =============================================================================== F =============================================================================== Failure: test_download_url_to_file_via_string(TestCurbCurlDownload) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_download.rb:16:in 'TestCurbCurlDownload#test_download_url_to_file_via_string' <"/* curb_easy.c - Curl easy mode\n" + " * Copyright (c)2006 Ross Bamford.\n" + " * Licensed under the Ruby License. See LICENSE for details.\n" + " *\n" + " * $Id: curb_easy.c 30 2006-12-09 12:30:24Z roscopeco $\n" + " */\n" + "#include \"curb_easy.h\"\n" + "#include \"curb_errors.h\"\n" + "#include \"curb_postfield.h\"\n" + "#include \"curb_upload.h\"\n" + "#include \"curb_multi.h\"\n" + "\n" + "#include \n" + "#include \n" + "\n" + "extern VALUE mCurl;\n" + "\n" + "static VALUE idCall;\n" + "static VALUE idJoin;\n" + "static VALUE rbstrAmp;\n" + "\n" + "#ifdef RDOC_NEVER_DEFINED\n" + " mCurl = rb_define_module(\"Curl\");\n" + "#endif\n" + "\n" + "VALUE cCurlEasy;\n" + "\n" + "// for Ruby 1.8\n" + "#ifndef HAVE_RB_IO_STDIO_FILE\n" + "static FILE * rb_io_stdio_file(rb_io_t *fptr) {\n" + " return fptr->f;\n" + "}\n" + "#endif\n" + "\n" + "/* ================== CURL HANDLER FUNCS ==============*/\n" + "\n" + "static VALUE callback_exception(VALUE unused, VALUE exception) {\n" + " return Qfalse;\n" + "}\n" + "\n" + "/* These handle both body and header data */\n" + "static size_t default_data_handler(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " VALUE out) {\n" + " rb_str_buf_cat(out, stream, size * nmemb);\n" + " return size * nmemb;\n" + "}\n" + "\n" + "// size_t function( void *ptr, size_t size, size_t nmemb, void *stream);\n" + "static size_t read_data_handler(void *ptr,\n" + " size_t size,\n" + " size_t nmemb,\n" + " ruby_curl_easy *rbce) {\n" + " VALUE upload = rb_easy_get(\"upload\");\n" + " size_t read_bytes = (size*nmemb);\n" + " VALUE stream = ruby_curl_upload_stream_get(upload);\n" + "\n" + " if (rb_respond_to(stream, rb_intern(\"read\"))) {//if (rb_respond_to(stream, rb_intern(\"to_s\"))) {\n" + " /* copy read_bytes from stream into ptr */\n" + " VALUE str = rb_funcall(stream, rb_intern(\"read\"), 1, rb_int_new(read_bytes) );\n" + " if( str != Qnil ) {\n" + " memcpy(ptr, RSTRING_PTR(str), RSTRING_LEN(str));\n" + " return RSTRING_LEN(str);\n" + " }\n" + " else {\n" + " return 0;\n" + " }\n" + " }\n" + " else if (rb_respond_to(stream, rb_intern(\"to_s\"))) {\n" + " ruby_curl_upload *rbcu;\n" + " VALUE str;\n" + " size_t len;\n" + " size_t remaining;\n" + " char *str_ptr;\n" + " Data_Get_Struct(upload, ruby_curl_upload, rbcu);\n" + " str = rb_funcall(stream, rb_intern(\"to_s\"), 0);\n" + " len = RSTRING_LEN(str);\n" + " remaining = len - rbcu->offset;\n" + " str_ptr = RSTRING_PTR(str);\n" + "\n" + " if( remaining <= read_bytes ) {\n" + " if( remaining > 0 ) {\n" + " memcpy(ptr, str_ptr+rbcu->offset, remaining);\n" + " read_bytes = remaining;\n" + " rbcu->offset += remaining;\n" + " }\n" + " return remaining;\n" + " }\n" + " else { // read_bytes < remaining - send what we can fit in the buffer(ptr)\n" + " memcpy(ptr, str_ptr+rbcu->offset, read_bytes);\n" + " rbcu->offset += read_bytes;\n" + " }\n" + " return read_bytes;\n" + " }\n" + " else {\n" + " return 0;\n" + " }\n" + "}\n" + "\n" + "int seek_data_handler(ruby_curl_easy *rbce,\n" + " curl_off_t offset,\n" + " int origin) {\n" + "\n" + " VALUE upload = rb_easy_get(\"upload\");\n" + " VALUE stream = ruby_curl_upload_stream_get(upload);\n" + "\n" + " if (rb_respond_to(stream, rb_intern(\"seek\"))) {\n" + " rb_funcall(stream, rb_intern(\"seek\"), 2, SEEK_SET, offset);\n" + " } else {\n" + " ruby_curl_upload *rbcu;\n" + " Data_Get_Struct(upload, ruby_curl_upload, rbcu);\n" + " // This OK because curl only uses SEEK_SET as per the documentation\n" + " rbcu->offset = offset;\n" + " }\n" + "\n" + " return 0;\n" + "}\n" + "\n" + "static size_t proc_data_handler(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " VALUE proc) {\n" + " VALUE procret;\n" + "\n" + " procret = rb_funcall(proc, idCall, 1, rb_str_new(stream, size * nmemb));\n" + "\n" + " switch (rb_type(procret)) {\n" + " case T_FIXNUM:\n" + " return FIX2LONG(procret);\n" + " case T_BIGNUM:\n" + " return NUM2LONG(procret);\n" + " default:\n" + " rb_warn(\"Curl data handlers should return the number of bytes read as an Integer\");\n" + " return size * nmemb;\n" + " }\n" + "}\n" + "\n" + "static size_t proc_data_handler_body(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " ruby_curl_easy *rbce)\n" + "{\n" + " size_t ret;\n" + " rbce->callback_active = 1;\n" + " ret = proc_data_handler(stream, size, nmemb, rb_easy_get(\"body_proc\"));\n" + " rbce->callback_active = 0;\n" + " return ret;\n" + "}\n" + "static size_t proc_data_handler_header(char *stream,\n" + " size_t size,\n" + " size_t nmemb,\n" + " ruby_curl_easy *rbce)\n" + "{\n" + " size_t ret;\n" + " rbce->callback_active = 1;\n" + " ret = proc_data_handler(stream, size, nmemb, rb_easy_get(\"header_proc\"));\n" + " rbce->callback_active = 0;\n" + " return ret;\n" + "}\n" + "\n" + "\n" + "static VALUE call_progress_handler(VALUE ary) {\n" + " return rb_funcall(rb_ary_entry(ary, 0), idCall, 4,\n" + " rb_ary_entry(ary, 1), // rb_float_new(dltotal),\n" + " rb_ary_entry(ary, 2), // rb_float_new(dlnow),\n" + " rb_ary_entry(ary, 3), // rb_float_new(ultotal),\n" + " rb_ary_entry(ary, 4)); // rb_float_new(ulnow));\n" + "}\n" + "\n" + "static int proc_progress_handler(VALUE proc,\n" + " double dltotal,\n" + " double dlnow,\n" + " double ultotal,\n" + " double ulnow) {\n" + " VALUE procret;\n" + " VALUE callargs = rb_ary_new2(5);\n" + "\n" + " rb_ary_store(callargs, 0, proc);\n" + " rb_ary_store(callargs, 1, rb_float_new(dltotal));\n" + " rb_ary_store(callargs, 2, rb_float_new(dlnow));\n" + " rb_ary_store(callargs, 3, rb_float_new(ultotal));\n" + " rb_ary_store(callargs, 4, rb_float_new(ulnow));\n" + "\n" + "\t//v = rb_rescue(range_check, (VALUE)args, range_failed, 0);\n" + " //procret = rb_funcall(proc, idCall, 4, rb_float_new(dltotal),\n" + " // rb_float_new(dlnow),\n" + " // rb_float_new(ultotal),\n" + " // rb_float_new(ulnow));\n" + " procret = rb_rescue(call_progress_handler, callargs, callback_exception, Qnil);\n" + "\n" + " return(((procret == Qfalse) || (procret == Qnil)) ? -1 : 0);\n" + "}\n" + "\n" + "static VALUE call_debug_handler(VALUE ary) {\n" + " return rb_funcall(rb_ary_entry(ary, 0), idCall, 2,\n" + " rb_ary_entry(ary, 1), // INT2NUM(type),\n" + " rb_ary_entry(ary, 2)); // rb_str_new(data, data_len)\n" + "}\n" + "static int proc_debug_handler(CURL *curl,\n" + " curl_infotype type,\n" + " char *data,\n" + " size_t data_len,\n" + " VALUE proc) {\n" + " VALUE callargs = rb_ary_new2(3);\n" + " rb_ary_store(callargs, 0, proc);\n" + " rb_ary_store(callargs, 1, INT2NUM(type));\n" + " rb_ary_store(callargs, 2, rb_str_new(data, data_len));\n" + " rb_rescue(call_debug_handler, callargs, callback_exception, Qnil);\n" + " /* no way to indicate to libcurl that we should break out given an exception in the on_debug handler...\n" + " * this means exceptions will be swallowed\n" + " */\n" + " //rb_funcall(proc, idCall, 2, INT2NUM(type), rb_str_new(data, data_len));\n" + " return 0;\n" + "}\n" + "\n" + "/* ================== MARK/FREE FUNC ==================*/\n" + "void curl_easy_mark(ruby_curl_easy *rbce) {\n" + " if (!NIL_P(rbce->opts)) { rb_gc_mark(rbce->opts); }\n" + " if (!NIL_P(rbce->multi)) { rb_gc_mark(rbce->multi); }\n" + "}\n" + "\n" + "static void ruby_curl_easy_free(ruby_curl_easy *rbce) {\n" + " if (rbce->curl_headers) {\n" + " curl_slist_free_all(rbce->curl_headers);\n" + " }\n" + "\n" + " if (rbce->curl_proxy_headers) {\n" + " curl_slist_free_all(rbce->curl_proxy_headers);\n" + " }\n" + "\n" + " if (rbce->curl_ftp_commands) {\n" + " curl_slist_free_all(rbce->curl_ftp_commands);\n" + " }\n" + "\n" + " if (rbce->curl_resolve) {\n" + " curl_slist_free_all(rbce->curl_resolve);\n" + " }\n" + "\n" + " if (rbce->curl) {\n" + " /* disable any progress or debug events */\n" + " curl_easy_setopt(rbce->curl, CURLOPT_WRITEFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_WRITEDATA, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HEADERFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HEADERDATA, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_DEBUGFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_DEBUGDATA, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_VERBOSE, 0);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_PROGRESSFUNCTION, NULL);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_NOPROGRESS, 1);\n" + " curl_easy_cleanup(rbce->curl);\n" + " rbce->curl = NULL;\n" + " }\n" + "}\n" + "\n" + "void curl_easy_free(ruby_curl_easy *rbce) {\n" + " ruby_curl_easy_free(rbce);\n" + " free(rbce);\n" + "}\n" + "\n" + "\n" + "/* ================= ALLOC METHODS ====================*/\n" + "\n" + "static void ruby_curl_easy_zero(ruby_curl_easy *rbce) {\n" + " rbce->opts = rb_hash_new();\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " rbce->curl_headers = NULL;\n" + " rbce->curl_proxy_headers = NULL;\n" + " rbce->curl_ftp_commands = NULL;\n" + " rbce->curl_resolve = NULL;\n" + "\n" + " /* various-typed opts */\n" + " rbce->local_port = 0;\n" + " rbce->local_port_range = 0;\n" + " rbce->proxy_port = 0;\n" + " rbce->proxy_type = -1;\n" + " rbce->http_auth_types = 0;\n" + " rbce->proxy_auth_types = 0;\n" + " rbce->max_redirs = -1;\n" + " rbce->timeout = 0;\n" + " rbce->timeout_ms = 0;\n" + " rbce->connect_timeout = 0;\n" + " rbce->connect_timeout_ms = 0;\n" + " rbce->dns_cache_timeout = 60;\n" + " rbce->ftp_response_timeout = 0;\n" + " rbce->low_speed_limit = 0;\n" + " rbce->low_speed_time = 0;\n" + " rbce->max_send_speed_large = 0;\n" + " rbce->max_recv_speed_large = 0;\n" + " rbce->ssl_version = -1;\n" + " rbce->use_ssl = -1;\n" + " rbce->ftp_filemethod = -1;\n" + " rbce->resolve_mode = CURL_IPRESOLVE_WHATEVER;\n" + "\n" + " /* bool opts */\n" + " rbce->proxy_tunnel = 0;\n" + " rbce->fetch_file_time = 0;\n" + " rbce->ssl_verify_peer = 1;\n" + " rbce->ssl_verify_host = 2;\n" + " rbce->header_in_body = 0;\n" + " rbce->use_netrc = 0;\n" + " rbce->follow_location = 0;\n" + " rbce->unrestricted_auth = 0;\n" + " rbce->verbose = 0;\n" + " rbce->multipart_form_post = 0;\n" + " rbce->enable_cookies = 0;\n" + " rbce->ignore_content_length = 0;\n" + " rbce->callback_active = 0;\n" + "}\n" + "\n" + "/*\n" + " * Allocate space for a Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_allocate(VALUE klass) {\n" + " ruby_curl_easy *rbce;\n" + " rbce = ALLOC(ruby_curl_easy);\n" + " rbce->curl = NULL;\n" + " rbce->opts = Qnil;\n" + " rbce->multi = Qnil;\n" + " ruby_curl_easy_zero(rbce);\n" + " return Data_Wrap_Struct(klass, curl_easy_mark, curl_easy_free, rbce);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * Curl::Easy.new => #\n" + " * Curl::Easy.new(url = nil) => #\n" + " * Curl::Easy.new(url = nil) { |self| ... } => #\n" + " *\n" + " * Initialize a new Curl::Easy instance, optionally supplying the URL.\n" + " * The block form allows further configuration to be supplied before\n" + " * the instance is returned.\n" + " */\n" + "static VALUE ruby_curl_easy_initialize(int argc, VALUE *argv, VALUE self) {\n" + " CURLcode ecode;\n" + " VALUE url, blk;\n" + " ruby_curl_easy *rbce;\n" + "\n" + " rb_scan_args(argc, argv, \"01&\", &url, &blk);\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " /* handler */\n" + " rbce->curl = curl_easy_init();\n" + " if (!rbce->curl) {\n" + " rb_raise(eCurlErrFailedInit, \"Failed to initialize easy handle\");\n" + " }\n" + "\n" + " rbce->multi = Qnil;\n" + " rbce->opts = Qnil;\n" + "\n" + " ruby_curl_easy_zero(rbce);\n" + "\n" + " curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf);\n" + "\n" + " rb_easy_set(\"url\", url);\n" + "\n" + " /* set the pointer to the curl handle */\n" + " ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self);\n" + " if (ecode != CURLE_OK) {\n" + " raise_curl_easy_error_exception(ecode);\n" + " }\n" + "\n" + " if (blk != Qnil) {\n" + " rb_funcall(blk, idCall, 1, self);\n" + " }\n" + "\n" + " return self;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.clone => \n" + " * easy.dup => \n" + " *\n" + " * Clone this Curl::Easy instance, creating a new instance.\n" + " * This method duplicates the underlying CURL* handle.\n" + " */\n" + "static VALUE ruby_curl_easy_clone(VALUE self) {\n" + " ruby_curl_easy *rbce, *newrbce;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " newrbce = ALLOC(ruby_curl_easy);\n" + " memcpy(newrbce, rbce, sizeof(ruby_curl_easy));\n" + " newrbce->curl = curl_easy_duphandle(rbce->curl);\n" + " newrbce->curl_headers = NULL;\n" + " newrbce->curl_proxy_headers = NULL;\n" + " newrbce->curl_ftp_commands = NULL;\n" + " newrbce->curl_resolve = NULL;\n" + "\n" + " curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf);\n" + "\n" + " return Data_Wrap_Struct(cCurlEasy, curl_easy_mark, curl_easy_free, newrbce);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.close => nil\n" + " *\n" + " * Close the Curl::Easy instance. Any open connections are closed\n" + " * The easy handle is reinitialized. If a previous multi handle was\n" + " * open it is set to nil and will be cleared after a GC.\n" + " */\n" + "static VALUE ruby_curl_easy_close(VALUE self) {\n" + " CURLcode ecode;\n" + " ruby_curl_easy *rbce;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (rbce->callback_active) {\n" + " rb_raise(rb_eRuntimeError, \"Cannot close an active curl handle within a callback\");\n" + " }\n" + "\n" + " ruby_curl_easy_free(rbce);\n" + "\n" + " /* reinit the handle */\n" + " rbce->curl = curl_easy_init();\n" + " if (!rbce->curl) {\n" + " rb_raise(eCurlErrFailedInit, \"Failed to initialize easy handle\");\n" + " }\n" + "\n" + " rbce->multi = Qnil;\n" + "\n" + " ruby_curl_easy_zero(rbce);\n" + "\n" + " /* give the new curl handle a reference back to the ruby object */\n" + " ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self);\n" + " if (ecode != CURLE_OK) {\n" + " raise_curl_easy_error_exception(ecode);\n" + " }\n" + "\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.reset => Hash\n" + " *\n" + " * Reset the Curl::Easy instance, clears out all settings.\n" + " *\n" + " * from http://curl.haxx.se/libcurl/c/curl_easy_reset.html\n" + " * Re-initializes all options previously set on a specified CURL handle to the default values. This puts back the handle to the same state as it was in when it was just created with curl_easy_init(3).\n" + " * It does not change the following information kept in the handle: live connections, the Session ID cache, the DNS cache, the cookies and shares.\n" + " *\n" + " * The return value contains all settings stored.\n" + " */\n" + "static VALUE ruby_curl_easy_reset(VALUE self) {\n" + " CURLcode ecode;\n" + " ruby_curl_easy *rbce;\n" + " VALUE opts_dup;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (rbce->callback_active) {\n" + " rb_raise(rb_eRuntimeError, \"Cannot close an active curl handle within a callback\");\n" + " }\n" + "\n" + " opts_dup = rb_funcall(rbce->opts, rb_intern(\"dup\"), 0);\n" + "\n" + " curl_easy_reset(rbce->curl);\n" + " ruby_curl_easy_zero(rbce);\n" + "\n" + " curl_easy_setopt(rbce->curl, CURLOPT_ERRORBUFFER, &rbce->err_buf);\n" + "\n" + " /* reset clobbers the private setting, so reset it to self */\n" + " ecode = curl_easy_setopt(rbce->curl, CURLOPT_PRIVATE, (void*)self);\n" + " if (ecode != CURLE_OK) {\n" + " raise_curl_easy_error_exception(ecode);\n" + " }\n" + "\n" + " /* Free everything up */\n" + " if (rbce->curl_headers) {\n" + " curl_slist_free_all(rbce->curl_headers);\n" + " rbce->curl_headers = NULL;\n" + " }\n" + "\n" + " /* Free everything up */\n" + " if (rbce->curl_proxy_headers) {\n" + " curl_slist_free_all(rbce->curl_proxy_headers);\n" + " rbce->curl_proxy_headers = NULL;\n" + " }\n" + "\n" + " return opts_dup;\n" + "}\n" + "\n" + "\n" + "/* ================ OBJ ATTRIBUTES ==================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.url => string\n" + " *\n" + " * Obtain the URL that will be used by subsequent calls to +perform+.\n" + " */\n" + "static VALUE ruby_curl_easy_url_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, url);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_url => string\n" + " *\n" + " * Obtain the HTTP Proxy URL that will be used by subsequent calls to +perform+.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_url_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, proxy_url);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.headers = \"Header: val\" => \"Header: val\"\n" + " * easy.headers = {\"Header\" => \"val\" ..., \"Header\" => \"val\"} => {\"Header: val\", ...}\n" + " * easy.headers = [\"Header: val\" ..., \"Header: val\"] => [\"Header: val\", ...]\n" + " *\n" + " * Set custom HTTP headers for following requests. This can be used to add\n" + " * custom headers, or override standard headers used by libcurl. It defaults to a\n" + " * Hash.\n" + " *\n" + " * For example to set a standard or custom header:\n" + " *\n" + " * easy.headers[\"MyHeader\"] = \"myval\"\n" + " *\n" + " * To remove a standard header (this is useful when removing libcurls default\n" + " * 'Expect: 100-Continue' header when using HTTP form posts):\n" + " *\n" + " * easy.headers[\"Expect\"] = ''\n" + " *\n" + " * Anything passed to libcurl as a header will be converted to a string during\n" + " * the perform step.\n" + " */\n" + "static VALUE ruby_curl_easy_headers_set(VALUE self, VALUE headers) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, headers);\n" + "}\n" + "\n" + "static VALUE ruby_curl_easy_proxy_headers_set(VALUE self, VALUE proxy_headers) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_headers);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.headers => Hash, Array or Str\n" + " *\n" + " * Obtain the custom HTTP headers for following requests.\n" + " */\n" + "static VALUE ruby_curl_easy_headers_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " VALUE headers;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " headers = rb_easy_get(\"headers\");//rb_hash_aref(rbce->opts, rb_intern(\"headers\"));\n" + " if (headers == Qnil) { headers = rb_easy_set(\"headers\", rb_hash_new()); }\n" + " return headers;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_headers = \"Header: val\" => \"Header: val\"\n" + " * easy.proxy_headers = {\"Header\" => \"val\" ..., \"Header\" => \"val\"} => {\"Header: val\", ...}\n" + " * easy.proxy_headers = [\"Header: val\" ..., \"Header: val\"] => [\"Header: val\", ...]\n" + " *\n" + " *\n" + " * For example to set a standard or custom header:\n" + " *\n" + " * easy.proxy_headers[\"MyHeader\"] = \"myval\"\n" + " *\n" + " * To remove a standard header (this is useful when removing libcurls default\n" + " * 'Expect: 100-Continue' header when using HTTP form posts):\n" + " *\n" + " * easy.proxy_headers[\"Expect\"] = ''\n" + " *\n" + " * Anything passed to libcurl as a header will be converted to a string during\n" + " * the perform step.\n" + " */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_headers => Hash, Array or Str\n" + " *\n" + " * Obtain the custom HTTP proxy_headers for following requests.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_headers_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " VALUE proxy_headers;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " proxy_headers = rb_easy_get(\"proxy_headers\");//rb_hash_aref(rbce->opts, rb_intern(\"proxy_headers\"));\n" + " if (proxy_headers == Qnil) { proxy_headers = rb_easy_set(\"proxy_headers\", rb_hash_new()); }\n" + " return proxy_headers;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.interface => string\n" + " *\n" + " * Obtain the interface name that is used as the outgoing network interface.\n" + " * The name can be an interface name, an IP address or a host name.\n" + " */\n" + "static VALUE ruby_curl_easy_interface_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, interface_hm);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.userpwd => string\n" + " *\n" + " * Obtain the username/password string that will be used for subsequent\n" + " * calls to +perform+.\n" + " */\n" + "static VALUE ruby_curl_easy_userpwd_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, userpwd);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxypwd => string\n" + " *\n" + " * Obtain the username/password string that will be used for proxy\n" + " * connection during subsequent calls to +perform+. The supplied string\n" + " * should have the form \"username:password\"\n" + " */\n" + "static VALUE ruby_curl_easy_proxypwd_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, proxypwd);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookies => \"name1=content1; name2=content2;\"\n" + " *\n" + " * Obtain the cookies for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cookies_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cookies);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookiefile => string\n" + " *\n" + " * Obtain the cookiefile file for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cookiefile_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cookiefile);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookiejar => string\n" + " *\n" + " * Obtain the cookiejar file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cookiejar_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cookiejar);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert = string => \"\"\n" + " *\n" + " * Set a cert file to use for this Curl::Easy instance. This file\n" + " * will be used to validate SSL connections.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_cert_set(VALUE self, VALUE cert) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert => string\n" + " *\n" + " * Obtain the cert file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cert_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert_key = \"cert_key.file\" => \"\"\n" + " *\n" + " * Set a cert key to use for this Curl::Easy instance. This file\n" + " * will be used to validate SSL certificates.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_cert_key_set(VALUE self, VALUE cert_key) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cert_key);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cert_key => \"cert_key.file\"\n" + " *\n" + " * Obtain the cert key file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cert_key_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cert_key);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cacert = string => \"\"\n" + " *\n" + " * Set a cacert bundle to use for this Curl::Easy instance. This file\n" + " * will be used to validate SSL certificates.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_cacert_set(VALUE self, VALUE cacert) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cacert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cacert => string\n" + " *\n" + " * Obtain the cacert file to use for this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_cacert_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, cacert);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.certpassword = string => \"\"\n" + " *\n" + " * Set a password used to open the specified cert\n" + " */\n" + "static VALUE ruby_curl_easy_certpassword_set(VALUE self, VALUE certpassword) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, certpassword);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.certtype = \"PEM|DER\" => \"\"\n" + " *\n" + " * Set a cert type to use for this Curl::Easy instance.\n" + " * Default is PEM\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_certtype_set(VALUE self, VALUE certtype) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, certtype);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.certtype => string\n" + " *\n" + " * Obtain the cert type used for this Curl::Easy instance\n" + " */\n" + "static VALUE ruby_curl_easy_certtype_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, certtype);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.encoding = string => string\n" + " *\n" + " * Set the accepted encoding types, curl will handle all of the decompression\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_encoding_set(VALUE self, VALUE encoding) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, encoding);\n" + "}\n" + "/*\n" + " * call-seq:\n" + " * easy.encoding => string\n" + " *\n" + " * Get the set encoding types\n" + " *\n" + "*/\n" + "static VALUE ruby_curl_easy_encoding_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, encoding);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.useragent = \"Ruby/Curb\" => \"\"\n" + " *\n" + " * Set the user agent string for this Curl::Easy instance\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_useragent_set(VALUE self, VALUE useragent) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, useragent);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.useragent => \"Ruby/Curb\"\n" + " *\n" + " * Obtain the user agent string used for this Curl::Easy instance\n" + " */\n" + "static VALUE ruby_curl_easy_useragent_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, useragent);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.post_body = \"some=form%20data&to=send\" => string or nil\n" + " *\n" + " * Sets the POST body of this Curl::Easy instance. This is expected to be\n" + " * URL encoded; no additional processing or encoding is done on the string.\n" + " * The content-type header will be set to application/x-www-form-urlencoded.\n" + " *\n" + " * This is handy if you want to perform a POST against a Curl::Multi instance.\n" + " */\n" + "static VALUE ruby_curl_easy_post_body_set(VALUE self, VALUE post_body) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + "\n" + " char *data;\n" + " long len;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " curl = rbce->curl;\n" + "\n" + " if ( post_body == Qnil ) {\n" + " rb_easy_del(\"postdata_buffer\");\n" + " curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);\n" + "\n" + " } else {\n" + " if (rb_type(post_body) == T_STRING) {\n" + " data = StringValuePtr(post_body);\n" + " len = RSTRING_LEN(post_body);\n" + " }\n" + " else if (rb_respond_to(post_body, rb_intern(\"to_s\"))) {\n" + " VALUE str_body = rb_funcall(post_body, rb_intern(\"to_s\"), 0);\n" + " data = StringValuePtr(str_body);\n" + " len = RSTRING_LEN(post_body);\n" + " }\n" + " else {\n" + " rb_raise(rb_eRuntimeError, \"post data must respond_to .to_s\");\n" + " }\n" + "\n" + " // Store the string, since it has to hang around for the duration of the\n" + " // request. See CURLOPT_POSTFIELDS in the libcurl docs.\n" + " //rbce->postdata_buffer = post_body;\n" + " rb_easy_set(\"postdata_buffer\", post_body);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_POST, 1);\n" + " curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);\n" + " curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, len);\n" + "\n" + " return post_body;\n" + " }\n" + "\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.post_body => string or nil\n" + " *\n" + " * Obtain the POST body used in this Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_post_body_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, postdata_buffer);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.put_data = data => \"\"\n" + " *\n" + " * Points this Curl::Easy instance to data to be uploaded via PUT. This\n" + " * sets the request to a PUT type request - useful if you want to PUT via\n" + " * a multi handle.\n" + " */\n" + "static VALUE ruby_curl_easy_put_data_set(VALUE self, VALUE data) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + " VALUE upload;\n" + " VALUE headers;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " upload = ruby_curl_upload_new(cCurlUpload);\n" + " ruby_curl_upload_stream_set(upload,data);\n" + "\n" + " curl = rbce->curl;\n" + " rb_easy_set(\"upload\", upload); /* keep the upload object alive as long as\n" + " the easy handle is active or until the upload\n" + " is complete or terminated... */\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_NOBODY, 0);\n" + " curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);\n" + " curl_easy_setopt(curl, CURLOPT_READFUNCTION, (curl_read_callback)read_data_handler);\n" + "#if HAVE_CURLOPT_SEEKFUNCTION\n" + " curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, (curl_seek_callback)seek_data_handler);\n" + "#endif\n" + " curl_easy_setopt(curl, CURLOPT_READDATA, rbce);\n" + "#if HAVE_CURLOPT_SEEKDATA\n" + " curl_easy_setopt(curl, CURLOPT_SEEKDATA, rbce);\n" + "#endif\n" + "\n" + " /*\n" + " * we need to set specific headers for the PUT to work... so\n" + " * convert the internal headers structure to a HASH if one is set\n" + " */\n" + " if (!rb_easy_nil(\"headers\")) {\n" + " if (rb_easy_type_check(\"headers\", T_ARRAY) || rb_easy_type_check(\"headers\", T_STRING)) {\n" + " rb_raise(rb_eRuntimeError, \"Must set headers as a HASH to modify the headers in an PUT request\");\n" + " }\n" + " }\n" + "\n" + " // exit fast if the payload is empty\n" + " if (NIL_P(data)) { return data; }\n" + "\n" + " headers = rb_easy_get(\"headers\");\n" + " if( headers == Qnil ) {\n" + " headers = rb_hash_new();\n" + " }\n" + "\n" + " if (rb_respond_to(data, rb_intern(\"read\"))) {\n" + " VALUE stat = rb_funcall(data, rb_intern(\"stat\"), 0);\n" + " if( stat && rb_hash_aref(headers, rb_str_new2(\"Content-Length\")) == Qnil) {\n" + " VALUE size;\n" + " if( rb_hash_aref(headers, rb_str_new2(\"Expect\")) == Qnil ) {\n" + " rb_hash_aset(headers, rb_str_new2(\"Expect\"), rb_str_new2(\"\"));\n" + " }\n" + " size = rb_funcall(stat, rb_intern(\"size\"), 0);\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, NUM2LONG(size));\n" + " }\n" + " else if( rb_hash_aref(headers, rb_str_new2(\"Content-Length\")) == Qnil && rb_hash_aref(headers, rb_str_new2(\"Transfer-Encoding\")) == Qnil ) {\n" + " rb_hash_aset(headers, rb_str_new2(\"Transfer-Encoding\"), rb_str_new2(\"chunked\"));\n" + " }\n" + " else if( rb_hash_aref(headers, rb_str_new2(\"Content-Length\")) ) {\n" + " VALUE size = rb_funcall(rb_hash_aref(headers, rb_str_new2(\"Content-Length\")), rb_intern(\"to_i\"), 0);\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, NUM2LONG(size));\n" + " }\n" + " }\n" + " else if (rb_respond_to(data, rb_intern(\"to_s\"))) {\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, RSTRING_LEN(data));\n" + " if( rb_hash_aref(headers, rb_str_new2(\"Expect\")) == Qnil ) {\n" + " rb_hash_aset(headers, rb_str_new2(\"Expect\"), rb_str_new2(\"\"));\n" + " }\n" + " }\n" + " else {\n" + " rb_raise(rb_eRuntimeError, \"PUT data must respond to read or to_s\");\n" + " }\n" + " rb_easy_set(\"headers\",headers);\n" + "\n" + " // if we made it this far, all should be well.\n" + " return data;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_commands = [\"CWD /\", \"MKD directory\"] => [\"CWD /\", ...]\n" + " *\n" + " * Explicitly sets the list of commands to execute on the FTP server when calling perform\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_commands_set(VALUE self, VALUE ftp_commands) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, ftp_commands);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_commands => array or nil\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_commands_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, ftp_commands);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve = [ \"example.com:80:127.0.0.1\" ] => [ \"example.com:80:127.0.0.1\" ]\n" + " *\n" + " * Set the resolve list to statically resolve hostnames to IP addresses,\n" + " * bypassing DNS for matching hostname/port combinations.\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_set(VALUE self, VALUE resolve) {\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, resolve);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve => array or nil\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, resolve);\n" + "}\n" + "\n" + "/* ================== IMMED ATTRS ==================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the local port that will be used for the following +perform+ calls.\n" + " *\n" + " * Passing +nil+ will return to the default behaviour (no local port\n" + " * preference).\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_set(VALUE self, VALUE local_port) {\n" + " CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port, \"port\");\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port => fixnum or nil\n" + " *\n" + " * Obtain the local port that will be used for the following +perform+ calls.\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_get(VALUE self) {\n" + " CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port_range = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the local port range that will be used for the following +perform+\n" + " * calls. This is a number (between 0 and 65535) that determines how far\n" + " * libcurl may deviate from the supplied +local_port+ in order to find\n" + " * an available port.\n" + " *\n" + " * If you set +local_port+ it's also recommended that you set this, since\n" + " * it is fairly likely that your specified port will be unavailable.\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_range_set(VALUE self, VALUE local_port_range) {\n" + " CURB_IMMED_PORT_SETTER(ruby_curl_easy, local_port_range, \"port range\");\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.local_port_range => fixnum or nil\n" + " *\n" + " * Obtain the local port range that will be used for the following +perform+\n" + " * calls.\n" + " *\n" + " * This option is ignored if compiled against libcurl < 7.15.2.\n" + " */\n" + "static VALUE ruby_curl_easy_local_port_range_get(VALUE self) {\n" + " CURB_IMMED_PORT_GETTER(ruby_curl_easy, local_port_range);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_port = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the proxy port that will be used for the following +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_port_set(VALUE self, VALUE proxy_port) {\n" + " CURB_IMMED_PORT_SETTER(ruby_curl_easy, proxy_port, \"port\");\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_port => fixnum or nil\n" + " *\n" + " * Obtain the proxy port that will be used for the following +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_port_get(VALUE self) {\n" + " CURB_IMMED_PORT_GETTER(ruby_curl_easy, proxy_port);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_type = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the proxy type that will be used for the following +perform+ calls.\n" + " * This should be one of the Curl::CURLPROXY constants.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_type_set(VALUE self, VALUE proxy_type) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, proxy_type, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_type => fixnum or nil\n" + " *\n" + " * Obtain the proxy type that will be used for the following +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_type_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, proxy_type, -1);\n" + "}\n" + "\n" + "#if defined(HAVE_CURLAUTH_DIGEST_IE)\n" + "#define CURL_HTTPAUTH_STR_TO_NUM(node) \\\n" + " (!strncmp(\"basic\",node,5)) ? CURLAUTH_BASIC : \\\n" + " (!strncmp(\"digest_ie\",node,9)) ? CURLAUTH_DIGEST_IE : \\\n" + " (!strncmp(\"digest\",node,6)) ? CURLAUTH_DIGEST : \\\n" + " (!strncmp(\"gssnegotiate\",node,12)) ? CURLAUTH_GSSNEGOTIATE : \\\n" + " (!strncmp(\"ntlm\",node,4)) ? CURLAUTH_NTLM : \\\n" + " (!strncmp(\"anysafe\",node,7)) ? CURLAUTH_ANYSAFE : \\\n" + " (!strncmp(\"any\",node,3)) ? CURLAUTH_ANY : 0\n" + "#else\n" + "#define CURL_HTTPAUTH_STR_TO_NUM(node) \\\n" + " (!strncmp(\"basic\",node,5)) ? CURLAUTH_BASIC : \\\n" + " (!strncmp(\"digest\",node,6)) ? CURLAUTH_DIGEST : \\\n" + " (!strncmp(\"gssnegotiate\",node,12)) ? CURLAUTH_GSSNEGOTIATE : \\\n" + " (!strncmp(\"ntlm\",node,4)) ? CURLAUTH_NTLM : \\\n" + " (!strncmp(\"anysafe\",node,7)) ? CURLAUTH_ANYSAFE : \\\n" + " (!strncmp(\"any\",node,3)) ? CURLAUTH_ANY : 0\n" + "#endif\n" + "/*\n" + " * call-seq:\n" + " * easy.http_auth_types = fixnum or nil => fixnum or nil\n" + " * easy.http_auth_types = [:basic,:digest,:digest_ie,:gssnegotiate, :ntlm, :any, :anysafe]\n" + " *\n" + " * Set the HTTP authentication types that may be used for the following\n" + " * +perform+ calls. This is a bitmap made by ORing together the\n" + " * Curl::CURLAUTH constants.\n" + " */\n" + "static VALUE ruby_curl_easy_http_auth_types_set(int argc, VALUE *argv, VALUE self) {//VALUE self, VALUE http_auth_types) {\n" + " ruby_curl_easy *rbce;\n" + " VALUE args_ary;\n" + " long i, len;\n" + " char* node = NULL;\n" + " long mask = 0;\n" + "\n" + " rb_scan_args(argc, argv, \"*\", &args_ary);\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " len = RARRAY_LEN(args_ary);\n" + "\n" + " if (len == 1 && (rb_ary_entry(args_ary,0) == Qnil || TYPE(rb_ary_entry(args_ary,0)) == T_FIXNUM ||\n" + " TYPE(rb_ary_entry(args_ary,0)) == T_BIGNUM)) {\n" + " if (rb_ary_entry(args_ary,0) == Qnil) {\n" + " rbce->http_auth_types = 0;\n" + " }\n" + " else {\n" + " rbce->http_auth_types = NUM2LONG(rb_ary_entry(args_ary,0));\n" + " }\n" + " }\n" + " else {\n" + " // we could have multiple values, but they should be symbols\n" + " node = RSTRING_PTR(rb_funcall(rb_ary_entry(args_ary,0),rb_intern(\"to_s\"),0));\n" + " mask = CURL_HTTPAUTH_STR_TO_NUM(node);\n" + " for( i = 1; i < len; ++i ) {\n" + " node = RSTRING_PTR(rb_funcall(rb_ary_entry(args_ary,i),rb_intern(\"to_s\"),0));\n" + " mask |= CURL_HTTPAUTH_STR_TO_NUM(node);\n" + " }\n" + " rbce->http_auth_types = mask;\n" + " }\n" + " return LONG2NUM(rbce->http_auth_types);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_auth_types => fixnum or nil\n" + " *\n" + " * Obtain the HTTP authentication types that may be used for the following\n" + " * +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_http_auth_types_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, http_auth_types, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_auth_types = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the proxy authentication types that may be used for the following\n" + " * +perform+ calls. This is a bitmap made by ORing together the\n" + " * Curl::CURLAUTH constants.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_auth_types_set(VALUE self, VALUE proxy_auth_types) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, proxy_auth_types, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_auth_types => fixnum or nil\n" + " *\n" + " * Obtain the proxy authentication types that may be used for the following\n" + " * +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_auth_types_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, proxy_auth_types, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_redirects = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum number of redirections to follow in the following +perform+\n" + " * calls. Set to nil or -1 allow an infinite number (the default). Setting this\n" + " * option only makes sense if +follow_location+ is also set true.\n" + " *\n" + " * With libcurl >= 7.15.1, setting this to 0 will cause libcurl to refuse any\n" + " * redirect.\n" + " */\n" + "static VALUE ruby_curl_easy_max_redirects_set(VALUE self, VALUE max_redirs) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, max_redirs, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_redirects => fixnum or nil\n" + " *\n" + " * Obtain the maximum number of redirections to follow in the following\n" + " * +perform+ calls.\n" + " */\n" + "static VALUE ruby_curl_easy_max_redirects_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, max_redirs, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout = float, fixnum or nil => numeric\n" + " *\n" + " * Set the maximum time in seconds that you allow the libcurl transfer\n" + " * operation to take. Normally, name lookups can take a considerable time\n" + " * and limiting operations to less than a few minutes risk aborting\n" + " * perfectly normal operations.\n" + " *\n" + " * Set to nil (or zero) to disable timeout (it will then only timeout\n" + " * on the system's internal timeouts).\n" + " *\n" + " * Uses timeout_ms internally instead of timeout because it allows for\n" + " * better precision and libcurl will use the last set value when both\n" + " * timeout and timeout_ms are set.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_set(VALUE self, VALUE timeout_s) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (Qnil == timeout_s || NUM2DBL(timeout_s) <= 0.0) {\n" + " rbce->timeout_ms = 0;\n" + " } else {\n" + " rbce->timeout_ms = (unsigned long)(NUM2DBL(timeout_s) * 1000);\n" + " }\n" + "\n" + " return DBL2NUM(rbce->timeout_ms / 1000.0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout => numeric\n" + " *\n" + " * Obtain the maximum time in seconds that you allow the libcurl transfer\n" + " * operation to take.\n" + " *\n" + " * Uses timeout_ms internally instead of timeout.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return DBL2NUM(rbce->timeout_ms / 1000.0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout_ms = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum time in milliseconds that you allow the libcurl transfer\n" + " * operation to take. Normally, name lookups can take a considerable time\n" + " * and limiting operations to less than a few minutes risk aborting\n" + " * perfectly normal operations.\n" + " *\n" + " * Set to nil (or zero) to disable timeout (it will then only timeout\n" + " * on the system's internal timeouts).\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_ms_set(VALUE self, VALUE timeout_ms) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (Qnil == timeout_ms || NUM2DBL(timeout_ms) <= 0.0) {\n" + " rbce->timeout_ms = 0;\n" + " } else {\n" + " rbce->timeout_ms = NUM2ULONG(timeout_ms);\n" + " }\n" + "\n" + " return ULONG2NUM(rbce->timeout_ms);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.timeout_ms => fixnum or nil\n" + " *\n" + " * Obtain the maximum time in milliseconds that you allow the libcurl transfer\n" + " * operation to take.\n" + " */\n" + "static VALUE ruby_curl_easy_timeout_ms_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return LONG2NUM(rbce->timeout_ms);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum time in seconds that you allow the connection to the\n" + " * server to take. This only limits the connection phase, once it has\n" + " * connected, this option is of no more use.\n" + " *\n" + " * Set to nil (or zero) to disable connection timeout (it will then only\n" + " * timeout on the system's internal timeouts).\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_set(VALUE self, VALUE connect_timeout) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout => fixnum or nil\n" + " *\n" + " * Obtain the maximum time in seconds that you allow the connection to the\n" + " * server to take.\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout_ms = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximum time in milliseconds that you allow the connection to the\n" + " * server to take. This only limits the connection phase, once it has\n" + " * connected, this option is of no more use.\n" + " *\n" + " * Set to nil (or zero) to disable connection timeout (it will then only\n" + " * timeout on the system's internal timeouts).\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_ms_set(VALUE self, VALUE connect_timeout_ms) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, connect_timeout_ms, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_timeout_ms => fixnum or nil\n" + " *\n" + " * Obtain the maximum time in milliseconds that you allow the connection to the\n" + " * server to take.\n" + " */\n" + "static VALUE ruby_curl_easy_connect_timeout_ms_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, connect_timeout_ms, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.dns_cache_timeout = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the dns cache timeout in seconds. Name resolves will be kept in\n" + " * memory for this number of seconds. Set to zero (0) to completely disable\n" + " * caching, or set to nil (or -1) to make the cached entries remain forever.\n" + " * By default, libcurl caches this info for 60 seconds.\n" + " */\n" + "static VALUE ruby_curl_easy_dns_cache_timeout_set(VALUE self, VALUE dns_cache_timeout) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, dns_cache_timeout, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.dns_cache_timeout => fixnum or nil\n" + " *\n" + " * Obtain the dns cache timeout in seconds.\n" + " */\n" + "static VALUE ruby_curl_easy_dns_cache_timeout_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, dns_cache_timeout, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_response_timeout = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set a timeout period (in seconds) on the amount of time that the server\n" + " * is allowed to take in order to generate a response message for a command\n" + " * before the session is considered hung. While curl is waiting for a\n" + " * response, this value overrides +timeout+. It is recommended that if used\n" + " * in conjunction with +timeout+, you set +ftp_response_timeout+ to a value\n" + " * smaller than +timeout+.\n" + " *\n" + " * Ignored if libcurl version is < 7.10.8.\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_response_timeout_set(VALUE self, VALUE ftp_response_timeout) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ftp_response_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_response_timeout => fixnum or nil\n" + " *\n" + " * Obtain the maximum time that libcurl will wait for FTP command responses.\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_response_timeout_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ftp_response_timeout, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_limit = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the transfer speed (in bytes per second) that the transfer should be\n" + " * below during +low_speed_time+ seconds for the library to consider it too\n" + " * slow and abort.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_limit_set(VALUE self, VALUE low_speed_limit) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, low_speed_limit, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_limit => fixnum or nil\n" + " *\n" + " * Obtain the minimum transfer speed over +low_speed+time+ below which the\n" + " * transfer will be aborted.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_limit_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, low_speed_limit, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_time = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the time (in seconds) that the transfer should be below the\n" + " * +low_speed_limit+ for the library to consider it too slow and abort.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_time_set(VALUE self, VALUE low_speed_time) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, low_speed_time, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.low_speed_time => fixnum or nil\n" + " *\n" + " * Obtain the time that the transfer should be below +low_speed_limit+ for\n" + " * the library to abort it.\n" + " */\n" + "static VALUE ruby_curl_easy_low_speed_time_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, low_speed_time, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_send_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximal sending transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_send_speed_large_set(VALUE self, VALUE max_send_speed_large) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, max_send_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_send_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Get the maximal sending transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_send_speed_large_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, max_send_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_recv_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Set the maximal receiving transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_recv_speed_large_set(VALUE self, VALUE max_recv_speed_large) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, max_recv_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.max_recv_speed_large = fixnum or nil => fixnum or nil\n" + " *\n" + " * Get the maximal receiving transfer speed (in bytes per second) \n" + " */\n" + "static VALUE ruby_curl_easy_max_recv_speed_large_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, max_recv_speed_large, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.username = string => string\n" + " *\n" + " * Set the HTTP Authentication username.\n" + " */\n" + "static VALUE ruby_curl_easy_username_set(VALUE self, VALUE username) {\n" + "#if HAVE_CURLOPT_USERNAME\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, username);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.username => string\n" + " *\n" + " * Get the current username\n" + " */\n" + "static VALUE ruby_curl_easy_username_get(VALUE self) {\n" + "#if HAVE_CURLOPT_USERNAME\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, username);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.password = string => string\n" + " *\n" + " * Set the HTTP Authentication password.\n" + " */\n" + "static VALUE ruby_curl_easy_password_set(VALUE self, VALUE password) {\n" + "#if HAVE_CURLOPT_PASSWORD\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, password);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.password => string\n" + " *\n" + " * Get the current password\n" + " */\n" + "static VALUE ruby_curl_easy_password_get(VALUE self) {\n" + "#if HAVE_CURLOPT_PASSWORD\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, password);\n" + "#else\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_version = value => fixnum or nil\n" + " *\n" + " * Sets the version of SSL/TLS that libcurl will attempt to use. Valid\n" + " * options are:\n" + " *\n" + " * Curl::CURL_SSLVERSION_DEFAULT\n" + " * Curl::CURL_SSLVERSION_TLSv1 (TLS 1.x)\n" + " * Curl::CURL_SSLVERSION_SSLv2\n" + " * Curl::CURL_SSLVERSION_SSLv3\n" + " * Curl::CURL_SSLVERSION_TLSv1_0\n" + " * Curl::CURL_SSLVERSION_TLSv1_1\n" + " * Curl::CURL_SSLVERSION_TLSv1_2\n" + " * Curl::CURL_SSLVERSION_TLSv1_3\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_version_set(VALUE self, VALUE ssl_version) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ssl_version, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_version => fixnum\n" + " *\n" + " * Get the version of SSL/TLS that libcurl will attempt to use.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_version_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ssl_version, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_ssl = value => fixnum or nil\n" + " *\n" + " * Ensure libcurl uses SSL for FTP connections. Valid options are Curl::CURL_USESSL_NONE,\n" + " * Curl::CURL_USESSL_TRY, Curl::CURL_USESSL_CONTROL, and Curl::CURL_USESSL_ALL.\n" + " */\n" + "static VALUE ruby_curl_easy_use_ssl_set(VALUE self, VALUE use_ssl) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, use_ssl, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_ssl => fixnum\n" + " *\n" + " * Get the desired level for using SSL on FTP connections.\n" + " */\n" + "static VALUE ruby_curl_easy_use_ssl_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, use_ssl, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_filemethod = value => fixnum or nil\n" + " *\n" + " * Controls how libcurl reaches files on the server. Valid options are Curl::CURL_MULTICWD,\n" + " * Curl::CURL_NOCWD, and Curl::CURL_SINGLECWD (see libcurl docs for CURLOPT_FTP_METHOD).\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_filemethod_set(VALUE self, VALUE ftp_filemethod) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ftp_filemethod, -1);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_filemethod => fixnum\n" + " *\n" + " * Get the configuration for how libcurl will reach files on the server.\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_filemethod_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ftp_filemethod, -1);\n" + "}\n" + "\n" + "/* ================== BOOL ATTRS ===================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_tunnel = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will use proxy tunneling.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_tunnel_set(VALUE self, VALUE proxy_tunnel) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, proxy_tunnel);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.proxy_tunnel? => boolean\n" + " *\n" + " * Determine whether this Curl instance will use proxy tunneling.\n" + " */\n" + "static VALUE ruby_curl_easy_proxy_tunnel_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, proxy_tunnel);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.fetch_file_time = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will fetch remote file\n" + " * times, if available.\n" + " */\n" + "static VALUE ruby_curl_easy_fetch_file_time_set(VALUE self, VALUE fetch_file_time) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, fetch_file_time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.fetch_file_time? => boolean\n" + " *\n" + " * Determine whether this Curl instance will fetch remote file\n" + " * times, if available.\n" + " */\n" + "static VALUE ruby_curl_easy_fetch_file_time_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, fetch_file_time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_peer = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will verify the SSL peer\n" + " * certificate. When true (the default), and the verification fails to\n" + " * prove that the certificate is authentic, the connection fails. When\n" + " * false, the connection succeeds regardless.\n" + " *\n" + " * Authenticating the certificate is not by itself very useful. You\n" + " * typically want to ensure that the server, as authentically identified\n" + " * by its certificate, is the server you mean to be talking to.\n" + " * The ssl_verify_host? options controls that.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_peer_set(VALUE self, VALUE ssl_verify_peer) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, ssl_verify_peer);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_peer? => boolean\n" + " *\n" + " * Determine whether this Curl instance will verify the SSL peer\n" + " * certificate.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_peer_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, ssl_verify_peer);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_host = [0, 1, 2] => [0, 1, 2]\n" + " *\n" + " * Configure whether this Curl instance will verify that the server cert\n" + " * is for the server it is known as. When true (the default) the server\n" + " * certificate must indicate that the server is the server to which you\n" + " * meant to connect, or the connection fails. When false, the connection\n" + " * will succeed regardless of the names in the certificate.\n" + " *\n" + " * this option controls is of the identity that the server claims.\n" + " * The server could be lying. To control lying, see ssl_verify_peer? .\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_host_set(VALUE self, VALUE ssl_verify_host) {\n" + " CURB_IMMED_SETTER(ruby_curl_easy, ssl_verify_host, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_host => number\n" + " *\n" + " * Determine whether this Curl instance will verify that the server cert\n" + " * is for the server it is known as.\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_host_get(VALUE self) {\n" + " CURB_IMMED_GETTER(ruby_curl_easy, ssl_verify_host, 0);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_in_body = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will return HTTP headers\n" + " * combined with body data. If this option is set true, both header\n" + " * and body data will go to +body_str+ (or the configured +on_body+ handler).\n" + " */\n" + "static VALUE ruby_curl_easy_header_in_body_set(VALUE self, VALUE header_in_body) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, header_in_body);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_in_body? => boolean\n" + " *\n" + " * Determine whether this Curl instance will return HTTP headers\n" + " * combined with body data.\n" + " */\n" + "static VALUE ruby_curl_easy_header_in_body_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, header_in_body);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_netrc = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance will use data from the user's\n" + " * .netrc file for FTP connections.\n" + " */\n" + "static VALUE ruby_curl_easy_use_netrc_set(VALUE self, VALUE use_netrc) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, use_netrc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.use_netrc? => boolean\n" + " *\n" + " * Determine whether this Curl instance will use data from the user's\n" + " * .netrc file for FTP connections.\n" + " */\n" + "static VALUE ruby_curl_easy_use_netrc_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, use_netrc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " *\n" + " * easy = Curl::Easy.new\n" + " * easy.autoreferer=true\n" + " */\n" + "static VALUE ruby_curl_easy_autoreferer_set(VALUE self, VALUE autoreferer) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (Qtrue == autoreferer) {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_AUTOREFERER, 1);\n" + " }\n" + " else {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_AUTOREFERER, 0);\n" + " }\n" + "\n" + " return autoreferer;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.follow_location? => boolean\n" + " *\n" + " * Determine whether this Curl instance will follow Location: headers\n" + " * in HTTP responses.\n" + " */\n" + "static VALUE ruby_curl_easy_follow_location_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, follow_location);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.unrestricted_auth = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance may use any HTTP authentication\n" + " * method available when necessary.\n" + " */\n" + "static VALUE ruby_curl_easy_unrestricted_auth_set(VALUE self, VALUE unrestricted_auth) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, unrestricted_auth);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.unrestricted_auth? => boolean\n" + " *\n" + " * Determine whether this Curl instance may use any HTTP authentication\n" + " * method available when necessary.\n" + " */\n" + "static VALUE ruby_curl_easy_unrestricted_auth_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, unrestricted_auth);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.verbose = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance gives verbose output to STDERR\n" + " * during transfers. Ignored if this instance has an on_debug handler.\n" + " */\n" + "static VALUE ruby_curl_easy_verbose_set(VALUE self, VALUE verbose) {\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, verbose);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.verbose? => boolean\n" + " *\n" + " * Determine whether this Curl instance gives verbose output to STDERR\n" + " * during transfers.\n" + " */\n" + "static VALUE ruby_curl_easy_verbose_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, verbose);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multipart_form_post = boolean => boolean\n" + " *\n" + " * Configure whether this Curl instance uses multipart/formdata content\n" + " * type for HTTP POST requests. If this is false (the default), then the\n" + " * application/x-www-form-urlencoded content type is used for the form\n" + " * data.\n" + " *\n" + " * If this is set true, you must pass one or more PostField instances\n" + " * to the http_post method - no support for posting multipart forms from\n" + " * a string is provided.\n" + " */\n" + "static VALUE ruby_curl_easy_multipart_form_post_set(VALUE self, VALUE multipart_form_post)\n" + "{\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, multipart_form_post);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multipart_form_post? => boolean\n" + " *\n" + " * Determine whether this Curl instance uses multipart/formdata content\n" + " * type for HTTP POST requests.\n" + " */\n" + "static VALUE ruby_curl_easy_multipart_form_post_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, multipart_form_post);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.enable_cookies = boolean => boolean\n" + " *\n" + " * Configure whether the libcurl cookie engine is enabled for this Curl::Easy\n" + " * instance.\n" + " */\n" + "static VALUE ruby_curl_easy_enable_cookies_set(VALUE self, VALUE enable_cookies)\n" + "{\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, enable_cookies);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.enable_cookies? => boolean\n" + " *\n" + " * Determine whether the libcurl cookie engine is enabled for this\n" + " * Curl::Easy instance.\n" + " */\n" + "static VALUE ruby_curl_easy_enable_cookies_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, enable_cookies);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ignore_content_length = boolean\n" + " *\n" + " * Configure whether this Curl::Easy instance should ignore the content\n" + " * length header.\n" + " */\n" + "static VALUE ruby_curl_easy_ignore_content_length_set(VALUE self, VALUE ignore_content_length)\n" + "{\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, ignore_content_length);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ignore_content_length? => boolean\n" + " *\n" + " * Determine whether this Curl::Easy instance ignores the content\n" + " * length header.\n" + " */\n" + "static VALUE ruby_curl_easy_ignore_content_length_q(VALUE self) {\n" + " CURB_BOOLEAN_GETTER(ruby_curl_easy, ignore_content_length);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve_mode => symbol\n" + " *\n" + " * Determines what type of IP address this Curl::Easy instance\n" + " * resolves DNS names to.\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_mode(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " unsigned short rm;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " rm = rbce->resolve_mode;\n" + "\n" + " switch(rm) {\n" + " case CURL_IPRESOLVE_V4:\n" + " return rb_easy_sym(\"ipv4\");\n" + " case CURL_IPRESOLVE_V6:\n" + " return rb_easy_sym(\"ipv6\");\n" + " default:\n" + " return rb_easy_sym(\"auto\");\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.resolve_mode = symbol => symbol\n" + " *\n" + " * Configures what type of IP address this Curl::Easy instance\n" + " * resolves DNS names to. Valid options are:\n" + " *\n" + " * [:auto] resolves DNS names to all IP versions your system allows\n" + " * [:ipv4] resolves DNS names to IPv4 only\n" + " * [:ipv6] resolves DNS names to IPv6 only\n" + " */\n" + "static VALUE ruby_curl_easy_resolve_mode_set(VALUE self, VALUE resolve_mode) {\n" + " if (TYPE(resolve_mode) != T_SYMBOL) {\n" + " rb_raise(rb_eTypeError, \"Must pass a symbol\");\n" + " return Qnil;\n" + " } else {\n" + " ruby_curl_easy *rbce;\n" + " ID resolve_mode_id;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " resolve_mode_id = rb_to_id(resolve_mode);\n" + "\n" + " if (resolve_mode_id == rb_intern(\"auto\")) {\n" + " rbce->resolve_mode = CURL_IPRESOLVE_WHATEVER;\n" + " return resolve_mode;\n" + " } else if (resolve_mode_id == rb_intern(\"ipv4\")) {\n" + " rbce->resolve_mode = CURL_IPRESOLVE_V4;\n" + " return resolve_mode;\n" + " } else if (resolve_mode_id == rb_intern(\"ipv6\")) {\n" + " rbce->resolve_mode = CURL_IPRESOLVE_V6;\n" + " return resolve_mode;\n" + " } else {\n" + " rb_raise(rb_eArgError, \"Must set to one of :auto, :ipv4, :ipv6\");\n" + " return Qnil;\n" + " }\n" + " }\n" + "}\n" + "\n" + "\n" + "/* ================= EVENT PROCS ================== */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_body { |body_data| ... } => \n" + " *\n" + " * Assign or remove the +on_body+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_body+ handler is called for each chunk of response body passed back\n" + " * by libcurl during +perform+. It should perform any processing necessary,\n" + " * and return the actual number of bytes handled. Normally, this will\n" + " * equal the length of the data string, and CURL will continue processing.\n" + " * If the returned length does not equal the input length, CURL will abort\n" + " * the processing with a Curl::Err::AbortedByCallbackError.\n" + " */\n" + "static VALUE ruby_curl_easy_on_body_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, body_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_success { |easy| ... } => \n" + " *\n" + " * Assign or remove the +on_success+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_success+ handler is called when the request is finished with a\n" + " * status of 20x\n" + " */\n" + "static VALUE ruby_curl_easy_on_success_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, success_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_failure {|easy,code| ... } => \n" + " *\n" + " * Assign or remove the +on_failure+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_failure+ handler is called when the request is finished with a\n" + " * status of 50x\n" + " */\n" + "static VALUE ruby_curl_easy_on_failure_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, failure_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_missing {|easy,code| ... } => \n" + " *\n" + " * Assign or remove the on_missing handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no attached\n" + " * block.\n" + " *\n" + " * The +on_missing+ handler is called when request is finished with a\n" + " * status of 40x\n" + " */\n" + "static VALUE ruby_curl_easy_on_missing_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, missing_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_redirect {|easy,code| ... } => \n" + " *\n" + " * Assign or remove the on_redirect handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no attached\n" + " * block.\n" + " *\n" + " * The +on_redirect+ handler is called when request is finished with a\n" + " * status of 30x\n" + " */\n" + "static VALUE ruby_curl_easy_on_redirect_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, redirect_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_complete {|easy| ... } => \n" + " *\n" + " * Assign or remove the +on_complete+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_complete+ handler is called when the request is finished.\n" + " */\n" + "static VALUE ruby_curl_easy_on_complete_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, complete_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_header { |header_data| ... } => \n" + " *\n" + " * Assign or remove the +on_header+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_header+ handler is called for each chunk of response header passed\n" + " * back by libcurl during +perform+. The semantics are the same as for the\n" + " * block supplied to +on_body+.\n" + " */\n" + "static VALUE ruby_curl_easy_on_header_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, header_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_progress { |dl_total, dl_now, ul_total, ul_now| ... } => \n" + " *\n" + " * Assign or remove the +on_progress+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_progress+ handler is called regularly by libcurl (approximately once\n" + " * per second) during transfers to allow the application to receive progress\n" + " * information. There is no guarantee that the reported progress will change\n" + " * between calls.\n" + " *\n" + " * The result of the block call determines whether libcurl continues the transfer.\n" + " * Returning a non-true value (i.e. nil or false) will cause the transfer to abort,\n" + " * throwing a Curl::Err::AbortedByCallbackError.\n" + " */\n" + "static VALUE ruby_curl_easy_on_progress_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, progress_proc);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.on_debug { |type, data| ... } => \n" + " *\n" + " * Assign or remove the +on_debug+ handler for this Curl::Easy instance.\n" + " * To remove a previously-supplied handler, call this method with no\n" + " * attached block.\n" + " *\n" + " * The +on_debug+ handler, if configured, will receive detailed information\n" + " * from libcurl during the perform call. This can be useful for debugging.\n" + " * Setting a debug handler overrides libcurl's internal handler, disabling\n" + " * any output from +verbose+, if set.\n" + " *\n" + " * The type argument will match one of the Curl::Easy::CURLINFO_XXXX\n" + " * constants, and specifies the kind of information contained in the\n" + " * data. The data is passed as a String.\n" + " */\n" + "static VALUE ruby_curl_easy_on_debug_set(int argc, VALUE *argv, VALUE self) {\n" + " CURB_HANDLER_PROC_HSETTER(ruby_curl_easy, debug_proc);\n" + "}\n" + "\n" + "\n" + "/* =================== PERFORM =====================*/\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up http headers.\n" + " */\n" + "static VALUE cb_each_http_header(VALUE header, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE header_str = Qnil;\n" + "\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " //rb_p(header);\n" + "\n" + " if (rb_type(header) == T_ARRAY) {\n" + " // we're processing a hash, header is [name, val]\n" + " VALUE name, value;\n" + "\n" + " name = rb_obj_as_string(rb_ary_entry(header, 0));\n" + " value = rb_obj_as_string(rb_ary_entry(header, 1));\n" + " if (rb_str_strlen(value) == 0) { // removing the header e.g. Accept: with nothing trailing should remove it see: https://curl.se/libcurl/c/CURLOPT_HTTPHEADER.html\n" + " header_str = rb_str_plus(name, rb_str_new2(\":\"));\n" + " } else {\n" + " // This is a bit inefficient, but we don't want to be modifying\n" + " // the actual values in the original hash.\n" + " header_str = rb_str_plus(name, rb_str_new2(\": \"));\n" + " header_str = rb_str_plus(header_str, value);\n" + " }\n" + " } else {\n" + " header_str = rb_obj_as_string(header);\n" + " }\n" + "\n" + " //rb_p(header_str);\n" + "\n" + " *list = curl_slist_append(*list, StringValuePtr(header_str));\n" + " return header_str;\n" + "}\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up http proxy headers.\n" + " */\n" + "static VALUE cb_each_http_proxy_header(VALUE proxy_header, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE proxy_header_str = Qnil;\n" + "\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " //rb_p(proxy_header);\n" + "\n" + " if (rb_type(proxy_header) == T_ARRAY) {\n" + " // we're processing a hash, proxy header is [name, val]\n" + " VALUE name, value;\n" + "\n" + " name = rb_obj_as_string(rb_ary_entry(proxy_header, 0));\n" + " value = rb_obj_as_string(rb_ary_entry(proxy_header, 1));\n" + "\n" + " // This is a bit inefficient, but we don't want to be modifying\n" + " // the actual values in the original hash.\n" + " proxy_header_str = rb_str_plus(name, rb_str_new2(\": \"));\n" + " proxy_header_str = rb_str_plus(proxy_header_str, value);\n" + " } else {\n" + " proxy_header_str = rb_obj_as_string(proxy_header);\n" + " }\n" + "\n" + " //rb_p(header_str);\n" + "\n" + " *list = curl_slist_append(*list, StringValuePtr(proxy_header_str));\n" + " return proxy_header_str;\n" + "}\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up ftp commands.\n" + " */\n" + "static VALUE cb_each_ftp_command(VALUE ftp_command, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE ftp_command_string;\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " ftp_command_string = rb_obj_as_string(ftp_command);\n" + " *list = curl_slist_append(*list, StringValuePtr(ftp_command));\n" + "\n" + " return ftp_command_string;\n" + "}\n" + "\n" + "/***********************************************\n" + " * This is an rb_iterate callback used to set up the resolve list.\n" + " */\n" + "static VALUE cb_each_resolve(VALUE resolve, VALUE wrap, int _c, const VALUE *_ptr, VALUE unused) {\n" + " struct curl_slist **list;\n" + " VALUE resolve_string;\n" + " Data_Get_Struct(wrap, struct curl_slist *, list);\n" + "\n" + " resolve_string = rb_obj_as_string(resolve);\n" + " *list = curl_slist_append(*list, StringValuePtr(resolve));\n" + "\n" + " return resolve_string;\n" + "}\n" + "\n" + "/***********************************************\n" + " *\n" + " * Setup a connection\n" + " *\n" + " * Always returns Qtrue, rb_raise on error.\n" + " */\n" + "VALUE ruby_curl_easy_setup(ruby_curl_easy *rbce) {\n" + " // TODO this could do with a bit of refactoring...\n" + " CURL *curl;\n" + " VALUE url, _url = rb_easy_get(\"url\");\n" + " struct curl_slist **hdrs = &(rbce->curl_headers);\n" + " struct curl_slist **phdrs = &(rbce->curl_proxy_headers);\n" + " struct curl_slist **cmds = &(rbce->curl_ftp_commands);\n" + " struct curl_slist **rslv = &(rbce->curl_resolve);\n" + "\n" + " curl = rbce->curl;\n" + "\n" + " if (_url == Qnil) {\n" + " rb_raise(eCurlErrError, \"No URL supplied\");\n" + " }\n" + "\n" + " url = rb_check_string_type(_url);\n" + " curl_easy_setopt(curl, CURLOPT_URL, StringValuePtr(url));\n" + "\n" + " // network stuff and auth\n" + " if (!rb_easy_nil(\"interface_hm\")) {\n" + " curl_easy_setopt(curl, CURLOPT_INTERFACE, rb_easy_get_str(\"interface_hm\"));\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_INTERFACE, NULL);\n" + " }\n" + "\n" + "#if HAVE_CURLOPT_USERNAME == 1 && HAVE_CURLOPT_PASSWORD == 1\n" + " if (!rb_easy_nil(\"username\")) {\n" + " curl_easy_setopt(curl, CURLOPT_USERNAME, rb_easy_get_str(\"username\"));\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_USERNAME, NULL);\n" + " }\n" + " if (!rb_easy_nil(\"password\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PASSWORD, rb_easy_get_str(\"password\"));\n" + " }\n" + " else {\n" + " curl_easy_setopt(curl, CURLOPT_PASSWORD, NULL);\n" + " }\n" + "#endif\n" + "\n" + " if (!rb_easy_nil(\"userpwd\")) {\n" + " curl_easy_setopt(curl, CURLOPT_USERPWD, rb_easy_get_str(\"userpwd\"));\n" + "#if HAVE_CURLOPT_USERNAME == 1\n" + " } else if (rb_easy_nil(\"username\") && rb_easy_nil(\"password\")) { /* don't set this even to NULL if we have set username and password */\n" + "#else\n" + " } else {\n" + "#endif\n" + " curl_easy_setopt(curl, CURLOPT_USERPWD, NULL);\n" + " }\n" + "\n" + " if (rb_easy_nil(\"proxy_url\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXY, NULL);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXY, rb_easy_get_str(\"proxy_url\"));\n" + " }\n" + "\n" + " if (rb_easy_nil(\"proxypwd\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, NULL);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, rb_easy_get_str(\"proxypwd\"));\n" + " }\n" + "\n" + " // body/header procs\n" + " if (!rb_easy_nil(\"body_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)&proc_data_handler_body);\n" + " curl_easy_setopt(curl, CURLOPT_WRITEDATA, rbce);\n" + " /* clear out the body_data if it was set */\n" + " rb_easy_del(\"body_data\");\n" + " } else {\n" + " VALUE body_buffer = rb_easy_set(\"body_data\", rb_str_buf_new(32768));\n" + " curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)&default_data_handler);\n" + " curl_easy_setopt(curl, CURLOPT_WRITEDATA, body_buffer);\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"header_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, (curl_write_callback)&proc_data_handler_header);\n" + " curl_easy_setopt(curl, CURLOPT_HEADERDATA, rbce);\n" + " /* clear out the header_data if it was set */\n" + " rb_easy_del(\"header_data\");\n" + " } else {\n" + " VALUE header_buffer = rb_easy_set(\"header_data\", rb_str_buf_new(16384));\n" + " curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, (curl_write_callback)&default_data_handler);\n" + " curl_easy_setopt(curl, CURLOPT_HEADERDATA, header_buffer);\n" + " }\n" + "\n" + " /* encoding */\n" + " if (!rb_easy_nil(\"encoding\")) {\n" + " curl_easy_setopt(curl, CURLOPT_ENCODING, rb_easy_get_str(\"encoding\"));\n" + " }\n" + "\n" + " // progress and debug procs\n" + " if (!rb_easy_nil(\"progress_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, (curl_progress_callback)&proc_progress_handler);\n" + " curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, rb_easy_get(\"progress_proc\"));\n" + " curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"debug_proc\")) {\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, (curl_debug_callback)&proc_debug_handler);\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGDATA, rb_easy_get(\"debug_proc\"));\n" + " curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);\n" + " } else {\n" + " // have to remove handler to re-enable standard verbosity\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_DEBUGDATA, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_VERBOSE, rbce->verbose);\n" + " }\n" + "\n" + " /* general opts */\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_HEADER, rbce->header_in_body);\n" + " curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, rbce->follow_location);\n" + " curl_easy_setopt(curl, CURLOPT_MAXREDIRS, rbce->max_redirs);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, rbce->proxy_tunnel);\n" + " curl_easy_setopt(curl, CURLOPT_FILETIME, rbce->fetch_file_time);\n" + " curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, rbce->ssl_verify_peer);\n" + " curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, rbce->ssl_verify_host);\n" + "\n" + " if ((rbce->use_netrc != Qnil) && (rbce->use_netrc != Qfalse)) {\n" + " curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_IGNORED);\n" + " }\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, rbce->unrestricted_auth);\n" + "\n" + "#if HAVE_CURLOPT_TIMEOUT_MS\n" + " curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, rbce->timeout_ms);\n" + "#endif\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, rbce->connect_timeout);\n" + "#if HAVE_CURLOPT_CONNECTTIMEOUT_MS\n" + " curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, rbce->connect_timeout_ms);\n" + "#endif\n" + " curl_easy_setopt(curl, CURLOPT_DNS_CACHE_TIMEOUT, rbce->dns_cache_timeout);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_IGNORE_CONTENT_LENGTH, rbce->ignore_content_length);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_IPRESOLVE, rbce->resolve_mode);\n" + "\n" + "\n" + "#if LIBCURL_VERSION_NUM >= 0x070a08\n" + " curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, rbce->ftp_response_timeout);\n" + "#else\n" + " if (rbce->ftp_response_timeout > 0) {\n" + " rb_warn(\"Installed libcurl is too old to support ftp_response_timeout\");\n" + " }\n" + "#endif\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, rbce->low_speed_limit);\n" + " curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, rbce->low_speed_time);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, rbce->max_recv_speed_large);\n" + " curl_easy_setopt(curl, CURLOPT_MAX_SEND_SPEED_LARGE, rbce->max_send_speed_large);\n" + "\n" + " // Set up localport / proxy port\n" + " // FIXME these won't get returned to default if they're unset Ruby\n" + " if (rbce->proxy_port > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYPORT, rbce->proxy_port);\n" + " }\n" + "\n" + " if (rbce->local_port > 0) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070f02\n" + " curl_easy_setopt(curl, CURLOPT_LOCALPORT, rbce->local_port);\n" + "\n" + " if (rbce->local_port_range > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_LOCALPORTRANGE, rbce->local_port_range);\n" + " }\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support local_port\");\n" + "#endif\n" + " }\n" + "\n" + " if (rbce->proxy_type != -1) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070a00\n" + " if (rbce->proxy_type == -2) {\n" + " rb_warn(\"Installed libcurl is too old to support the selected proxy type\");\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYTYPE, rbce->proxy_type);\n" + " }\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support proxy_type\");\n" + "#endif\n" + " }\n" + "\n" + " /*\n" + " * NOTE: we used to set CURLAUTH_ANY but see: http://curl.haxx.se/mail/lib-2015-06/0033.html\n" + " */\n" + " if (rbce->http_auth_types != 0) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070a06\n" + " curl_easy_setopt(curl, CURLOPT_HTTPAUTH, rbce->http_auth_types);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support http_auth_types\");\n" + "#endif\n" + " }\n" + "\n" + " if (rbce->proxy_auth_types != 0) {\n" + "#if LIBCURL_VERSION_NUM >= 0x070a07\n" + " curl_easy_setopt(curl, CURLOPT_PROXYAUTH, rbce->proxy_auth_types);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support proxy_auth_types\");\n" + "#endif\n" + " }\n" + "\n" + " /* Set up HTTP cookie handling if necessary\n" + " FIXME this may not get disabled if it's enabled, the disabled again from ruby.\n" + " */\n" + " if (rbce->enable_cookies) {\n" + " if (!rb_easy_nil(\"cookiejar\")) {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIEJAR, rb_easy_get_str(\"cookiejar\"));\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"cookiefile\")) {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIEFILE, rb_easy_get_str(\"cookiefile\"));\n" + " } else {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIEFILE, \"\"); /* \"\" = magic to just enable */\n" + " }\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"cookies\")) {\n" + " curl_easy_setopt(curl, CURLOPT_COOKIE, rb_easy_get_str(\"cookies\"));\n" + " }\n" + "\n" + " /* Set up HTTPS cert handling if necessary */\n" + " if (!rb_easy_nil(\"cert\")) {\n" + " if (!rb_easy_nil(\"certtype\")) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, rb_easy_get_str(\"certtype\"));\n" + " }\n" + " curl_easy_setopt(curl, CURLOPT_SSLCERT, rb_easy_get_str(\"cert\"));\n" + " if (!rb_easy_nil(\"certpassword\")) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLCERTPASSWD, rb_easy_get_str(\"certpassword\"));\n" + " }\n" + " if (!rb_easy_nil(\"cert_key\")) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLKEY, rb_easy_get_str(\"cert_key\"));\n" + " }\n" + " }\n" + "\n" + " if (!rb_easy_nil(\"cacert\")) {\n" + " curl_easy_setopt(curl, CURLOPT_CAINFO, rb_easy_get_str(\"cacert\"));\n" + " }\n" + "#ifdef HAVE_CURL_CONFIG_CA\n" + " else {\n" + " curl_easy_setopt(curl, CURLOPT_CAINFO, CURL_CONFIG_CA);\n" + " }\n" + "#endif\n" + "\n" + "#ifdef CURL_VERSION_SSL\n" + " if (rbce->ssl_version > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_SSLVERSION, rbce->ssl_version);\n" + " }\n" + "\n" + " if (rbce->use_ssl > 0) {\n" + " curl_easy_setopt(curl, CURB_FTPSSL, rbce->use_ssl);\n" + " }\n" + "#else\n" + " if (rbce->ssl_version > 0 || rbce->use_ssl > 0) {\n" + " rb_warn(\"libcurl is not configured with SSL support\");\n" + " }\n" + "#endif\n" + "\n" + " if (rbce->ftp_filemethod > 0) {\n" + " curl_easy_setopt(curl, CURLOPT_FTP_FILEMETHOD, rbce->ftp_filemethod);\n" + " }\n" + "\n" + " /* Set the user-agent string if specified */\n" + " if (!rb_easy_nil(\"useragent\")) {\n" + " curl_easy_setopt(curl, CURLOPT_USERAGENT, rb_easy_get_str(\"useragent\"));\n" + " }\n" + "\n" + " /* Setup HTTP headers if necessary */\n" + " curl_easy_setopt(curl, CURLOPT_HTTPHEADER, NULL); // XXX: maybe we shouldn't be clearing this?\n" + "\n" + " if (!rb_easy_nil(\"headers\")) {\n" + " if (rb_easy_type_check(\"headers\", T_ARRAY) || rb_easy_type_check(\"headers\", T_HASH)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, hdrs);\n" + " rb_iterate(rb_each, rb_easy_get(\"headers\"), cb_each_http_header, wrap);\n" + " } else {\n" + " VALUE headers_str = rb_obj_as_string(rb_easy_get(\"headers\"));\n" + " *hdrs = curl_slist_append(*hdrs, StringValuePtr(headers_str));\n" + " }\n" + "\n" + " if (*hdrs) {\n" + " curl_easy_setopt(curl, CURLOPT_HTTPHEADER, *hdrs);\n" + " }\n" + " }\n" + "\n" + "#if HAVE_CURLOPT_PROXYHEADER\n" + " /* Setup HTTP proxy headers if necessary */\n" + " curl_easy_setopt(curl, CURLOPT_PROXYHEADER, NULL); // XXX: maybe we shouldn't be clearing this?\n" + "\n" + " if (!rb_easy_nil(\"proxy_headers\")) {\n" + " if (rb_easy_type_check(\"proxy_headers\", T_ARRAY) || rb_easy_type_check(\"proxy_headers\", T_HASH)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, phdrs);\n" + " rb_iterate(rb_each, rb_easy_get(\"proxy_headers\"), cb_each_http_proxy_header, wrap);\n" + " } else {\n" + " VALUE proxy_headers_str = rb_obj_as_string(rb_easy_get(\"proxy_headers\"));\n" + " *phdrs = curl_slist_append(*hdrs, StringValuePtr(proxy_headers_str));\n" + " }\n" + "\n" + " if (*phdrs) {\n" + " curl_easy_setopt(curl, CURLOPT_PROXYHEADER, *phdrs);\n" + " }\n" + " }\n" + "#endif\n" + "\n" + " /* Setup FTP commands if necessary */\n" + " if (!rb_easy_nil(\"ftp_commands\")) {\n" + " if (rb_easy_type_check(\"ftp_commands\", T_ARRAY)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, cmds);\n" + " rb_iterate(rb_each, rb_easy_get(\"ftp_commands\"), cb_each_ftp_command, wrap);\n" + " }\n" + "\n" + " if (*cmds) {\n" + " curl_easy_setopt(curl, CURLOPT_QUOTE, *cmds);\n" + " }\n" + " }\n" + "\n" + "#if HAVE_CURLOPT_RESOLVE\n" + " /* Setup resolve list if necessary */\n" + " if (!rb_easy_nil(\"resolve\")) {\n" + " if (rb_easy_type_check(\"resolve\", T_ARRAY)) {\n" + " VALUE wrap = Data_Wrap_Struct(rb_cObject, 0, 0, rslv);\n" + " rb_iterate(rb_each, rb_easy_get(\"resolve\"), cb_each_resolve, wrap);\n" + " }\n" + "\n" + " if (*rslv) {\n" + " curl_easy_setopt(curl, CURLOPT_RESOLVE, *rslv);\n" + " }\n" + " }\n" + "#endif\n" + "\n" + " return Qnil;\n" + "}\n" + "/***********************************************\n" + " *\n" + " * Clean up a connection\n" + " *\n" + " * Always returns Qnil.\n" + " */\n" + "VALUE ruby_curl_easy_cleanup( VALUE self, ruby_curl_easy *rbce ) {\n" + "\n" + " CURL *curl = rbce->curl;\n" + " struct curl_slist *ftp_commands;\n" + " struct curl_slist *resolve;\n" + "\n" + " /* Free everything up */\n" + " if (rbce->curl_headers) {\n" + " curl_slist_free_all(rbce->curl_headers);\n" + " rbce->curl_headers = NULL;\n" + " }\n" + "\n" + " if (rbce->curl_proxy_headers) {\n" + " curl_slist_free_all(rbce->curl_proxy_headers);\n" + " rbce->curl_proxy_headers = NULL;\n" + " }\n" + "\n" + " ftp_commands = rbce->curl_ftp_commands;\n" + " if (ftp_commands) {\n" + " curl_slist_free_all(ftp_commands);\n" + " rbce->curl_ftp_commands = NULL;\n" + " }\n" + "\n" + " resolve = rbce->curl_resolve;\n" + " if (resolve) {\n" + " curl_slist_free_all(resolve);\n" + " rbce->curl_resolve = NULL;\n" + " }\n" + "\n" + " /* clean up a PUT request's curl options. */\n" + " if (!rb_easy_nil(\"upload\")) {\n" + " rb_easy_del(\"upload\"); // set the upload object to Qnil to let the GC clean up\n" + " curl_easy_setopt(curl, CURLOPT_UPLOAD, 0);\n" + " curl_easy_setopt(curl, CURLOPT_READFUNCTION, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_READDATA, NULL);\n" + " curl_easy_setopt(curl, CURLOPT_INFILESIZE, 0);\n" + " }\n" + "\n" + " // set values on cleanup to nil\n" + " //rb_easy_del(\"multi\");\n" + "\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * Common implementation of easy.http(verb) and easy.http_delete\n" + " */\n" + "static VALUE ruby_curl_easy_perform_verb_str(VALUE self, const char *verb) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + " VALUE retval;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl = rbce->curl;\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, verb);\n" + "\n" + " retval = rb_funcall(self, rb_intern(\"perform\"), 0);\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);\n" + "\n" + " return retval;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http(verb)\n" + " *\n" + " * Send an HTTP request with method set to verb, using the current options set for this Curl::Easy instance.\n" + " * This method always returns true or raises an exception (defined under Curl::Err) on error.\n" + " */\n" + "static VALUE ruby_curl_easy_perform_verb(VALUE self, VALUE verb) {\n" + " VALUE str_verb;\n" + " if (rb_type(verb) == T_STRING) {\n" + " return ruby_curl_easy_perform_verb_str(self, StringValueCStr(verb));\n" + " }\n" + " else if (rb_respond_to(verb,rb_intern(\"to_s\"))) {\n" + " str_verb = rb_funcall(verb, rb_intern(\"to_s\"), 0);\n" + " return ruby_curl_easy_perform_verb_str(self, StringValueCStr(str_verb));\n" + " }\n" + " else {\n" + " rb_raise(rb_eRuntimeError, \"Invalid HTTP VERB, must response to 'to_s'\");\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_post(\"url=encoded%20form%20data;and=so%20on\") => true\n" + " * easy.http_post(\"url=encoded%20form%20data\", \"and=so%20on\", ...) => true\n" + " * easy.http_post(\"url=encoded%20form%20data\", Curl::PostField, \"and=so%20on\", ...) => true\n" + " * easy.http_post(Curl::PostField, Curl::PostField ..., Curl::PostField) => true\n" + " *\n" + " * POST the specified formdata to the currently configured URL using\n" + " * the current options set for this Curl::Easy instance. This method\n" + " * always returns true, or raises an exception (defined under\n" + " * Curl::Err) on error.\n" + " *\n" + " * The Content-type of the POST is determined by the current setting\n" + " * of multipart_form_post? , according to the following rules:\n" + " * * When false (the default): the form will be POSTed with a\n" + " * content-type of 'application/x-www-form-urlencoded', and any of the\n" + " * four calling forms may be used.\n" + " * * When true: the form will be POSTed with a content-type of\n" + " * 'multipart/formdata'. Only the last calling form may be used,\n" + " * i.e. only PostField instances may be POSTed. In this mode,\n" + " * individual fields' content-types are recognised, and file upload\n" + " * fields are supported.\n" + " *\n" + " */\n" + "static VALUE ruby_curl_easy_perform_post(int argc, VALUE *argv, VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + " int i;\n" + " VALUE args_ary;\n" + "\n" + " rb_scan_args(argc, argv, \"*\", &args_ary);\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl = rbce->curl;\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);\n" + "\n" + " if (rbce->multipart_form_post) {\n" + " VALUE ret;\n" + " struct curl_httppost *first = NULL, *last = NULL;\n" + "\n" + " // Make the multipart form\n" + " for (i = 0; i < argc; i++) {\n" + " if (rb_obj_is_instance_of(argv[i], cCurlPostField)) {\n" + " append_to_form(argv[i], &first, &last);\n" + " } else if (rb_type(argv[i]) == T_ARRAY) {\n" + " // see: https://github.com/rvanlieshout/curb/commit/8bcdefddc0162484681ebd1a92d52a642666a445\n" + " long c = 0, argv_len = RARRAY_LEN(argv[i]);\n" + " for (; c < argv_len; ++c) {\n" + " if (rb_obj_is_instance_of(rb_ary_entry(argv[i],c), cCurlPostField)) {\n" + " append_to_form(rb_ary_entry(argv[i],c), &first, &last);\n" + " } else {\n" + " rb_raise(eCurlErrInvalidPostField, \"You must use PostFields only with multipart form posts\");\n" + " return Qnil;\n" + " }\n" + " }\n" + " } else {\n" + " rb_raise(eCurlErrInvalidPostField, \"You must use PostFields only with multipart form posts\");\n" + " return Qnil;\n" + " }\n" + " }\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_POST, 0);\n" + " curl_easy_setopt(curl, CURLOPT_HTTPPOST, first);\n" + " ret = rb_funcall(self, rb_intern(\"perform\"), 0);\n" + " curl_formfree(first);\n" + "\n" + " return ret;\n" + " } else {\n" + " VALUE post_body = Qnil;\n" + " /* TODO: check for PostField.file and raise error before to_s fails */\n" + " if ((post_body = rb_funcall(args_ary, idJoin, 1, rbstrAmp)) == Qnil) {\n" + " rb_raise(eCurlErrError, \"Failed to join arguments\");\n" + " return Qnil;\n" + " } else {\n" + " /* if the function call above returns an empty string because no additional arguments were passed this makes sure\n" + " a previously set easy.post_body = \"arg=foo&bar=bin\" will be honored */\n" + " if( post_body != Qnil && rb_type(post_body) == T_STRING && RSTRING_LEN(post_body) > 0 ) {\n" + " ruby_curl_easy_post_body_set(self, post_body);\n" + " }\n" + "\n" + " /* if post body is not defined, set it so we enable POST header, even though the request body is empty */\n" + " if( rb_easy_nil(\"postdata_buffer\") ) {\n" + " ruby_curl_easy_post_body_set(self, post_body);\n" + " }\n" + "\n" + " return rb_funcall(self, rb_intern(\"perform\"), 0);\n" + " }\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_put(data) => true\n" + " *\n" + " * PUT the supplied data to the currently configured URL using the\n" + " * current options set for this Curl::Easy instance. This method always\n" + " * returns true, or raises an exception (defined under Curl::Err) on error.\n" + " */\n" + "static VALUE ruby_curl_easy_perform_put(VALUE self, VALUE data) {\n" + " ruby_curl_easy *rbce;\n" + " CURL *curl;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl = rbce->curl;\n" + "\n" + " memset(rbce->err_buf, 0, sizeof(rbce->err_buf));\n" + "\n" + " curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, NULL);\n" + " ruby_curl_easy_put_data_set(self, data);\n" + "\n" + " return rb_funcall(self, rb_intern(\"perform\"), 0);\n" + "}\n" + "\n" + "\n" + "/* =================== DATA FUNCS =============== */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.body_str => \"response body\"\n" + " *\n" + " * Return the response body from the previous call to +perform+. This\n" + " * is populated by the default +on_body+ handler - if you supply\n" + " * your own body handler, this string will be empty.\n" + " */\n" + "static VALUE ruby_curl_easy_body_str_get(VALUE self) {\n" + " /*\n" + " TODO: can we force_encoding on the return here if we see charset=utf-8 in the content-type header?\n" + " Content-Type: application/json; charset=utf-8\n" + " */\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, body_data);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_str => \"response header\"\n" + " *\n" + " * Return the response header from the previous call to +perform+. This\n" + " * is populated by the default +on_header+ handler - if you supply\n" + " * your own header handler, this string will be empty.\n" + " */\n" + "static VALUE ruby_curl_easy_header_str_get(VALUE self) {\n" + " CURB_OBJECT_HGETTER(ruby_curl_easy, header_data);\n" + "}\n" + "\n" + "\n" + "/* ============== LASTCONN INFO FUNCS ============ */\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.last_effective_url => \"http://some.url\" or nil\n" + " *\n" + " * Retrieve the last effective URL used by this instance.\n" + " * This is the URL used in the last +perform+ call,\n" + " * and may differ from the value of easy.url.\n" + " */\n" + "static VALUE ruby_curl_easy_last_effective_url_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " char* url;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_EFFECTIVE_URL, &url);\n" + "\n" + " if (url && url[0]) { // curl returns empty string if none\n" + " return rb_str_new2(url);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.response_code => fixnum\n" + " *\n" + " * Retrieve the last received HTTP or FTP code. This will be zero\n" + " * if no server response code has been received. Note that a proxy's\n" + " * CONNECT response should be read with +http_connect_code+\n" + " * and not this method.\n" + " */\n" + "static VALUE ruby_curl_easy_response_code_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long code;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "#ifdef HAVE_CURLINFO_RESPONSE_CODE\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_RESPONSE_CODE, &code);\n" + "#else\n" + " // old libcurl\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_HTTP_CODE, &code);\n" + "#endif\n" + "\n" + " return LONG2NUM(code);\n" + "}\n" + "\n" + "#if defined(HAVE_CURLINFO_PRIMARY_IP)\n" + "/*\n" + " * call-seq:\n" + " * easy.primary_ip => \"xx.xx.xx.xx\" or nil\n" + " *\n" + " * Retrieve the resolved IP of the most recent connection\n" + " * done with this curl handle. This string may be IPv6 if\n" + " * that's enabled. This feature requires curl 7.19.x and above\n" + " */\n" + "static VALUE ruby_curl_easy_primary_ip_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " char* ip;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_PRIMARY_IP, &ip);\n" + "\n" + " if (ip && ip[0]) { // curl returns empty string if none\n" + " return rb_str_new2(ip);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "#endif\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.http_connect_code => fixnum\n" + " *\n" + " * Retrieve the last received proxy response code to a CONNECT request.\n" + " */\n" + "static VALUE ruby_curl_easy_http_connect_code_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long code;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_HTTP_CONNECTCODE, &code);\n" + "\n" + " return LONG2NUM(code);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.file_time => fixnum\n" + " *\n" + " * Retrieve the remote time of the retrieved document (in number of\n" + " * seconds since 1 jan 1970 in the GMT/UTC time zone). If you get -1,\n" + " * it can be because of many reasons (unknown, the server hides it\n" + " * or the server doesn't support the command that tells document time\n" + " * etc) and the time of the document is unknown.\n" + " *\n" + " * Note that you must tell the server to collect this information\n" + " * before the transfer is made, by setting +fetch_file_time?+ to true,\n" + " * or you will unconditionally get a -1 back.\n" + " *\n" + " * This requires libcurl 7.5 or higher - otherwise -1 is unconditionally\n" + " * returned.\n" + " */\n" + "static VALUE ruby_curl_easy_file_time_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_FILETIME\n" + " ruby_curl_easy *rbce;\n" + " long time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_FILETIME, &time);\n" + "\n" + " return LONG2NUM(time);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support file_time\");\n" + " return LONG2NUM(0);\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.total_time => float\n" + " *\n" + " * Retrieve the total time in seconds for the previous transfer,\n" + " * including name resolving, TCP connect etc.\n" + " */\n" + "static VALUE ruby_curl_easy_total_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_TOTAL_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.name_lookup_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the\n" + " * name resolving was completed.\n" + " */\n" + "static VALUE ruby_curl_easy_name_lookup_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_NAMELOOKUP_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.connect_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the\n" + " * connect to the remote host (or proxy) was completed.\n" + " */\n" + "static VALUE ruby_curl_easy_connect_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONNECT_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.app_connect_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the SSL/SSH\n" + " * connect/handshake to the remote host was completed. This time is most often\n" + " * very near to the pre transfer time, except for cases such as HTTP\n" + " * pipelining where the pretransfer time can be delayed due to waits in line\n" + " * for the pipeline and more.\n" + " */\n" + "#if defined(HAVE_CURLINFO_APPCONNECT_TIME)\n" + "static VALUE ruby_curl_easy_app_connect_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_APPCONNECT_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "#endif\n" + "\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.pre_transfer_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the\n" + " * file transfer is just about to begin. This includes all pre-transfer\n" + " * commands and negotiations that are specific to the particular protocol(s)\n" + " * involved.\n" + " */\n" + "static VALUE ruby_curl_easy_pre_transfer_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_PRETRANSFER_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.start_transfer_time => float\n" + " *\n" + " * Retrieve the time, in seconds, it took from the start until the first byte\n" + " * is just about to be transferred. This includes the +pre_transfer_time+ and\n" + " * also the time the server needs to calculate the result.\n" + " */\n" + "static VALUE ruby_curl_easy_start_transfer_time_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_STARTTRANSFER_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.redirect_time => float\n" + " *\n" + " * Retrieve the total time, in seconds, it took for all redirection steps\n" + " * include name lookup, connect, pretransfer and transfer before final\n" + " * transaction was started. +redirect_time+ contains the complete\n" + " * execution time for multiple redirections.\n" + " *\n" + " * Requires libcurl 7.9.7 or higher, otherwise -1 is always returned.\n" + " */\n" + "static VALUE ruby_curl_easy_redirect_time_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_REDIRECT_TIME\n" + " ruby_curl_easy *rbce;\n" + " double time;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_TIME, &time);\n" + "\n" + " return rb_float_new(time);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support redirect_time\");\n" + " return rb_float_new(-1);\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.redirect_count => integer\n" + " *\n" + " * Retrieve the total number of redirections that were actually followed.\n" + " *\n" + " * Requires libcurl 7.9.7 or higher, otherwise -1 is always returned.\n" + " */\n" + "static VALUE ruby_curl_easy_redirect_count_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_REDIRECT_COUNT\n" + " ruby_curl_easy *rbce;\n" + " long count;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_COUNT, &count);\n" + "\n" + " return LONG2NUM(count);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support redirect_count\");\n" + " return LONG2NUM(-1);\n" + "#endif\n" + "\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.redirect_url => \"http://some.url\" or nil\n" + " *\n" + " * Retrieve the URL a redirect would take you to if you\n" + " * would enable CURLOPT_FOLLOWLOCATION.\n" + " *\n" + " * Requires libcurl 7.18.2 or higher, otherwise -1 is always returned.\n" + " */\n" + "static VALUE ruby_curl_easy_redirect_url_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_REDIRECT_URL\n" + " ruby_curl_easy *rbce;\n" + " char* url;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REDIRECT_URL, &url);\n" + "\n" + " if (url && url[0]) { // curl returns empty string if none\n" + " return rb_str_new2(url);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support redirect_url\");\n" + " return LONG2NUM(-1);\n" + "#endif\n" + "}\n" + "\n" + "\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.uploaded_bytes => float\n" + " *\n" + " * Retrieve the total amount of bytes that were uploaded in the\n" + " * preceeding transfer.\n" + " */\n" + "static VALUE ruby_curl_easy_uploaded_bytes_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_UPLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.downloaded_bytes => float\n" + " *\n" + " * Retrieve the total amount of bytes that were downloaded in the\n" + " * preceeding transfer.\n" + " */\n" + "static VALUE ruby_curl_easy_downloaded_bytes_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SIZE_DOWNLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.upload_speed => float\n" + " *\n" + " * Retrieve the average upload speed that curl measured for the\n" + " * preceeding complete upload.\n" + " */\n" + "static VALUE ruby_curl_easy_upload_speed_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_UPLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.download_speed => float\n" + " *\n" + " * Retrieve the average download speed that curl measured for\n" + " * the preceeding complete download.\n" + " */\n" + "static VALUE ruby_curl_easy_download_speed_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SPEED_DOWNLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.header_size => fixnum\n" + " *\n" + " * Retrieve the total size of all the headers received in the\n" + " * preceeding transfer.\n" + " */\n" + "static VALUE ruby_curl_easy_header_size_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long size;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_HEADER_SIZE, &size);\n" + "\n" + " return LONG2NUM(size);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.request_size => fixnum\n" + " *\n" + " * Retrieve the total size of the issued requests. This is so far\n" + " * only for HTTP requests. Note that this may be more than one request\n" + " * if +follow_location?+ is true.\n" + " */\n" + "static VALUE ruby_curl_easy_request_size_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long size;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_REQUEST_SIZE, &size);\n" + "\n" + " return LONG2NUM(size);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ssl_verify_result => integer\n" + " *\n" + " * Retrieve the result of the certification verification that was requested\n" + " * (by setting +ssl_verify_peer?+ to +true+).\n" + " */\n" + "static VALUE ruby_curl_easy_ssl_verify_result_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " long result;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_SSL_VERIFYRESULT, &result);\n" + "\n" + " return LONG2NUM(result);\n" + "}\n" + "\n" + "/* TODO CURLINFO_SSL_ENGINES\n" + "\n" + "Pass the address of a 'struct curl_slist *' to receive a linked-list of OpenSSL crypto-engines supported.\n" + "Note that engines are normally implemented in separate dynamic libraries.\n" + "Hence not all the returned engines may be available at run-time.\n" + "NOTE: you must call curl_slist_free_all(3) on the list pointer once you're done with it, as libcurl will not free the data for you. (Added in 7.12.3)\n" + "*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.downloaded_content_length => float\n" + " *\n" + " * Retrieve the content-length of the download. This is the value read\n" + " * from the Content-Length: field.\n" + " */\n" + "static VALUE ruby_curl_easy_downloaded_content_length_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.uploaded_content_length => float\n" + " *\n" + " * Retrieve the content-length of the upload.\n" + " */\n" + "static VALUE ruby_curl_easy_uploaded_content_length_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " double bytes;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &bytes);\n" + "\n" + " return rb_float_new(bytes);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.content_type => \"content/type\" or nil\n" + " *\n" + " * Retrieve the content-type of the downloaded object. This is the value read\n" + " * from the Content-Type: field. If you get +nil+, it means that the server\n" + " * didn't send a valid Content-Type header or that the protocol used doesn't\n" + " * support this.\n" + " */\n" + "static VALUE ruby_curl_easy_content_type_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " char* type;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_CONTENT_TYPE, &type);\n" + "\n" + " if (type && type[0]) { // curl returns empty string if none\n" + " return rb_str_new2(type);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "\n" + "\n" + "/* NOT REQUIRED?\n" + "CURLINFO_PRIVATE\n" + "\n" + "Pass a pointer to a 'char *' to receive the pointer to the private data associated with the curl handle (set with the CURLOPT_PRIVATE option to curl_easy_setopt(3)). (Added in 7.10.3)\n" + "*/\n" + "\n" + "/* TODO these will need constants setting up too for checking the bits.\n" + " *\n" + " * Alternatively, could return an object that wraps the long, and has\n" + " * question methods to query the auth types. Could return long from to_i(nt)\n" + " *\n" + "CURLINFO_HTTPAUTH_AVAIL\n" + "\n" + "Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available. The meaning of the bits is explained in the CURLOPT_HTTPAUTH option for curl_easy_setopt(3). (Added in 7.10.8)\n" + "\n" + "CURLINFO_PROXYAUTH_AVAIL\n" + "\n" + "Pass a pointer to a long to receive a bitmask indicating the authentication method(s) available for your proxy authentication. (Added in 7.10.8)\n" + "*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.os_errno => integer\n" + " *\n" + " * Retrieve the errno variable from a connect failure (requires\n" + " * libcurl 7.12.2 or higher, otherwise 0 is always returned).\n" + " */\n" + "static VALUE ruby_curl_easy_os_errno_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_OS_ERRNO\n" + " ruby_curl_easy *rbce;\n" + " long result;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_OS_ERRNO, &result);\n" + "\n" + " return LONG2NUM(result);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support os_errno\");\n" + " return LONG2NUM(0);\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.num_connects => integer\n" + " *\n" + " * Retrieve the number of new connections libcurl had to create to achieve\n" + " * the previous transfer (only the successful connects are counted).\n" + " * Combined with +redirect_count+ you are able to know how many times libcurl\n" + " * successfully reused existing connection(s) or not.\n" + " *\n" + " * See the Connection Options of curl_easy_setopt(3) to see how libcurl tries\n" + " * to make persistent connections to save time.\n" + " *\n" + " * (requires libcurl 7.12.3 or higher, otherwise -1 is always returned).\n" + " */\n" + "static VALUE ruby_curl_easy_num_connects_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_NUM_CONNECTS\n" + " ruby_curl_easy *rbce;\n" + " long result;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_NUM_CONNECTS, &result);\n" + "\n" + " return LONG2NUM(result);\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support num_connects\");\n" + " return LONG2NUM(-1);\n" + "#endif\n" + "}\n" + "\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.cookielist => array\n" + " *\n" + " * Retrieves the cookies curl knows in an array of strings.\n" + " * Returned strings are in Netscape cookiejar format or in Set-Cookie format.\n" + " *\n" + " * See also option CURLINFO_COOKIELIST of curl_easy_getopt(3) to see how libcurl behaves.\n" + " *\n" + " * (requires libcurl 7.14.1 or higher, otherwise -1 is always returned).\n" + "*/\n" + "static VALUE ruby_curl_easy_cookielist_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_COOKIELIST\n" + " ruby_curl_easy *rbce;\n" + " struct curl_slist *cookies;\n" + " struct curl_slist *cookie;\n" + " VALUE rb_cookies;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_COOKIELIST, &cookies);\n" + " if (!cookies)\n" + " return Qnil;\n" + " rb_cookies = rb_ary_new();\n" + " for (cookie = cookies; cookie; cookie = cookie->next)\n" + " rb_ary_push(rb_cookies, rb_str_new2(cookie->data));\n" + " curl_slist_free_all(cookies);\n" + " return rb_cookies;\n" + "\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support cookielist\");\n" + " return INT2FIX(-1);\n" + "#endif\n" + "}\n" + "\n" + "\n" + "/* TODO this needs to be implemented. Could probably support CONNECT_ONLY by having this\n" + " * return an open Socket or something.\n" + " *\n" + "CURLINFO_LASTSOCKET\n" + "\n" + "Pass a pointer to a long to receive the last socket used by this curl session. If the socket is no longer valid, -1 is returned. When you finish working with the socket, you must call curl_easy_cleanup() as usual and let libcurl close the socket and cleanup other resources associated with the handle. This is typically used in combination with CURLOPT_CONNECT_ONLY. (Added in 7.15.2)\n" + "*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.ftp_entry_path => \"C:\\ftp\\root\\\" or nil\n" + " *\n" + " * Retrieve the path of the entry path. That is the initial path libcurl ended\n" + " * up in when logging on to the remote FTP server. This returns +nil+ if\n" + " * something is wrong.\n" + " *\n" + " * (requires libcurl 7.15.4 or higher, otherwise +nil+ is always returned).\n" + " */\n" + "static VALUE ruby_curl_easy_ftp_entry_path_get(VALUE self) {\n" + "#ifdef HAVE_CURLINFO_FTP_ENTRY_PATH\n" + " ruby_curl_easy *rbce;\n" + " char* path = NULL;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " curl_easy_getinfo(rbce->curl, CURLINFO_FTP_ENTRY_PATH, &path);\n" + "\n" + " if (path && path[0]) { // curl returns NULL or empty string if none\n" + " return rb_str_new2(path);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "#else\n" + " rb_warn(\"Installed libcurl is too old to support num_connects\");\n" + " return Qnil;\n" + "#endif\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multi => \"#\"\n" + " */\n" + "static VALUE ruby_curl_easy_multi_get(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return rbce->multi;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.multi=multi => \"#\"\n" + " */\n" + "static VALUE ruby_curl_easy_multi_set(VALUE self, VALUE multi) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " rbce->multi = multi;\n" + " return rbce->multi;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.last_result => 0\n" + " */\n" + "static VALUE ruby_curl_easy_last_result(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " return LONG2NUM(rbce->last_result);\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.last_error => \"Error details\" or nil\n" + " */\n" + "static VALUE ruby_curl_easy_last_error(VALUE self) {\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " if (rbce->err_buf[0]) { // curl returns NULL or empty string if none\n" + " return rb_str_new2(rbce->err_buf);\n" + " } else {\n" + " return Qnil;\n" + " }\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.setopt Fixnum, value => value\n" + " *\n" + " * Initial access to libcurl curl_easy_setopt\n" + " */\n" + "static VALUE ruby_curl_easy_set_opt(VALUE self, VALUE opt, VALUE val) {\n" + " ruby_curl_easy *rbce;\n" + " long option = NUM2LONG(opt);\n" + " rb_io_t *open_f_ptr;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " switch (option) {\n" + " /* BEHAVIOR OPTIONS */\n" + " case CURLOPT_VERBOSE: {\n" + " VALUE verbose = val;\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, verbose);\n" + " } break;\n" + " case CURLOPT_FOLLOWLOCATION: {\n" + " VALUE follow_location = val;\n" + " CURB_BOOLEAN_SETTER(ruby_curl_easy, follow_location);\n" + " } break;\n" + " /* TODO: CALLBACK OPTIONS */\n" + " /* TODO: ERROR OPTIONS */\n" + " /* NETWORK OPTIONS */\n" + " case CURLOPT_URL: {\n" + " VALUE url = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, url);\n" + " } break;\n" + " case CURLOPT_CUSTOMREQUEST:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_CUSTOMREQUEST, NIL_P(val) ? NULL : StringValueCStr(val));\n" + " break;\n" + " case CURLOPT_HTTP_VERSION:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HTTP_VERSION, NUM2LONG(val));\n" + " break;\n" + " case CURLOPT_PROXY: {\n" + " VALUE proxy_url = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, proxy_url);\n" + " } break;\n" + " case CURLOPT_INTERFACE: {\n" + " VALUE interface_hm = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, interface_hm);\n" + " } break;\n" + " case CURLOPT_HEADER:\n" + " case CURLOPT_NOPROGRESS:\n" + " case CURLOPT_NOSIGNAL:\n" + "#if HAVE_CURLOPT_PATH_AS_IS\n" + " case CURLOPT_PATH_AS_IS:\n" + "#endif\n" + "#if HAVE_CURLOPT_PIPEWAIT\n" + " case CURLOPT_PIPEWAIT:\n" + "#endif\n" + " case CURLOPT_HTTPGET:\n" + " case CURLOPT_NOBODY: {\n" + " int type = rb_type(val);\n" + " VALUE value;\n" + " if (type == T_TRUE) {\n" + " value = rb_int_new(1);\n" + " } else if (type == T_FALSE) {\n" + " value = rb_int_new(0);\n" + " } else {\n" + " value = rb_funcall(val, rb_intern(\"to_i\"), 0);\n" + " }\n" + " curl_easy_setopt(rbce->curl, option, NUM2LONG(value));\n" + " } break;\n" + " case CURLOPT_POST: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_POST, rb_type(val) == T_TRUE);\n" + " } break;\n" + " case CURLOPT_MAXCONNECTS: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAXCONNECTS, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_POSTFIELDS: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_POSTFIELDS, NIL_P(val) ? NULL : StringValueCStr(val));\n" + " } break;\n" + " case CURLOPT_USERPWD: {\n" + " VALUE userpwd = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, userpwd);\n" + " } break;\n" + " case CURLOPT_PROXYUSERPWD: {\n" + " VALUE proxypwd = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, proxypwd);\n" + " } break;\n" + " case CURLOPT_COOKIE: {\n" + " VALUE cookies = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cookies);\n" + " } break;\n" + " case CURLOPT_COOKIEFILE: {\n" + " VALUE cookiefile = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cookiefile);\n" + " } break;\n" + " case CURLOPT_COOKIEJAR: {\n" + " VALUE cookiejar = val;\n" + " CURB_OBJECT_HSETTER(ruby_curl_easy, cookiejar);\n" + " } break;\n" + " case CURLOPT_TCP_NODELAY: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_NODELAY, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_RANGE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_RANGE, StringValueCStr(val));\n" + " } break;\n" + " case CURLOPT_RESUME_FROM: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_RESUME_FROM, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_FAILONERROR: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_FAILONERROR, NUM2LONG(val));\n" + " } break;\n" + " case CURLOPT_SSL_CIPHER_LIST: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_SSL_CIPHER_LIST, StringValueCStr(val));\n" + " } break;\n" + " case CURLOPT_FORBID_REUSE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_FORBID_REUSE, NUM2LONG(val));\n" + " } break;\n" + "#if HAVE_CURLOPT_GSSAPI_DELEGATION\n" + " case CURLOPT_GSSAPI_DELEGATION: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_GSSAPI_DELEGATION, NUM2LONG(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_UNIX_SOCKET_PATH\n" + " case CURLOPT_UNIX_SOCKET_PATH: {\n" + "\tcurl_easy_setopt(rbce->curl, CURLOPT_UNIX_SOCKET_PATH, StringValueCStr(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_MAX_SEND_SPEED_LARGE\n" + " case CURLOPT_MAX_SEND_SPEED_LARGE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAX_SEND_SPEED_LARGE, (curl_off_t) NUM2LL(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_MAX_RECV_SPEED_LARGE\n" + " case CURLOPT_MAX_RECV_SPEED_LARGE: {\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAX_RECV_SPEED_LARGE, (curl_off_t) NUM2LL(val));\n" + " } break;\n" + "#endif\n" + "#if HAVE_CURLOPT_MAXFILESIZE\n" + " case CURLOPT_MAXFILESIZE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_MAXFILESIZE, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + "#if HAVE_CURLOPT_TCP_KEEPALIVE\n" + " case CURLOPT_TCP_KEEPALIVE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPALIVE, NUM2LONG(val));\n" + " break;\n" + " case CURLOPT_TCP_KEEPIDLE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPIDLE, NUM2LONG(val));\n" + " break;\n" + " case CURLOPT_TCP_KEEPINTVL:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_TCP_KEEPINTVL, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + "#if HAVE_CURLOPT_HAPROXYPROTOCOL\n" + " case CURLOPT_HAPROXYPROTOCOL:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_HAPROXYPROTOCOL, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + " case CURLOPT_STDERR:\n" + " // libcurl requires raw FILE pointer and this should be IO object in Ruby.\n" + " // Tempfile or StringIO won't work.\n" + " Check_Type(val, T_FILE);\n" + " GetOpenFile(val, open_f_ptr);\n" + " curl_easy_setopt(rbce->curl, CURLOPT_STDERR, rb_io_stdio_file(open_f_ptr));\n" + " break;\n" + " case CURLOPT_PROTOCOLS:\n" + " case CURLOPT_REDIR_PROTOCOLS:\n" + " curl_easy_setopt(rbce->curl, option, NUM2LONG(val));\n" + " break;\n" + "#if HAVE_CURLOPT_SSL_SESSIONID_CACHE\n" + " case CURLOPT_SSL_SESSIONID_CACHE:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_SSL_SESSIONID_CACHE, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + "#if HAVE_CURLOPT_PROXY_SSL_VERIFYHOST\n" + " case CURLOPT_PROXY_SSL_VERIFYHOST:\n" + " curl_easy_setopt(rbce->curl, CURLOPT_PROXY_SSL_VERIFYHOST, NUM2LONG(val));\n" + " break;\n" + "#endif\n" + " default:\n" + " rb_raise(rb_eTypeError, \"Curb unsupported option\");\n" + " }\n" + "\n" + " return val;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.getinfo Fixnum => value\n" + " *\n" + " * Iniital access to libcurl curl_easy_getinfo, remember getinfo doesn't return the same values as setopt\n" + " */\n" + "static VALUE ruby_curl_easy_get_opt(VALUE self, VALUE opt) {\n" + " return Qnil;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.inspect => \"#\"\n" + " */\n" + "static VALUE ruby_curl_easy_inspect(VALUE self) {\n" + " char buf[64];\n" + " ruby_curl_easy *rbce;\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + " /* if we don't have a url set... we'll crash... */\n" + " if( !rb_easy_nil(\"url\") && rb_easy_type_check(\"url\", T_STRING)) {\n" + " VALUE url = rb_easy_get(\"url\");\n" + " size_t len = 13+((RSTRING_LEN(url) > 50) ? 50 : RSTRING_LEN(url));\n" + " /* \"#\" */\n" + " memcpy(buf,\"#\");\n" + "}\n" + "\n" + "\n" + "/* ================== ESCAPING FUNCS ==============*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.escape(\"some text\") => \"some%20text\"\n" + " *\n" + " * Convert the given input string to a URL encoded string and return\n" + " * the result. All input characters that are not a-z, A-Z or 0-9 are\n" + " * converted to their \"URL escaped\" version (%NN where NN is a\n" + " * two-digit hexadecimal number).\n" + " */\n" + "static VALUE ruby_curl_easy_escape(VALUE self, VALUE svalue) {\n" + " ruby_curl_easy *rbce;\n" + " char *result;\n" + " VALUE rresult;\n" + " VALUE str = svalue;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + " /* NOTE: make sure the value is a string, if not call to_s */\n" + " if( rb_type(str) != T_STRING ) { str = rb_funcall(str,rb_intern(\"to_s\"),0); }\n" + "\n" + "#if (LIBCURL_VERSION_NUM >= 0x070f04)\n" + " result = (char*)curl_easy_escape(rbce->curl, StringValuePtr(str), (int)RSTRING_LEN(str));\n" + "#else\n" + " result = (char*)curl_escape(StringValuePtr(str), (int)RSTRING_LEN(str));\n" + "#endif\n" + "\n" + " rresult = rb_str_new2(result);\n" + " curl_free(result);\n" + "\n" + " return rresult;\n" + "}\n" + "\n" + "/*\n" + " * call-seq:\n" + " * easy.unescape(\"some%20text\") => \"some text\"\n" + " *\n" + " * Convert the given URL encoded input string to a \"plain string\" and return\n" + " * the result. All input characters that are URL encoded (%XX where XX is a\n" + " * two-digit hexadecimal number) are converted to their binary versions.\n" + " */\n" + "static VALUE ruby_curl_easy_unescape(VALUE self, VALUE str) {\n" + " ruby_curl_easy *rbce;\n" + " int rlen;\n" + " char *result;\n" + " VALUE rresult;\n" + "\n" + " Data_Get_Struct(self, ruby_curl_easy, rbce);\n" + "\n" + "#if (LIBCURL_VERSION_NUM >= 0x070f04)\n" + " result = (char*)curl_easy_unescape(rbce->curl, StringValuePtr(str), (int)RSTRING_LEN(str), &rlen);\n" + "#else\n" + " result = (char*)curl_unescape(StringValuePtr(str), (int)RSTRING_LEN(str));\n" + " rlen = strlen(result);\n" + "#endif\n" + "\n" + " rresult = rb_str_new(result, rlen);\n" + " curl_free(result);\n" + "\n" + " return rresult;\n" + "}\n" + "\n" + "\n" + "/* ================= CLASS METHODS ==================*/\n" + "\n" + "/*\n" + " * call-seq:\n" + " * Curl::Easy.error(code) => [ErrCode, String]\n" + " *\n" + " * translate an internal libcurl error to ruby error class\n" + " */\n" + "static VALUE ruby_curl_easy_error_message(VALUE klass, VALUE code) {\n" + " return rb_curl_easy_error(NUM2INT(code));\n" + "}\n" + "\n" + "/* =================== INIT LIB =====================*/\n" + "// TODO: https://bugs.ruby-lang.org/issues/18007\n" + "void init_curb_easy() {\n" + " idCall = rb_intern(\"call\");\n" + " idJoin = rb_intern(\"join\");\n" + "\n" + " rbstrAmp = rb_str_new2(\"&\");\n" + " rb_global_variable(&rbstrAmp);\n" + "\n" + " cCurlEasy = rb_define_class_under(mCurl, \"Easy\", rb_cObject);\n" + "\n" + " /* Class methods */\n" + " rb_define_alloc_func(cCurlEasy, ruby_curl_easy_allocate);\n" + " rb_define_singleton_method(cCurlEasy, \"error\", ruby_curl_easy_error_message, 1);\n" + "\n" + " /* Initialize method */\n" + " rb_define_method(cCurlEasy, \"initialize\", ruby_curl_easy_initialize, -1);\n" + "\n" + " /* Attributes for config next perform */\n" + " rb_define_method(cCurlEasy, \"url\", ruby_curl_easy_url_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_url\", ruby_curl_easy_proxy_url_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"proxy_headers=\", ruby_curl_easy_proxy_headers_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_headers\", ruby_curl_easy_proxy_headers_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"headers=\", ruby_curl_easy_headers_set, 1);\n" + " rb_define_method(cCurlEasy, \"headers\", ruby_curl_easy_headers_get, 0);\n" + " rb_define_method(cCurlEasy, \"interface\", ruby_curl_easy_interface_get, 0);\n" + " rb_define_method(cCurlEasy, \"userpwd\", ruby_curl_easy_userpwd_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxypwd\", ruby_curl_easy_proxypwd_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookies\", ruby_curl_easy_cookies_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookiefile\", ruby_curl_easy_cookiefile_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookiejar\", ruby_curl_easy_cookiejar_get, 0);\n" + " rb_define_method(cCurlEasy, \"cert=\", ruby_curl_easy_cert_set, 1);\n" + " rb_define_method(cCurlEasy, \"cert\", ruby_curl_easy_cert_get, 0);\n" + " rb_define_method(cCurlEasy, \"cert_key=\", ruby_curl_easy_cert_key_set, 1);\n" + " rb_define_method(cCurlEasy, \"cert_key\", ruby_curl_easy_cert_key_get, 0);\n" + " rb_define_method(cCurlEasy, \"cacert=\", ruby_curl_easy_cacert_set, 1);\n" + " rb_define_method(cCurlEasy, \"cacert\", ruby_curl_easy_cacert_get, 0);\n" + " rb_define_method(cCurlEasy, \"certpassword=\", ruby_curl_easy_certpassword_set, 1);\n" + " rb_define_method(cCurlEasy, \"certtype=\", ruby_curl_easy_certtype_set, 1);\n" + " rb_define_method(cCurlEasy, \"certtype\", ruby_curl_easy_certtype_get, 0);\n" + " rb_define_method(cCurlEasy, \"encoding=\", ruby_curl_easy_encoding_set, 1);\n" + " rb_define_method(cCurlEasy, \"encoding\", ruby_curl_easy_encoding_get, 0);\n" + " rb_define_method(cCurlEasy, \"useragent=\", ruby_curl_easy_useragent_set, 1);\n" + " rb_define_method(cCurlEasy, \"useragent\", ruby_curl_easy_useragent_get, 0);\n" + " rb_define_method(cCurlEasy, \"post_body=\", ruby_curl_easy_post_body_set, 1);\n" + " rb_define_method(cCurlEasy, \"post_body\", ruby_curl_easy_post_body_get, 0);\n" + " rb_define_method(cCurlEasy, \"put_data=\", ruby_curl_easy_put_data_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_commands=\", ruby_curl_easy_ftp_commands_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_commands\", ruby_curl_easy_ftp_commands_get, 0);\n" + " rb_define_method(cCurlEasy, \"resolve=\", ruby_curl_easy_resolve_set, 1);\n" + " rb_define_method(cCurlEasy, \"resolve\", ruby_curl_easy_resolve_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"local_port=\", ruby_curl_easy_local_port_set, 1);\n" + " rb_define_method(cCurlEasy, \"local_port\", ruby_curl_easy_local_port_get, 0);\n" + " rb_define_method(cCurlEasy, \"local_port_range=\", ruby_curl_easy_local_port_range_set, 1);\n" + " rb_define_method(cCurlEasy, \"local_port_range\", ruby_curl_easy_local_port_range_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_port=\", ruby_curl_easy_proxy_port_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_port\", ruby_curl_easy_proxy_port_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_type=\", ruby_curl_easy_proxy_type_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_type\", ruby_curl_easy_proxy_type_get, 0);\n" + " rb_define_method(cCurlEasy, \"http_auth_types=\", ruby_curl_easy_http_auth_types_set, -1);\n" + " rb_define_method(cCurlEasy, \"http_auth_types\", ruby_curl_easy_http_auth_types_get, 0);\n" + " rb_define_method(cCurlEasy, \"proxy_auth_types=\", ruby_curl_easy_proxy_auth_types_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_auth_types\", ruby_curl_easy_proxy_auth_types_get, 0);\n" + " rb_define_method(cCurlEasy, \"max_redirects=\", ruby_curl_easy_max_redirects_set, 1);\n" + " rb_define_method(cCurlEasy, \"max_redirects\", ruby_curl_easy_max_redirects_get, 0);\n" + " rb_define_method(cCurlEasy, \"timeout=\", ruby_curl_easy_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"timeout\", ruby_curl_easy_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"timeout_ms=\", ruby_curl_easy_timeout_ms_set, 1);\n" + " rb_define_method(cCurlEasy, \"timeout_ms\", ruby_curl_easy_timeout_ms_get, 0);\n" + " rb_define_method(cCurlEasy, \"connect_timeout=\", ruby_curl_easy_connect_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"connect_timeout\", ruby_curl_easy_connect_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"connect_timeout_ms=\", ruby_curl_easy_connect_timeout_ms_set, 1);\n" + " rb_define_method(cCurlEasy, \"connect_timeout_ms\", ruby_curl_easy_connect_timeout_ms_get, 0);\n" + " rb_define_method(cCurlEasy, \"dns_cache_timeout=\", ruby_curl_easy_dns_cache_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"dns_cache_timeout\", ruby_curl_easy_dns_cache_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"ftp_response_timeout=\", ruby_curl_easy_ftp_response_timeout_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_response_timeout\", ruby_curl_easy_ftp_response_timeout_get, 0);\n" + " rb_define_method(cCurlEasy, \"low_speed_limit=\", ruby_curl_easy_low_speed_limit_set, 1);\n" + " rb_define_method(cCurlEasy, \"low_speed_limit\", ruby_curl_easy_low_speed_limit_get, 0);\n" + " rb_define_method(cCurlEasy, \"low_speed_time=\", ruby_curl_easy_low_speed_time_set, 1);\n" + " rb_define_method(cCurlEasy, \"low_speed_time\", ruby_curl_easy_low_speed_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"max_send_speed_large=\", ruby_curl_easy_max_send_speed_large_set, 1);\n" + " rb_define_method(cCurlEasy, \"max_send_speed_large\", ruby_curl_easy_max_send_speed_large_get, 0);\n" + " rb_define_method(cCurlEasy, \"max_recv_speed_large=\", ruby_curl_easy_max_recv_speed_large_set, 1);\n" + " rb_define_method(cCurlEasy, \"max_recv_speed_large\", ruby_curl_easy_max_recv_speed_large_get, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_version=\", ruby_curl_easy_ssl_version_set, 1);\n" + " rb_define_method(cCurlEasy, \"ssl_version\", ruby_curl_easy_ssl_version_get, 0);\n" + " rb_define_method(cCurlEasy, \"use_ssl=\", ruby_curl_easy_use_ssl_set, 1);\n" + " rb_define_method(cCurlEasy, \"use_ssl\", ruby_curl_easy_use_ssl_get, 0);\n" + " rb_define_method(cCurlEasy, \"ftp_filemethod=\", ruby_curl_easy_ftp_filemethod_set, 1);\n" + " rb_define_method(cCurlEasy, \"ftp_filemethod\", ruby_curl_easy_ftp_filemethod_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"username=\", ruby_curl_easy_username_set, 1);\n" + " rb_define_method(cCurlEasy, \"username\", ruby_curl_easy_username_get, 0);\n" + " rb_define_method(cCurlEasy, \"password=\", ruby_curl_easy_password_set, 1);\n" + " rb_define_method(cCurlEasy, \"password\", ruby_curl_easy_password_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"proxy_tunnel=\", ruby_curl_easy_proxy_tunnel_set, 1);\n" + " rb_define_method(cCurlEasy, \"proxy_tunnel?\", ruby_curl_easy_proxy_tunnel_q, 0);\n" + " rb_define_method(cCurlEasy, \"fetch_file_time=\", ruby_curl_easy_fetch_file_time_set, 1);\n" + " rb_define_method(cCurlEasy, \"fetch_file_time?\", ruby_curl_easy_fetch_file_time_q, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_peer=\", ruby_curl_easy_ssl_verify_peer_set, 1);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_peer?\", ruby_curl_easy_ssl_verify_peer_q, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_host_integer=\", ruby_curl_easy_ssl_verify_host_set, 1);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_host\", ruby_curl_easy_ssl_verify_host_get, 0);\n" + " rb_define_method(cCurlEasy, \"header_in_body=\", ruby_curl_easy_header_in_body_set, 1);\n" + " rb_define_method(cCurlEasy, \"header_in_body?\", ruby_curl_easy_header_in_body_q, 0);\n" + " rb_define_method(cCurlEasy, \"use_netrc=\", ruby_curl_easy_use_netrc_set, 1);\n" + " rb_define_method(cCurlEasy, \"use_netrc?\", ruby_curl_easy_use_netrc_q, 0);\n" + " rb_define_method(cCurlEasy, \"follow_location?\", ruby_curl_easy_follow_location_q, 0);\n" + " rb_define_method(cCurlEasy, \"autoreferer=\", ruby_curl_easy_autoreferer_set, 1);\n" + " rb_define_method(cCurlEasy, \"unrestricted_auth=\", ruby_curl_easy_unrestricted_auth_set, 1);\n" + " rb_define_method(cCurlEasy, \"unrestricted_auth?\", ruby_curl_easy_unrestricted_auth_q, 0);\n" + " rb_define_method(cCurlEasy, \"verbose=\", ruby_curl_easy_verbose_set, 1);\n" + " rb_define_method(cCurlEasy, \"verbose?\", ruby_curl_easy_verbose_q, 0);\n" + " rb_define_method(cCurlEasy, \"multipart_form_post=\", ruby_curl_easy_multipart_form_post_set, 1);\n" + " rb_define_method(cCurlEasy, \"multipart_form_post?\", ruby_curl_easy_multipart_form_post_q, 0);\n" + " rb_define_method(cCurlEasy, \"enable_cookies=\", ruby_curl_easy_enable_cookies_set, 1);\n" + " rb_define_method(cCurlEasy, \"enable_cookies?\", ruby_curl_easy_enable_cookies_q, 0);\n" + " rb_define_method(cCurlEasy, \"ignore_content_length=\", ruby_curl_easy_ignore_content_length_set, 1);\n" + " rb_define_method(cCurlEasy, \"ignore_content_length?\", ruby_curl_easy_ignore_content_length_q, 0);\n" + " rb_define_method(cCurlEasy, \"resolve_mode\", ruby_curl_easy_resolve_mode, 0);\n" + " rb_define_method(cCurlEasy, \"resolve_mode=\", ruby_curl_easy_resolve_mode_set, 1);\n" + "\n" + " rb_define_method(cCurlEasy, \"on_body\", ruby_curl_easy_on_body_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_header\", ruby_curl_easy_on_header_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_progress\", ruby_curl_easy_on_progress_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_debug\", ruby_curl_easy_on_debug_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_success\", ruby_curl_easy_on_success_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_failure\", ruby_curl_easy_on_failure_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_missing\", ruby_curl_easy_on_missing_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_redirect\", ruby_curl_easy_on_redirect_set, -1);\n" + " rb_define_method(cCurlEasy, \"on_complete\", ruby_curl_easy_on_complete_set, -1);\n" + "\n" + " rb_define_method(cCurlEasy, \"http\", ruby_curl_easy_perform_verb, 1);\n" + " rb_define_method(cCurlEasy, \"http_post\", ruby_curl_easy_perform_post, -1);\n" + " rb_define_method(cCurlEasy, \"http_put\", ruby_curl_easy_perform_put, 1);\n" + "\n" + " /* Post-perform info methods */\n" + " rb_define_method(cCurlEasy, \"body_str\", ruby_curl_easy_body_str_get, 0);\n" + " rb_define_method(cCurlEasy, \"header_str\", ruby_curl_easy_header_str_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"last_effective_url\", ruby_curl_easy_last_effective_url_get, 0);\n" + " rb_define_method(cCurlEasy, \"response_code\", ruby_curl_easy_response_code_get, 0);\n" + " rb_define_method(cCurlEasy, \"code\", ruby_curl_easy_response_code_get, 0);\n" + "#if defined(HAVE_CURLINFO_PRIMARY_IP)\n" + " rb_define_method(cCurlEasy, \"primary_ip\", ruby_curl_easy_primary_ip_get, 0);\n" + "#endif\n" + " rb_define_method(cCurlEasy, \"http_connect_code\", ruby_curl_easy_http_connect_code_get, 0);\n" + " rb_define_method(cCurlEasy, \"file_time\", ruby_curl_easy_file_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"total_time\", ruby_curl_easy_total_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"name_lookup_time\", ruby_curl_easy_name_lookup_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"connect_time\", ruby_curl_easy_connect_time_get, 0);\n" + "#if defined(HAVE_CURLINFO_APPCONNECT_TIME)\n" + " rb_define_method(cCurlEasy, \"app_connect_time\", ruby_curl_easy_app_connect_time_get, 0);\n" + "#endif\n" + " rb_define_method(cCurlEasy, \"pre_transfer_time\", ruby_curl_easy_pre_transfer_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"start_transfer_time\", ruby_curl_easy_start_transfer_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"redirect_time\", ruby_curl_easy_redirect_time_get, 0);\n" + " rb_define_method(cCurlEasy, \"redirect_count\", ruby_curl_easy_redirect_count_get, 0);\n" + " rb_define_method(cCurlEasy, \"redirect_url\", ruby_curl_easy_redirect_url_get, 0);\n" + " rb_define_method(cCurlEasy, \"downloaded_bytes\", ruby_curl_easy_downloaded_bytes_get, 0);\n" + " rb_define_method(cCurlEasy, \"uploaded_bytes\", ruby_curl_easy_uploaded_bytes_get, 0);\n" + " rb_define_method(cCurlEasy, \"download_speed\", ruby_curl_easy_download_speed_get, 0);\n" + " rb_define_method(cCurlEasy, \"upload_speed\", ruby_curl_easy_upload_speed_get, 0);\n" + " rb_define_method(cCurlEasy, \"header_size\", ruby_curl_easy_header_size_get, 0);\n" + " rb_define_method(cCurlEasy, \"request_size\", ruby_curl_easy_request_size_get, 0);\n" + " rb_define_method(cCurlEasy, \"ssl_verify_result\", ruby_curl_easy_ssl_verify_result_get, 0);\n" + " rb_define_method(cCurlEasy, \"downloaded_content_length\", ruby_curl_easy_downloaded_content_length_get, 0);\n" + " rb_define_method(cCurlEasy, \"uploaded_content_length\", ruby_curl_easy_uploaded_content_length_get, 0);\n" + " rb_define_method(cCurlEasy, \"content_type\", ruby_curl_easy_content_type_get, 0);\n" + " rb_define_method(cCurlEasy, \"os_errno\", ruby_curl_easy_os_errno_get, 0);\n" + " rb_define_method(cCurlEasy, \"num_connects\", ruby_curl_easy_num_connects_get, 0);\n" + " rb_define_method(cCurlEasy, \"cookielist\", ruby_curl_easy_cookielist_get, 0);\n" + " rb_define_method(cCurlEasy, \"ftp_entry_path\", ruby_curl_easy_ftp_entry_path_get, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"close\", ruby_curl_easy_close, 0);\n" + " rb_define_method(cCurlEasy, \"reset\", ruby_curl_easy_reset, 0);\n" + "\n" + " /* Curl utils */\n" + " rb_define_method(cCurlEasy, \"escape\", ruby_curl_easy_escape, 1);\n" + " rb_define_method(cCurlEasy, \"unescape\", ruby_curl_easy_unescape, 1);\n" + "\n" + " /* Runtime support */\n" + " rb_define_method(cCurlEasy, \"clone\", ruby_curl_easy_clone, 0);\n" + " rb_define_alias(cCurlEasy, \"dup\", \"clone\");\n" + " rb_define_method(cCurlEasy, \"inspect\", ruby_curl_easy_inspect, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"multi\", ruby_curl_easy_multi_get, 0);\n" + " rb_define_method(cCurlEasy, \"multi=\", ruby_curl_easy_multi_set, 1);\n" + " rb_define_method(cCurlEasy, \"last_result\", ruby_curl_easy_last_result, 0);\n" + " rb_define_method(cCurlEasy, \"last_error\", ruby_curl_easy_last_error, 0);\n" + "\n" + " rb_define_method(cCurlEasy, \"setopt\", ruby_curl_easy_set_opt, 2);\n" + " rb_define_method(cCurlEasy, \"getinfo\", ruby_curl_easy_get_opt, 1);\n" + "}\n"> expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/ext/curb_easy.c'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n"> =============================================================================== F =============================================================================== Failure: test_arbitrary_http_verb(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:843:in 'TestCurbCurlEasy#test_arbitrary_http_verb' <"PURGE">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + + + Bad Request + +

Bad Request

+ bad URI `/methods'. +
? PU RGE ? ? ?? - +++ + WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 + + + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== E =============================================================================== Error: test_cookielist(TestCurbCurlEasy): NoMethodError: undefined method 'join' for nil /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:716:in 'TestCurbCurlEasy#test_cookielist' =============================================================================== F =============================================================================== Failure: test_curlopt_stderr_with_file(TestCurbCurlEasy): was expected to be =~ <"* Trying 127.0.0.1:9129...\n" + "* Connected to 127.0.0.1 (127.0.0.1) port 9129\n" + "* using HTTP/1.x\n" + "> GET /methods HTTP/1.1\r\n" + "Host: 127.0.0.1:9129\r\n" + "Accept: */*\r\n" + "\r\n" + "* Request completely sent off\n" + "< HTTP/1.1 400 Bad Request\r\n" + "< Content-Type: text/html; charset=ISO-8859-1\r\n" + "< Server: WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09)\r\n" + "< Date: Sun, 10 Nov 2024 07:50:48 GMT\r\n" + "< Content-Length: 302\r\n" + "< Connection: close\r\n" + "< \r\n" + "* shutting down connection #0\n">. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:32:in 'TestCurbCurlEasy#test_curlopt_stderr_with_file' =============================================================================== F =============================================================================== Failure: test_delete_remote(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:837:in 'TestCurbCurlEasy#test_delete_remote' <"DELETE">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + + ? DE LE T E ? Bad Request ? ++++++ ? ++++++++++++++ +++ ++++++++ + +

Bad Request

+ bad URI `/methods'. +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ ===============================================================================/builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:114: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) # terminated with exception (report_on_exception is true): /usr/share/gems/gems/test-unit-3.6.2/lib/test/unit/assertions.rb:60:in 'block in Test::Unit::Assertions#assert_block': was expected to be =~ (Test::Unit::AssertionFailedError) <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">. from /usr/share/gems/gems/test-unit-3.6.2/lib/test/unit/assertions.rb:1913:in 'Test::Unit::Assertions#_wrap_assertion' from /usr/share/gems/gems/test-unit-3.6.2/lib/test/unit/assertions.rb:54:in 'Test::Unit::Assertions#assert_block' from /usr/share/gems/gems/test-unit-3.6.2/lib/test/unit/assertions.rb:607:in 'block in Test::Unit::Assertions#assert_match' from /usr/share/gems/gems/test-unit-3.6.2/lib/test/unit/assertions.rb:1918:in 'Test::Unit::Assertions#_wrap_assertion' from /usr/share/gems/gems/test-unit-3.6.2/lib/test/unit/assertions.rb:602:in 'Test::Unit::Assertions#assert_match' from /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:1116:in 'block in TestCurbCurlEasy#test_easy_can_put_with_content_length' F =============================================================================== Failure: test_easy_can_put_with_content_length(TestCurbCurlEasy): was expected to be =~ <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:1116:in 'block in TestCurbCurlEasy#test_easy_can_put_with_content_length' =============================================================================== F =============================================================================== Failure: test_easy_http_verbs(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:1057:in 'TestCurbCurlEasy#test_easy_http_verbs' <"DELETE">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + + ? DE LE T E ? Bad Request ? ++++++ ? ++++++++++++++ +++ ++++++++ + +

Bad Request

+ bad URI `/methods'. +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_easy_http_verbs_with_errors(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:1090:in 'TestCurbCurlEasy#test_easy_http_verbs_with_errors' <"GET">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? GET ? ? ?? +++ + Bad Request + +

Bad Request

+ bad URI `/methods'. +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_form_post_body_remote(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:821:in 'TestCurbCurlEasy#test_form_post_body_remote' <"POST\n" + "foo=bar&encoded%20string=val">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? POST ? ? ??? +++ + Bad Request + +

Bad Request

? foo=bar& encoded%20string=val ? d URI `/m th '. ? ???? ?? ?? ----- ????????? +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ ===============================================================================/builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:216: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) F =============================================================================== Failure: test_get_remote(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:765:in 'TestCurbCurlEasy#test_get_remote' <"GET">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? GET ? ? ?? +++ + Bad Request + +

Bad Request

+ bad URI `/methods'. +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== E =============================================================================== Error: test_head_accessor(TestCurbCurlEasy): NoMethodError: undefined method '[]' for nil /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:864:in 'TestCurbCurlEasy#test_head_accessor' =============================================================================== E =============================================================================== Error: test_head_remote(TestCurbCurlEasy): NoMethodError: undefined method '[]' for nil /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:853:in 'TestCurbCurlEasy#test_head_remote' =============================================================================== F =============================================================================== Failure: test_http_get_block(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:253:in 'TestCurbCurlEasy#test_http_get_block' <"GET">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? GET ? ? ?? +++ + Bad Request + +

Bad Request

+ bad URI `/methods'. +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_nested_easy_methods(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:16:in 'block in TestCurbCurlEasy#test_nested_easy_methods' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl.rb:23:in 'Curl.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl.rb:31:in 'Curl.get' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:14:in 'TestCurbCurlEasy#test_nested_easy_methods' <404> expected but was <400> diff: ? 404 ? 0 ? ? =============================================================================== F =============================================================================== Failure: test_new_06(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:175:in 'block in TestCurbCurlEasy#test_new_06' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:173:in 'Curl::Easy#initialize' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:173:in 'Class#new' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:173:in 'TestCurbCurlEasy#test_new_06' <"POST\n">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? POST ? ? ??? +++ + Bad Request + +

Bad Request

+ bad URI `/methods'. +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_on_success_with_on_failure(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:738:in 'TestCurbCurlEasy#test_on_success_with_on_failure' <500> expected but was <400> diff: ? 500 ? 4 ? ? =============================================================================== F =============================================================================== Failure: test_on_success_with_on_missing(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:748:in 'TestCurbCurlEasy#test_on_success_with_on_missing' <404> expected but was <400> diff: ? 404 ? 0 ? ? =============================================================================== F =============================================================================== Failure: test_on_success_with_on_redirect(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:758:in 'TestCurbCurlEasy#test_on_success_with_on_redirect' <302> expected but was <400> diff: ? 302 ? 4 0 ? ? ? =============================================================================== F =============================================================================== Failure: test_post_multipart_array_remote(TestCurbCurlEasy): was expected to be =~ <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:803:in 'TestCurbCurlEasy#test_post_multipart_array_remote' =============================================================================== F =============================================================================== Failure: test_post_multipart_file_remote(TestCurbCurlEasy): was expected to be =~ <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:830:in 'TestCurbCurlEasy#test_post_multipart_file_remote' =============================================================================== F =============================================================================== Failure: test_post_remote(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:771:in 'TestCurbCurlEasy#test_post_remote' <"POST\n" + "document_id=5">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? POST ? ? ??? +++ + Bad Request + +

Bad Request

? docu ment_id=5 ? ba URI `/ ho s'. ? ++++++ ??? - ?? ?? +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_post_streaming(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:1020:in 'TestCurbCurlEasy#test_post_streaming' <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) expected but was <"# Curb - Libcurl bindings for Ruby\n" + "\n" + "* [CI Build Status](https://github.com/taf2/curb/actions/workflows/CI.yml)\n" + "* [rubydoc rdoc](http://www.rubydoc.info/github/taf2/curb/)\n" + "* [github project](http://github.com/taf2/curb/tree/master)\n" + "\n" + "Curb (probably CUrl-RuBy or something) provides Ruby-language bindings for the\n" + "libcurl(3), a fully-featured client-side URL transfer library.\n" + "cURL and libcurl live at [https://curl.se/libcurl/](https://curl.se/libcurl/) .\n" + "\n" + "Curb is a work-in-progress, and currently only supports libcurl's `easy` and `multi` modes.\n" + "\n" + "## License\n" + "\n" + "Curb is copyright (c) 2006 Ross Bamford, and released under the terms of the\n" + "Ruby license. See the LICENSE file for the gory details.\n" + "\n" + "## Easy mode\n" + "\n" + "GET request\n" + "```\n" + " res = Curl.get(\"https://www.google.com/\") {|http|\n" + " http.timeout = 10 # raise exception if request/response not handled within 10 seconds\n" + " }\n" + " puts res.code\n" + " puts res.head\n" + " puts res.body\n" + "```\n" + "\n" + "POST request\n" + "```\n" + " res = Curl.post(\"https://your-server.com/endpoint\", {post: \"this\"}.to_json) {|http|\n" + " http.headers[\"Content-Type\"] = \"application/json\"\n" + " }\n" + " puts res.code\n" + " puts res.head\n" + " puts res.body\n" + "```\n" + "\n" + "PATCH request\n" + "```\n" + " res = Curl.patch(\"https://your-server.com/endpoint\", {post: \"this\"}.to_json) {|http|\n" + " http.headers[\"Content-Type\"] = \"application/json\"\n" + " }\n" + " puts res.code\n" + " puts res.head\n" + " puts res.body\n" + "```\n" + "\n" + "\n" + "\n" + "## You will need\n" + "\n" + "* A working Ruby installation (`2.0.0+` will work but `2.1+` preferred) (it's possible it still works with 1.8.7 but you'd have to tell me if not...)\n" + "* A working libcurl development installation\n" + "(Ideally one of the versions listed in the compatibility chart below that maps to your `curb` version)\n" + "* A sane build environment (e.g. gcc, make)\n" + "\n" + "## Version Compatibility chart\n" + "\n" + "A **non-exhaustive** set of compatibility versions of the libcurl library\n" + "with this gem are as follows. (Note that these are only the ones that have been\n" + "tested and reported to work across a variety of platforms / rubies)\n" + "\n" + "| Gem Version | Release Date | libcurl versions |\n" + "| ----------- | ----------- | ---------------- |\n" + "| 1.0.0 | Jan 2022 | 7.58 - 7.81 |\n" + "| 0.9.8 | Jan 2019 | 7.58 - 7.81 |\n" + "| 0.9.7 | Nov 2018 | 7.56 - 7.60 |\n" + "| 0.9.6 | May 2018 | 7.51 - 7.59 |\n" + "| 0.9.5 | May 2018 | 7.51 - 7.59 |\n" + "| 0.9.4 | Aug 2017 | 7.41 - 7.58 |\n" + "| 0.9.3 | Apr 2016 | 7.26 - 7.58 |\n" + "\n" + "## Installation...\n" + "\n" + "... will usually be as simple as:\n" + "\n" + " $ gem install curb\n" + "\n" + "On Windows, make sure you're using the [DevKit](http://rubyinstaller.org/downloads/) and\n" + "the [development version of libcurl](http://curl.se/gknw.net/7.39.0/dist-w32/curl-7.39.0-devel-mingw32.zip). Unzip, then run this in your command\n" + "line (alter paths to your curl location, but remember to use forward slashes):\n" + "\n" + " gem install curb --platform=ruby -- --with-curl-lib=C:/curl-7.39.0-devel-mingw32/lib --with-curl-include=C:/curl-7.39.0-devel-mingw32/include\n" + " \n" + "Note that with Windows moving from one method of compiling to another as of Ruby `2.4` (DevKit -> MYSYS2),\n" + "the usage of Ruby `2.4+` with this gem on windows is unlikely to work. It is advised to use the\n" + "latest version of Ruby 2.3 available [HERE](https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.3.exe)\n" + "\n" + "Or, if you downloaded the archive:\n" + "\n" + " $ rake compile && rake install\n" + "\n" + "If you have a weird setup, you might need extconf options. In this case, pass\n" + "them like so:\n" + "\n" + " $ rake compile EXTCONF_OPTS='--with-curl-dir=/path/to/libcurl --prefix=/what/ever' && rake install\n" + "\n" + "Curb is tested only on GNU/Linux x86 and Mac OSX - YMMV on other platforms.\n" + "If you do use another platform and experience problems, or if you can\n" + "expand on the above instructions, please report the issue at http://github.com/taf2/curb/issues\n" + "\n" + "On Ubuntu, the dependencies can be satisfied by installing the following packages:\n" + "\n" + "18.04 and onwards\n" + " \n" + " $ sudo apt-get install libcurl4 libcurl3-gnutls libcurl4-openssl-dev\n" + "\n" + "< 18.04\n" + "\n" + " $ sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev\n" + "\n" + "On RedHat:\n" + "\n" + " $ sudo yum install ruby-devel libcurl-devel openssl-devel\n" + "\n" + "Curb has fairly extensive RDoc comments in the source. You can build the\n" + "documentation with:\n" + "\n" + " $ rake doc\n" + "\n" + "## Usage & examples\n" + "\n" + "Curb provides two classes:\n" + "\n" + "* `Curl::Easy` - simple API, for day-to-day tasks.\n" + "* `Curl::Multi` - more advanced API, for operating on multiple URLs simultaneously.\n" + "\n" + "To use either, you will need to require the curb gem:\n" + "\n" + "```ruby\n" + "require 'curb'\n" + "```\n" + "\n" + "### Super simple API (less typing)\n" + "\n" + "```ruby\n" + "http = Curl.get(\"http://www.google.com/\")\n" + "puts http.body_str\n" + "\n" + "http = Curl.post(\"http://www.google.com/\", {:foo => \"bar\"})\n" + "puts http.body_str\n" + "\n" + "http = Curl.get(\"http://www.google.com/\") do |http|\n" + " http.headers['Cookie'] = 'foo=1;bar=2'\n" + "end\n" + "puts http.body_str\n" + "```\n" + "\n" + "### Simple fetch via HTTP:\n" + "\n" + "```ruby\n" + "c = Curl::Easy.perform(\"http://www.google.co.uk\")\n" + "puts c.body_str\n" + "```\n" + "\n" + "Same thing, more manual:\n" + "\n" + "```ruby\n" + "c = Curl::Easy.new(\"http://www.google.co.uk\")\n" + "c.perform\n" + "puts c.body_str\n" + "```\n" + "\n" + "### Additional config:\n" + "\n" + "```ruby\n" + "Curl::Easy.perform(\"http://www.google.co.uk\") do |curl|\n" + " curl.headers[\"User-Agent\"] = \"myapp-0.0\"\n" + " curl.verbose = true\n" + "end\n" + "```\n" + "\n" + "Same thing, more manual:\n" + "\n" + "```ruby\n" + "c = Curl::Easy.new(\"http://www.google.co.uk\") do |curl|\n" + " curl.headers[\"User-Agent\"] = \"myapp-0.0\"\n" + " curl.verbose = true\n" + "end\n" + "\n" + "c.perform\n" + "```\n" + "\n" + "### HTTP basic authentication:\n" + "\n" + "```ruby\n" + "c = Curl::Easy.new(\"http://github.com/\")\n" + "c.http_auth_types = :basic\n" + "c.username = 'foo'\n" + "c.password = 'bar'\n" + "c.perform\n" + "```\n" + "\n" + "### HTTP \"insecure\" SSL connections (like curl -k, --insecure) to avoid Curl::Err::SSLCACertificateError:\n" + "\n" + "```ruby\n" + "c = Curl::Easy.new(\"https://github.com/\")\n" + "c.ssl_verify_peer = false\n" + "c.perform\n" + "```\n" + "\n" + "### Supplying custom handlers:\n" + "\n" + "```ruby\n" + "c = Curl::Easy.new(\"http://www.google.co.uk\")\n" + "\n" + "c.on_body { |data| print(data) }\n" + "c.on_header { |data| print(data) }\n" + "\n" + "c.perform\n" + "```\n" + "\n" + "### Reusing Curls:\n" + "\n" + "```ruby\n" + "c = Curl::Easy.new\n" + "\n" + "[\"http://www.google.co.uk\", \"http://www.ruby-lang.org/\"].map do |url|\n" + " c.url = url\n" + " c.perform\n" + " c.body_str\n" + "end\n" + "```\n" + "\n" + "### HTTP POST form:\n" + "\n" + "```ruby\n" + "c = Curl::Easy.http_post(\"http://my.rails.box/thing/create\",\n" + " Curl::PostField.content('thing[name]', 'box'),\n" + " Curl::PostField.content('thing[type]', 'storage'))\n" + "```\n" + "\n" + "### HTTP POST file upload:\n" + "\n" + "```ruby\n" + "c = Curl::Easy.new(\"http://my.rails.box/files/upload\")\n" + "c.multipart_form_post = true\n" + "c.http_post(Curl::PostField.file('thing[file]', 'myfile.rb'))\n" + "```\n" + "\n" + "### Using HTTP/2\n" + "\n" + "```ruby\n" + "c = Curl::Easy.new(\"https://http2.akamai.com\")\n" + "c.set(:HTTP_VERSION, Curl::HTTP_2_0)\n" + "\n" + "c.perform\n" + "puts (c.body_str.include? \"You are using HTTP/2 right now!\") ? \"HTTP/2\" : \"HTTP/1.x\"\n" + "```\n" + "\n" + "### Multi Interface (Basic HTTP GET):\n" + "\n" + "```ruby\n" + "# make multiple GET requests\n" + "easy_options = {:follow_location => true}\n" + "# Use Curl::CURLPIPE_MULTIPLEX for HTTP/2 multiplexing\n" + "multi_options = {:pipeline => Curl::CURLPIPE_HTTP1}\n" + "\n" + "Curl::Multi.get(['url1','url2','url3','url4','url5'], easy_options, multi_options) do|easy|\n" + " # do something interesting with the easy response\n" + " puts easy.last_effective_url\n" + "end\n" + "```\n" + "\n" + "### Multi Interface (Basic HTTP POST):\n" + "\n" + "```ruby\n" + "# make multiple POST requests\n" + "easy_options = {:follow_location => true, :multipart_form_post => true}\n" + "multi_options = {:pipeline => Curl::CURLPIPE_HTTP1}\n" + "\n" + "\n" + "url_fields = [\n" + " { :url => 'url1', :post_fields => {'f1' => 'v1'} },\n" + " { :url => 'url2', :post_fields => {'f1' => 'v1'} },\n" + " { :url => 'url3', :post_fields => {'f1' => 'v1'} }\n" + "]\n" + "\n" + "Curl::Multi.post(url_fields, easy_options, multi_options) do|easy|\n" + " # do something interesting with the easy response\n" + " puts easy.last_effective_url\n" + "end\n" + "```\n" + "\n" + "### Multi Interface (Advanced):\n" + "\n" + "```ruby\n" + "responses = {}\n" + "requests = [\"http://www.google.co.uk/\", \"http://www.ruby-lang.org/\"]\n" + "m = Curl::Multi.new\n" + "# add a few easy handles\n" + "requests.each do |url|\n" + " responses[url] = \"\"\n" + " c = Curl::Easy.new(url) do|curl|\n" + " curl.follow_location = true\n" + " curl.on_body{|data| responses[url] << data; data.size }\n" + " curl.on_success {|easy| puts \"success, add more easy handles\" }\n" + " end\n" + " m.add(c)\n" + "end\n" + "\n" + "m.perform do\n" + " puts \"idling... can do some work here\"\n" + "end\n" + "\n" + "requests.each do|url|\n" + " puts responses[url]\n" + "end\n" + "```\n" + "\n" + "### Easy Callbacks\n" + "\n" + "* `on_success` is called when the response code is 2xx\n" + "* `on_redirect` is called when the response code is 3xx\n" + "* `on_missing` is called when the response code is 4xx\n" + "* `on_failure` is called when the response code is 5xx\n" + "* `on_complete` is called in all cases.\n">(UTF-8) =============================================================================== F =============================================================================== Failure: test_post_with_body_remote(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:813:in 'TestCurbCurlEasy#test_post_with_body_remote' <"POST\n" + "foo=bar&encoded%20string=val">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? POST ? ? ??? +++ + Bad Request + +

Bad Request

? foo=bar& encoded%20string=val ? d URI `/m th '. ? ???? ?? ?? ----- ????????? +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_put_class_method(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:924:in 'TestCurbCurlEasy#test_put_class_method' <"PUT\n" + "require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))\n" + "class FooNoToS \n" + " undef to_s\n" + "end\n" + "\n" + "class TestCurbCurlEasy < Test::Unit::TestCase\n" + " def test_global_reset\n" + " Curl.get($TEST_URL)\n" + " # in a Timeout block you should reset the thread current handle \n" + " Curl.reset\n" + " end\n" + "\n" + " def test_nested_easy_methods\n" + " easy = Curl.get(TestServlet.url) {|http|\n" + " res = Curl.get(TestServlet.url + '/not_here')\n" + " assert_equal 404, res.code\n" + " }\n" + " assert_equal 200, easy.code\n" + " end\n" + "\n" + " def test_curlopt_stderr_with_file\n" + " # does not work with Tempfile directly\n" + " path = Tempfile.new('curb_test_curlopt_stderr').path\n" + " File.open(path, 'w') do |file|\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + " easy.verbose = true\n" + " easy.setopt(Curl::CURLOPT_STDERR, file)\n" + " easy.perform\n" + " end\n" + " output = File.read(path)\n" + "\n" + " assert_match(/HTTP\\/1\\.1\\ 200\\ OK(?:\\ )?/, output)\n" + " assert_match('Host: 127.0.0.1:9129', output)\n" + " end\n" + "\n" + " def test_curlopt_stderr_with_io\n" + " path = Tempfile.new('curb_test_curlopt_stderr').path\n" + " fd = IO.sysopen(path, 'w')\n" + " io = IO.for_fd(fd)\n" + "\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + " easy.verbose = true\n" + " easy.setopt(Curl::CURLOPT_STDERR, io)\n" + " easy.perform\n" + "\n" + "\n" + " output = File.read(path)\n" + "\n" + " assert_match(output, 'HTTP/1.1 200 OK')\n" + " assert_match(output, 'Host: 127.0.0.1:9129')\n" + " end\n" + "\n" + " def test_curlopt_stderr_fails_with_tempdir\n" + " Tempfile.open('curb_test_curlopt_stderr') do |tempfile|\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + "\n" + " assert_raise(TypeError) do\n" + " easy.setopt(Curl::CURLOPT_STDERR, tempfile)\n" + " end\n" + " end\n" + " end\n" + "\n" + " def test_curlopt_stderr_fails_with_stringio\n" + " stringio = StringIO.new\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + "\n" + " assert_raise(TypeError) do\n" + " easy.setopt(Curl::CURLOPT_STDERR, stringio)\n" + " end\n" + " end\n" + "\n" + " def test_curlopt_stderr_fails_with_string\n" + " string = String.new\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + "\n" + " assert_raise(TypeError) do\n" + " easy.setopt(Curl::CURLOPT_STDERR, string)\n" + " end\n" + " end\n" + "\n" + " def test_exception\n" + " begin\n" + " Curl.get('NOT_FOUND_URL')\n" + " rescue\n" + " assert true\n" + " rescue Exception\n" + " assert false, \"We should raise StandardError\"\n" + " end\n" + " end\n" + "\n" + " def test_threads\n" + " t = []\n" + " 5.times do\n" + " t << Thread.new do\n" + " 5.times do\n" + " c = Curl.get($TEST_URL)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body)\n" + " end\n" + " end\n" + " end\n" + "\n" + " t.each {|x| x.join }\n" + " end\n" + "\n" + " def test_class_perform_01 \n" + " assert_instance_of Curl::Easy, c = Curl::Easy.perform($TEST_URL)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body)\n" + " end \n" + "\n" + " def test_class_perform_02\n" + " data = \"\"\n" + " assert_instance_of Curl::Easy, c = Curl::Easy.perform($TEST_URL) { |curl| curl.on_body { |d| data << d; d.length } } \n" + "\n" + " assert_nil c.body_str\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, data)\n" + " end \n" + "\n" + " def test_class_perform_03\n" + " assert_raise(Curl::Err::CouldntReadError) { Curl::Easy.perform($TEST_URL + \"nonexistent\") }\n" + " end \n" + " \n" + " def test_new_01\n" + " c = Curl::Easy.new\n" + " assert_equal Curl::Easy, c.class\n" + " assert_nil c.url\n" + " assert_nil c.body_str\n" + " assert_nil c.header_str\n" + " end\n" + "\n" + " def test_new_02\n" + " c = Curl::Easy.new($TEST_URL)\n" + " assert_equal $TEST_URL, c.url\n" + " end\n" + " \n" + " def test_new_03\n" + " blk = lambda { |i| i.length }\n" + " \n" + " c = Curl::Easy.new do |curl|\n" + " curl.on_body(&blk)\n" + " end\n" + " \n" + " assert_nil c.url \n" + " assert_equal blk, c.on_body # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_body\n" + " end\n" + " \n" + " def test_new_04\n" + " blk = lambda { |i| i.length }\n" + " \n" + " c = Curl::Easy.new($TEST_URL) do |curl|\n" + " curl.on_body(&blk)\n" + " end\n" + " \n" + " assert_equal $TEST_URL, c.url\n" + " assert_equal blk, c.on_body # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_body\n" + " end\n" + "\n" + " class Foo < Curl::Easy ; end\n" + " def test_new_05\n" + " # can use Curl::Easy as a base class\n" + " c = Foo.new\n" + " assert_equal Foo, c.class\n" + " c.url = $TEST_URL\n" + " c.perform\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)\n" + " end\n" + "\n" + " # test invalid use of new\n" + " def test_new_06\n" + " Curl::Easy.new(TestServlet.url) do|curl|\n" + " curl.http_post\n" + " assert_equal \"POST\\n\", curl.body_str\n" + " end\n" + " end\n" + "\n" + " def test_escape\n" + " c = Curl::Easy.new\n" + " \n" + " assert_equal \"one%20two\", c.escape('one two')\n" + " assert_equal \"one%00two%20three\", c.escape(\"one\\000two three\") \n" + " end\n" + " \n" + " def test_unescape\n" + " c = Curl::Easy.new\n" + " \n" + " assert_equal \"one two\", c.unescape('one%20two')\n" + " \n" + " # prior to 7.15.4 embedded nulls cannot be unescaped\n" + " if Curl::VERNUM >= 0x070f04\n" + " assert_equal \"one\\000two three\", c.unescape(\"one%00two%20three\")\n" + " end\n" + " end\n" + " \n" + " def test_headers\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_equal({}, c.headers)\n" + " c.headers = \"Expect:\"\n" + " assert_equal \"Expect:\", c.headers\n" + " c.headers = [\"Expect:\", \"User-Agent: myapp-0.0.0\"]\n" + " assert_equal [\"Expect:\", \"User-Agent: myapp-0.0.0\"], c.headers\n" + " end \n" + "\n" + " def test_get_01 \n" + " c = Curl::Easy.new($TEST_URL) \n" + " assert_equal true, c.http_get\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)\n" + " end \n" + "\n" + " def test_get_02\n" + " data = \"\"\n" + " c = Curl::Easy.new($TEST_URL) do |curl|\n" + " curl.on_body { |d| data << d; d.length }\n" + " end\n" + " \n" + " assert_equal true, c.http_get \n" + " \n" + " assert_nil c.body_str\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, data)\n" + " end \n" + "\n" + " def test_get_03\n" + " c = Curl::Easy.new($TEST_URL + \"nonexistent\") \n" + " assert_raise(Curl::Err::CouldntReadError) { c.http_get }\n" + " assert_equal \"\", c.body_str\n" + " assert_equal \"\", c.header_str\n" + " end \n" + "\n" + "\n" + " def test_last_effective_url_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_equal $TEST_URL, c.url\n" + " assert_nil c.last_effective_url\n" + " \n" + " assert c.http_get\n" + " \n" + " assert_equal c.url, c.last_effective_url\n" + " c.url = \"file://some/new.url\"\n" + " \n" + " assert_not_equal c.last_effective_url, c.url\n" + " end\n" + "\n" + " def test_http_get_block\n" + " curl = Curl::Easy.http_get(TestServlet.url) do|c|\n" + " c.follow_location = true\n" + " c.max_redirects = 3\n" + " end\n" + " assert_equal curl.url, curl.last_effective_url\n" + " assert_equal 'GET', curl.body_str\n" + " end\n" + " \n" + " def test_local_port_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port \n" + " assert_nil c.local_port_range\n" + " assert_nil c.proxy_port\n" + " \n" + " c.local_port = 88\n" + "\n" + " assert_equal 88, c.local_port \n" + " assert_nil c.local_port_range\n" + " assert_nil c.proxy_port\n" + " \n" + " c.local_port = nil\n" + "\n" + " assert_nil c.local_port \n" + " assert_nil c.local_port_range\n" + " assert_nil c.proxy_port\n" + " end\n" + " \n" + " def test_local_port_02\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port \n" + " assert_raise(ArgumentError) { c.local_port = 0 }\n" + " assert_raise(ArgumentError) { c.local_port = 65536 }\n" + " assert_raise(ArgumentError) { c.local_port = -1 }\n" + " end\n" + " \n" + " def test_local_port_range_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port_range\n" + " assert_nil c.local_port\n" + " assert_nil c.proxy_port\n" + "\n" + " c.local_port_range = 88\n" + " assert_equal 88, c.local_port_range\n" + " assert_nil c.local_port\n" + " assert_nil c.proxy_port\n" + " \n" + " c.local_port_range = nil\n" + " \n" + " assert_nil c.local_port_range\n" + " assert_nil c.local_port\n" + " assert_nil c.proxy_port\n" + " end\n" + " \n" + " def test_local_port_range_02\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port_range \n" + " assert_raise(ArgumentError) { c.local_port_range = 0 }\n" + " assert_raise(ArgumentError) { c.local_port_range = 65536 }\n" + " assert_raise(ArgumentError) { c.local_port_range = -1 }\n" + " end\n" + " \n" + " def test_proxy_url_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_equal $TEST_URL, c.url\n" + " assert_nil c.proxy_url\n" + " \n" + " c.proxy_url = \"http://some.proxy\" \n" + "\n" + " assert_equal $TEST_URL, c.url\n" + " assert_equal \"http://some.proxy\", c.proxy_url\n" + " \n" + " c.proxy_url = nil\n" + " assert_equal $TEST_URL, c.url\n" + " assert_nil c.proxy_url\n" + " end\n" + " \n" + " def test_proxy_port_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port\n" + " assert_nil c.local_port_range \n" + " assert_nil c.proxy_port \n" + " \n" + " c.proxy_port = 88\n" + "\n" + " assert_equal 88, c.proxy_port \n" + " assert_nil c.local_port\n" + " assert_nil c.local_port_range\n" + " \n" + " c.proxy_port = nil\n" + " assert_nil c.proxy_port \n" + " assert_nil c.local_port\n" + " assert_nil c.local_port_range\n" + " end\n" + " \n" + " def test_proxy_port_02\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.proxy_port \n" + " assert_raise(ArgumentError) { c.proxy_port = 0 }\n" + " assert_raise(ArgumentError) { c.proxy_port = 65536 }\n" + " assert_raise(ArgumentError) { c.proxy_port = -1 }\n" + " end\n" + " \n" + " def test_proxy_type_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.proxy_type\n" + " \n" + " c.proxy_type = 3\n" + " assert_equal 3, c.proxy_type\n" + " \n" + " c.proxy_type = nil\n" + " assert_nil c.proxy_type\n" + " end\n" + " \n" + " def test_http_auth_types_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.http_auth_types\n" + " \n" + " c.http_auth_types = 3\n" + " assert_equal 3, c.http_auth_types\n" + " \n" + " c.http_auth_types = nil\n" + " assert_nil c.http_auth_types\n" + " end\n" + " \n" + " def test_proxy_auth_types_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.proxy_auth_types\n" + " \n" + " c.proxy_auth_types = 3\n" + " assert_equal 3, c.proxy_auth_types\n" + " \n" + " c.proxy_auth_types = nil\n" + " assert_nil c.proxy_auth_types\n" + " end\n" + " \n" + " def test_max_redirects_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.max_redirects\n" + " \n" + " c.max_redirects = 3\n" + " assert_equal 3, c.max_redirects\n" + " \n" + " c.max_redirects = nil\n" + " assert_nil c.max_redirects\n" + " end\n" + "\n" + " def test_timeout_with_floats\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " c.timeout = 1.5\n" + " assert_equal 1500, c.timeout_ms\n" + " assert_equal 1.5, c.timeout\n" + " end\n" + "\n" + " def test_timeout_with_negative\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " c.timeout = -1.5\n" + " assert_equal 0, c.timeout\n" + " assert_equal 0, c.timeout_ms\n" + "\n" + " c.timeout = -4.8\n" + " assert_equal 0, c.timeout\n" + " assert_equal 0, c.timeout_ms\n" + " end\n" + "\n" + " def test_timeout_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " assert_equal 0, c.timeout\n" + "\n" + " c.timeout = 3\n" + " assert_equal 3, c.timeout\n" + "\n" + " c.timeout = 0\n" + " assert_equal 0, c.timeout\n" + " end\n" + "\n" + " def test_timeout_ms_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " assert_equal 0, c.timeout_ms\n" + "\n" + " c.timeout_ms = 100\n" + " assert_equal 100, c.timeout_ms\n" + "\n" + " c.timeout_ms = nil\n" + " assert_equal 0, c.timeout_ms\n" + " end\n" + "\n" + " def test_timeout_ms_with_floats\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " c.timeout_ms = 55.5\n" + " assert_equal 55, c.timeout_ms\n" + " assert_equal 0.055, c.timeout\n" + " end\n" + "\n" + " def test_timeout_ms_with_negative\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " c.timeout_ms = -1.5\n" + " assert_equal 0, c.timeout\n" + " assert_equal 0, c.timeout_ms\n" + "\n" + " c.timeout_ms = -4.8\n" + " assert_equal 0, c.timeout\n" + " assert_equal 0, c.timeout_ms\n" + " end\n" + "\n" + " def test_connect_timeout_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.connect_timeout\n" + " \n" + " c.connect_timeout = 3\n" + " assert_equal 3, c.connect_timeout\n" + " \n" + " c.connect_timeout = nil\n" + " assert_nil c.connect_timeout\n" + " end\n" + "\n" + " def test_connect_timeout_ms_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " assert_nil c.connect_timeout_ms\n" + "\n" + " c.connect_timeout_ms = 100\n" + " assert_equal 100, c.connect_timeout_ms\n" + "\n" + " c.connect_timeout_ms = nil\n" + " assert_nil c.connect_timeout_ms\n" + " end\n" + "\n" + " def test_ftp_response_timeout_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.ftp_response_timeout\n" + " \n" + " c.ftp_response_timeout = 3\n" + " assert_equal 3, c.ftp_response_timeout\n" + " \n" + " c.ftp_response_timeout = nil\n" + " assert_nil c.ftp_response_timeout\n" + " end\n" + " \n" + " def test_dns_cache_timeout_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_equal 60, c.dns_cache_timeout\n" + " \n" + " c.dns_cache_timeout = nil\n" + " assert_nil c.dns_cache_timeout\n" + " \n" + " c.dns_cache_timeout = 30\n" + " assert_equal 30, c.dns_cache_timeout\n" + " end\n" + " \n" + " def test_low_speed_limit_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.low_speed_limit\n" + " \n" + " c.low_speed_limit = 3\n" + " assert_equal 3, c.low_speed_limit\n" + " \n" + " c.low_speed_limit = nil\n" + " assert_nil c.low_speed_limit\n" + " end\n" + " \n" + " def test_low_speed_time_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.low_speed_time\n" + " \n" + " c.low_speed_time = 3\n" + " assert_equal 3, c.low_speed_time\n" + " \n" + " c.low_speed_time = nil\n" + " assert_nil c.low_speed_time\n" + " end\n" + " \n" + " def test_on_body\n" + " blk = lambda { |i| i.length }\n" + " \n" + " c = Curl::Easy.new \n" + " c.on_body(&blk)\n" + " \n" + " assert_equal blk, c.on_body # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_body\n" + " end\n" + "\n" + " def test_inspect_with_no_url\n" + " c = Curl::Easy.new\n" + " assert_equal '#', c.inspect\n" + " end\n" + " \n" + " def test_inspect_with_short_url\n" + " c = Curl::Easy.new('http://www.google.com/')\n" + " assert_equal \"#\", c.inspect\n" + " end\n" + " \n" + " def test_inspect_truncates_to_64_chars\n" + " base_url = 'http://www.google.com/'\n" + " truncated_url = base_url + 'x' * (64 - '#'.size - base_url.size)\n" + " long_url = truncated_url + 'yyyy'\n" + " c = Curl::Easy.new(long_url)\n" + " assert_equal 64, c.inspect.size\n" + " assert_equal \"#\", c.inspect\n" + " end\n" + " \n" + " def test_on_header\n" + " blk = lambda { |i| i.length }\n" + " \n" + " c = Curl::Easy.new \n" + " c.on_header(&blk)\n" + " \n" + " assert_equal blk, c.on_header # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_header\n" + " end\n" + " \n" + " def test_on_progress\n" + " blk = lambda { |*args| true }\n" + " \n" + " c = Curl::Easy.new \n" + " c.on_progress(&blk)\n" + " \n" + " assert_equal blk, c.on_progress # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_progress\n" + " end\n" + " \n" + " def test_on_debug\n" + " blk = lambda { |*args| true }\n" + " \n" + " c = Curl::Easy.new \n" + " c.on_debug(&blk)\n" + " \n" + " assert_equal blk, c.on_debug # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_debug\n" + " end\n" + " \n" + " def test_proxy_tunnel\n" + " c = Curl::Easy.new \n" + " assert !c.proxy_tunnel?\n" + " assert c.proxy_tunnel = true\n" + " assert c.proxy_tunnel?\n" + " end\n" + " \n" + " def test_fetch_file_time\n" + " c = Curl::Easy.new \n" + " assert !c.fetch_file_time?\n" + " assert c.fetch_file_time = true\n" + " assert c.fetch_file_time?\n" + " end\n" + " \n" + " def test_ssl_verify_peer\n" + " c = Curl::Easy.new \n" + " assert c.ssl_verify_peer?\n" + " assert !c.ssl_verify_peer = false\n" + " assert !c.ssl_verify_peer?\n" + " end\n" + " \n" + " def test_ssl_verify_host\n" + " c = Curl::Easy.new \n" + " assert c.ssl_verify_host?\n" + " c.ssl_verify_host = 0\n" + " c.ssl_verify_host = false\n" + " assert !c.ssl_verify_host?\n" + " end\n" + " \n" + " def test_header_in_body\n" + " c = Curl::Easy.new \n" + " assert !c.header_in_body?\n" + " assert c.header_in_body = true\n" + " assert c.header_in_body?\n" + " end\n" + " \n" + " def test_use_netrc\n" + " c = Curl::Easy.new \n" + " assert !c.use_netrc?\n" + " assert c.use_netrc = true\n" + " assert c.use_netrc?\n" + " end\n" + " \n" + " def test_follow_location\n" + " c = Curl::Easy.new \n" + " assert !c.follow_location?\n" + " assert c.follow_location = true\n" + " assert c.follow_location?\n" + " end\n" + " \n" + " def test_unrestricted_auth\n" + " c = Curl::Easy.new \n" + " assert !c.unrestricted_auth?\n" + " assert c.unrestricted_auth = true\n" + " assert c.unrestricted_auth?\n" + " end \n" + " \n" + " def test_multipart_form_post\n" + " c = Curl::Easy.new\n" + " assert !c.multipart_form_post?\n" + " assert c.multipart_form_post = true\n" + " assert c.multipart_form_post?\n" + " end\n" + "\n" + " def test_ignore_content_length\n" + " c = Curl::Easy.new\n" + " assert !c.ignore_content_length?\n" + " assert c.ignore_content_length = true\n" + " assert c.ignore_content_length?\n" + " end\n" + "\n" + " def test_resolve_mode\n" + " c = Curl::Easy.new\n" + " assert_equal :auto, c.resolve_mode\n" + " c.resolve_mode = :ipv4\n" + " assert_equal :ipv4, c.resolve_mode \n" + " c.resolve_mode = :ipv6\n" + " assert_equal :ipv6, c.resolve_mode \n" + "\n" + " assert_raises(ArgumentError) { c.resolve_mode = :bad }\n" + " end\n" + "\n" + " def test_enable_cookies\n" + " c = Curl::Easy.new\n" + " assert !c.enable_cookies?\n" + " assert c.enable_cookies = true\n" + " assert c.enable_cookies?\n" + " end\n" + "\n" + " def test_cookies_option\n" + " c = Curl::Easy.new\n" + " assert_nil c.cookies\n" + " assert_equal \"name1=content1; name2=content2;\", c.cookies = \"name1=content1; name2=content2;\"\n" + " assert_equal \"name1=content1; name2=content2;\", c.cookies\n" + " end\n" + "\n" + " def test_cookiefile\n" + " c = Curl::Easy.new\n" + " assert_nil c.cookiefile\n" + " assert_equal \"some.file\", c.cookiefile = \"some.file\"\n" + " assert_equal \"some.file\", c.cookiefile \n" + " end\n" + "\n" + " def test_cookiejar\n" + " c = Curl::Easy.new\n" + " assert_nil c.cookiejar\n" + " assert_equal \"some.file\", c.cookiejar = \"some.file\"\n" + " assert_equal \"some.file\", c.cookiejar \n" + " end\n" + "\n" + " def test_cookielist\n" + " c = Curl::Easy.new TestServlet.url\n" + " c.enable_cookies = true\n" + " c.post_body = URI.encode_www_form('c' => 'somename=somevalue')\n" + " assert_nil c.cookielist\n" + " c.perform\n" + " assert_match(/somevalue/, c.cookielist.join(''))\n" + " end\n" + "\n" + " def test_on_success\n" + " curl = Curl::Easy.new($TEST_URL) \n" + " on_success_called = false\n" + " curl.on_success {|c|\n" + " on_success_called = true\n" + " assert_not_nil c.body\n" + " assert_match(/Content-Length: /, c.head)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body)\n" + " }\n" + " curl.perform\n" + " assert on_success_called, \"Success handler not called\" \n" + " end\n" + "\n" + " def test_on_success_with_on_failure\n" + " curl = Curl::Easy.new(TestServlet.url + '/error')\n" + " on_failure_called = false\n" + " curl.on_success {|c| } # make sure we get the failure call even though this handler is defined\n" + " curl.on_failure {|c,code| on_failure_called = true }\n" + " curl.perform\n" + " assert_equal 500, curl.response_code\n" + " assert on_failure_called, \"Failure handler not called\" \n" + " end\n" + "\n" + " def test_on_success_with_on_missing\n" + " curl = Curl::Easy.new(TestServlet.url + '/not_here')\n" + " on_missing_called = false\n" + " curl.on_success {|c| } # make sure we get the missing call even though this handler is defined\n" + " curl.on_missing {|c,code| on_missing_called = true }\n" + " curl.perform\n" + " assert_equal 404, curl.response_code\n" + " assert on_missing_called, \"Missing handler not called\" \n" + " end\n" + "\n" + " def test_on_success_with_on_redirect\n" + " curl = Curl::Easy.new(TestServlet.url + '/redirect')\n" + " on_redirect_called = false\n" + " curl.on_success {|c| } # make sure we get the redirect call even though this handler is defined\n" + " curl.on_redirect {|c,code| on_redirect_called = true }\n" + " curl.perform\n" + " assert_equal 302, curl.response_code\n" + " assert on_redirect_called, \"Redirect handler not called\" \n" + " end\n" + " \n" + " def test_get_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_get\n" + " assert_equal 'GET', curl.body_str\n" + " end\n" + " \n" + " def test_post_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_post([Curl::PostField.content('document_id', 5)])\n" + " assert_equal \"POST\\ndocument_id=5\", curl.unescape(curl.body_str)\n" + " end\n" + "\n" + " def test_post_remote_is_easy_handle\n" + " # see: http://pastie.org/560852 and\n" + " # http://groups.google.com/group/curb---ruby-libcurl-bindings/browse_thread/thread/216bb2d9b037f347?hl=en\n" + " [:post, :get, :head, :delete].each do |method|\n" + " retries = 0\n" + " begin\n" + " count = 0\n" + " Curl::Easy.send(\"http_\#{method}\", TestServlet.url) do|c|\n" + " count += 1\n" + " assert_equal Curl::Easy, c.class\n" + " end\n" + " assert_equal 1, count, \"For request method: \#{method.to_s.upcase}\"\n" + " rescue Curl::Err::HostResolutionError => e # travis-ci.org fails to resolve... try again?\n" + " retries+=1\n" + " retry if retries < 3\n" + " raise e\n" + " end\n" + " end\n" + " end\n" + "\n" + " # see: https://github.com/rvanlieshout/curb/commit/8bcdefddc0162484681ebd1a92d52a642666a445\n" + " def test_post_multipart_array_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.multipart_form_post = true\n" + " fields = [\n" + " Curl::PostField.file('foo', File.expand_path(File.join(File.dirname(__FILE__),'..','README.markdown'))),\n" + " Curl::PostField.file('bar', File.expand_path(File.join(File.dirname(__FILE__),'..','README.markdown')))\n" + " ]\n" + " curl.http_post(fields)\n" + " assert_match(/HTTP POST file upload/, curl.body_str)\n" + " assert_match(/Content-Disposition: form-data/, curl.body_str)\n" + " end\n" + " \n" + " def test_post_with_body_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.post_body = 'foo=bar&encoded%20string=val'\n" + " \n" + " curl.perform\n" + " \n" + " assert_equal \"POST\\nfoo=bar&encoded%20string=val\", curl.body_str\n" + " assert_equal 'foo=bar&encoded%20string=val', curl.post_body\n" + " end\n" + " \n" + " def test_form_post_body_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_post('foo=bar', 'encoded%20string=val')\n" + " \n" + " assert_equal \"POST\\nfoo=bar&encoded%20string=val\", curl.body_str\n" + " assert_equal 'foo=bar&encoded%20string=val', curl.post_body\n" + " end\n" + "\n" + " def test_post_multipart_file_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.multipart_form_post = true\n" + " pf = Curl::PostField.file('readme', File.expand_path(File.join(File.dirname(__FILE__),'..','README.markdown')))\n" + " curl.http_post(pf)\n" + " assert_match(/HTTP POST file upload/, curl.body_str)\n" + " assert_match(/Content-Disposition: form-data/, curl.body_str)\n" + " end\n" + "\n" + " def test_delete_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_delete\n" + " assert_equal 'DELETE', curl.body_str\n" + " end\n" + "\n" + " def test_arbitrary_http_verb\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http('PURGE')\n" + " assert_equal 'PURGE', curl.body_str\n" + " end\n" + "\n" + " def test_head_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_head\n" + "\n" + " redirect = curl.header_str.match(/Location: (.*)/)\n" + "\n" + " assert_equal '', curl.body_str\n" + " assert_match('/nonexistent', redirect[1])\n" + " end\n" + "\n" + " def test_head_accessor\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.head = true\n" + " curl.perform\n" + "\n" + " redirect = curl.header_str.match(/Location: (.*)/)\n" + "\n" + " assert_equal '', curl.body_str\n" + " assert_match('/nonexistent', redirect[1])\n" + " curl.head = false\n" + " curl.perform\n" + " assert_equal 'GET', curl.body_str\n" + " end\n" + "\n" + " def test_put_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.headers['Content-Type'] = 'application/json'\n" + " assert curl.http_put(\"message\")\n" + " assert_match(/^PUT/, curl.body_str)\n" + " assert_match(/message$/, curl.body_str)\n" + " assert_match(/message$/, curl.body)\n" + " assert_match(/application\\/json/, curl.header_str)\n" + " assert_match(/application\\/json/, curl.head)\n" + " end \n" + " \n" + " def test_put_data\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.put_data = 'message'\n" + " \n" + " curl.perform\n" + " \n" + " assert_match(/^PUT/, curl.body_str)\n" + " assert_match(/message$/, curl.body_str)\n" + " end\n" + "\n" + " # https://github.com/taf2/curb/issues/101\n" + " def test_put_data_null_bytes\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.put_data = \"a\\0b\"\n" + " \n" + " curl.perform\n" + " \n" + " assert_match(/^PUT/, curl.body_str)\n" + " assert_match(\"a\\0b\", curl.body_str)\n" + " end\n" + "\n" + " def test_put_nil_data_no_crash\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.put_data = nil\n" + " \n" + " curl.perform\n" + " end\n" + "\n" + " def test_put_remote_file\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " File.open(__FILE__,'rb') do|f|\n" + " assert curl.http_put(f)\n" + " end\n" + " assert_equal \"PUT\\n\#{File.read(__FILE__)}\", curl.body_str.tr(\"\\r\", '')\n" + " end\n" + " \n" + " def test_put_class_method\n" + " count = 0\n" + " curl = Curl::Easy.http_put(TestServlet.url,File.open(__FILE__,'rb')) do|c|\n" + " count += 1\n" + " assert_equal Curl::Easy, c.class\n" + " end\n" + " assert_equal 1, count\n" + " assert_equal \"PUT\\n\#{File.read(__FILE__)}\", curl.body_str.tr(\"\\r\", '')\n" + " end\n" + "\n" + " # Generate a self-signed cert with\n" + " # openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 \\\n" + " # -keyout tests/cert.pem -out tests/cert.pem\n" + " def test_cert\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.cert= File.join(File.dirname(__FILE__),\"cert.pem\")\n" + " assert_match(/cert.pem$/,curl.cert)\n" + " end\n" + "\n" + " def test_cert_with_password\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " path = File.join(File.dirname(__FILE__),\"cert.pem\")\n" + " curl.certpassword = 'password'\n" + " curl.cert = path\n" + " assert_match(/cert.pem$/,curl.cert)\n" + " end\n" + "\n" + " def test_cert_type\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.certtype= \"DER\"\n" + " assert_equal \"DER\", curl.certtype\n" + " end\n" + "\n" + " def test_default_certtype\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " assert_nil curl.certtype\n" + " curl.certtype = \"PEM\"\n" + " assert_equal \"PEM\", curl.certtype\n" + " end\n" + "\n" + " # Generate a CA cert with instructions at\n" + " # http://technocage.com/~caskey/openssl/\n" + " def test_ca_cert\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.cacert= File.join(File.dirname(__FILE__),\"cacert.pem\")\n" + " assert_match(/cacert.pem$/, curl.cacert)\n" + " end\n" + "\n" + " def test_user_agent\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.useragent= \"Curb-Easy/Ruby\"\n" + " assert_equal \"Curb-Easy/Ruby\",curl.useragent\n" + " end\n" + "\n" + " def test_username_password\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.username = \"foo\"\n" + " curl.password = \"bar\"\n" + " if !curl.username.nil?\n" + " assert_equal \"foo\", curl.username\n" + " assert_equal \"bar\", curl.password\n" + " else\n" + " curl.userpwd = \"foo:bar\"\n" + " end\n" + " curl.http_auth_types = :basic\n" + " #curl.verbose = true\n" + " curl.perform\n" + " assert_equal 'Basic Zm9vOmJhcg==', $auth_header\n" + " $auth_header = nil\n" + " # curl checks the auth type supported by the server, so we have to create a \n" + " # new easy handle if we're going to change the auth type...\n" + "\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.username = \"foo\"\n" + " curl.password = \"bar\"\n" + " if curl.username.nil?\n" + " curl.userpwd = \"foo:bar\"\n" + " end\n" + " curl.http_auth_types = :ntlm\n" + " curl.perform\n" + " assert_equal 'NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=', $auth_header\n" + " end\n" + "\n" + " def test_primary_ip\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " if curl.respond_to?(:primary_ip)\n" + " curl.perform\n" + " assert_equal '127.0.0.1', curl.primary_ip\n" + " end\n" + " end\n" + "\n" + " def test_post_streaming\n" + " readme = File.expand_path(File.join(File.dirname(__FILE__),'..','README.markdown'))\n" + " \n" + " pf = Curl::PostField.file(\"filename\", readme)\n" + "\n" + " easy = Curl::Easy.new\n" + "\n" + " easy.url = TestServlet.url\n" + " easy.multipart_form_post = true\n" + " easy.http_post(pf)\n" + "\n" + " assert_not_equal(0,easy.body_str.size)\n" + " assert_equal(easy.body_str.tr(\"\\r\", ''), File.read(readme))\n" + " end\n" + "\n" + "\n" + " def test_easy_close\n" + " easy = Curl::Easy.new\n" + " easy.close\n" + " easy.url = TestServlet.url\n" + " easy.http_get\n" + " end\n" + "\n" + " def test_easy_reset\n" + " easy = Curl::Easy.new\n" + " easy.url = TestServlet.url + \"?query=foo\"\n" + " easy.http_get\n" + " settings = easy.reset\n" + " assert settings.key?(:url)\n" + " assert settings.key?(:body_data)\n" + " assert settings.key?(:header_data)\n" + " easy.url = TestServlet.url\n" + " easy.http_get\n" + " end\n" + "\n" + " def test_easy_use_http_versions\n" + " easy = Curl::Easy.new\n" + " easy.url = TestServlet.url + \"?query=foo\"\n" + " #puts \"http none: \#{Curl::HTTP_NONE.inspect}\"\n" + " #puts \"http1.0: \#{Curl::HTTP_1_0.inspect}\"\n" + " #puts \"http1.1: \#{Curl::HTTP_1_1.inspect}\"\n" + " easy.version = Curl::HTTP_1_1\n" + " #easy.verbose = true\n" + " easy.http_get\n" + " end\n" + "\n" + " def test_easy_http_verbs\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_delete\n" + " assert_equal 'DELETE', curl.body_str\n" + " curl.http_get\n" + " assert_equal 'GET', curl.body_str\n" + " curl.http_post\n" + " assert_equal \"POST\\n\", curl.body_str\n" + " curl.http('PURGE')\n" + " assert_equal 'PURGE', curl.body_str\n" + " curl.http_put('hello')\n" + " assert_equal \"PUT\\nhello\", curl.body_str\n" + " curl.http('COPY')\n" + " assert_equal 'COPY', curl.body_str\n" + " end\n" + "\n" + " def test_easy_http_verbs_must_respond_to_str\n" + " # issue http://github.com/taf2/curb/issues/45\n" + " assert_nothing_raised do\n" + " c = Curl::Easy.new ; c.url = TestServlet.url ; c.http(:get)\n" + " end\n" + "\n" + " assert_raise RuntimeError do\n" + " c = Curl::Easy.new ; c.url = TestServlet.url ; c.http(FooNoToS.new)\n" + " end\n" + "\n" + " end\n" + "\n" + " # http://github.com/taf2/curb/issues/#issue/33\n" + " def test_easy_http_verbs_with_errors\n" + " curl = Curl::Easy.new(\"http://127.0.0.1:9012/\") # test will fail if http server on port 9012\n" + " assert_raise Curl::Err::ConnectionFailedError do\n" + " curl.http_delete\n" + " end\n" + " curl.url = TestServlet.url\n" + " curl.http_get\n" + " assert_equal 'GET', curl.body_str\n" + " end\n" + "\n" + " def test_easy_can_put_with_content_length\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " rd, wr = IO.pipe\n" + " buf = ((\"hello\")* (1000 / 5))\n" + "\n" + " producer = Thread.new do\n" + " 5.times do\n" + " wr << buf\n" + " sleep 0.1 # act as a slow producer\n" + " end\n" + " end\n" + "\n" + " consumer = Thread.new do\n" + "\n" + " #curl.verbose = true\n" + " curl.headers['Content-Length'] = buf.size * 5\n" + " curl.headers['User-Agent'] = \"Something else\"\n" + " curl.headers['Content-Type'] = \"text/javascript\"\n" + " curl.headers['Date'] = Time.now.httpdate\n" + " curl.headers['Host'] = 's3.amazonaws.com'\n" + " curl.headers['Accept'] = '*/*'\n" + " curl.headers['Authorization'] = 'Foo Bar Biz Baz'\n" + " curl.http_put(rd)\n" + " assert_match(/^PUT/, curl.body_str)\n" + " assert_match(/hello$/, curl.body_str)\n" + " curl.header_str\n" + " curl.body_str\n" + " end\n" + "\n" + " producer.join\n" + " wr.close\n" + " consumer.join\n" + "\n" + " end\n" + "\n" + " def test_get_set_multi_on_easy\n" + " easy = Curl::Easy.new\n" + " assert_nil easy.multi\n" + " multi = Curl::Multi.new\n" + " easy.multi = multi\n" + " assert_not_nil easy.multi\n" + " assert_equal multi, easy.multi\n" + " end\n" + "\n" + " def test_raise_on_progress\n" + " c = Curl::Easy.new($TEST_URL)\n" + " c.on_progress {|w,x,y,z| raise \"error\" }\n" + " c.perform\n" + " rescue => e\n" + " assert_equal 'Curl::Err::AbortedByCallbackError', e.class.to_s\n" + " c.close\n" + " end\n" + "\n" + " def test_raise_on_success\n" + " c = Curl::Easy.new($TEST_URL)\n" + " c.on_success {|x| raise \"error\" }\n" + " c.perform\n" + " rescue Curl::Err::AbortedByCallbackError => e\n" + " assert_equal 'Curl::Err::AbortedByCallbackError', e.class.to_s\n" + " c.close\n" + " end\n" + "\n" + " def test_raise_on_debug\n" + " c = Curl::Easy.new($TEST_URL)\n" + " c.on_debug { raise \"error\" }\n" + " c.perform\n" + " assert true, \"raise in on debug has no effect\"\n" + " end\n" + "\n" + " def test_status_codes\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.perform\n" + " assert_equal '200 OK', curl.status\n" + " end\n" + "\n" + " def test_close_in_on_callbacks\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.on_body {|d| curl.close; d.size }\n" + " assert_raises RuntimeError do\n" + " curl.perform\n" + " end\n" + " end\n" + "\n" + " def test_set_unsupported_options\n" + " curl = Curl::Easy.new\n" + " assert_raises TypeError do\n" + " curl.set(99999, 1)\n" + " end\n" + " end\n" + "\n" + " include TestServerMethods \n" + "\n" + " def setup\n" + " server_setup\n" + " end\n" + "\n" + "end\n">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) =============================================================================== F =============================================================================== Failure: test_put_data(TestCurbCurlEasy): was expected to be =~ <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:887:in 'TestCurbCurlEasy#test_put_data' =============================================================================== F =============================================================================== Failure: test_put_data_null_bytes(TestCurbCurlEasy): was expected to be =~ <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:898:in 'TestCurbCurlEasy#test_put_data_null_bytes' =============================================================================== F =============================================================================== Failure: test_put_remote(TestCurbCurlEasy): was expected to be =~ <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:874:in 'TestCurbCurlEasy#test_put_remote' =============================================================================== F =============================================================================== Failure: test_put_remote_file(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:914:in 'TestCurbCurlEasy#test_put_remote_file' <"PUT\n" + "require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))\n" + "class FooNoToS \n" + " undef to_s\n" + "end\n" + "\n" + "class TestCurbCurlEasy < Test::Unit::TestCase\n" + " def test_global_reset\n" + " Curl.get($TEST_URL)\n" + " # in a Timeout block you should reset the thread current handle \n" + " Curl.reset\n" + " end\n" + "\n" + " def test_nested_easy_methods\n" + " easy = Curl.get(TestServlet.url) {|http|\n" + " res = Curl.get(TestServlet.url + '/not_here')\n" + " assert_equal 404, res.code\n" + " }\n" + " assert_equal 200, easy.code\n" + " end\n" + "\n" + " def test_curlopt_stderr_with_file\n" + " # does not work with Tempfile directly\n" + " path = Tempfile.new('curb_test_curlopt_stderr').path\n" + " File.open(path, 'w') do |file|\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + " easy.verbose = true\n" + " easy.setopt(Curl::CURLOPT_STDERR, file)\n" + " easy.perform\n" + " end\n" + " output = File.read(path)\n" + "\n" + " assert_match(/HTTP\\/1\\.1\\ 200\\ OK(?:\\ )?/, output)\n" + " assert_match('Host: 127.0.0.1:9129', output)\n" + " end\n" + "\n" + " def test_curlopt_stderr_with_io\n" + " path = Tempfile.new('curb_test_curlopt_stderr').path\n" + " fd = IO.sysopen(path, 'w')\n" + " io = IO.for_fd(fd)\n" + "\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + " easy.verbose = true\n" + " easy.setopt(Curl::CURLOPT_STDERR, io)\n" + " easy.perform\n" + "\n" + "\n" + " output = File.read(path)\n" + "\n" + " assert_match(output, 'HTTP/1.1 200 OK')\n" + " assert_match(output, 'Host: 127.0.0.1:9129')\n" + " end\n" + "\n" + " def test_curlopt_stderr_fails_with_tempdir\n" + " Tempfile.open('curb_test_curlopt_stderr') do |tempfile|\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + "\n" + " assert_raise(TypeError) do\n" + " easy.setopt(Curl::CURLOPT_STDERR, tempfile)\n" + " end\n" + " end\n" + " end\n" + "\n" + " def test_curlopt_stderr_fails_with_stringio\n" + " stringio = StringIO.new\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + "\n" + " assert_raise(TypeError) do\n" + " easy.setopt(Curl::CURLOPT_STDERR, stringio)\n" + " end\n" + " end\n" + "\n" + " def test_curlopt_stderr_fails_with_string\n" + " string = String.new\n" + " easy = Curl::Easy.new(TestServlet.url)\n" + "\n" + " assert_raise(TypeError) do\n" + " easy.setopt(Curl::CURLOPT_STDERR, string)\n" + " end\n" + " end\n" + "\n" + " def test_exception\n" + " begin\n" + " Curl.get('NOT_FOUND_URL')\n" + " rescue\n" + " assert true\n" + " rescue Exception\n" + " assert false, \"We should raise StandardError\"\n" + " end\n" + " end\n" + "\n" + " def test_threads\n" + " t = []\n" + " 5.times do\n" + " t << Thread.new do\n" + " 5.times do\n" + " c = Curl.get($TEST_URL)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body)\n" + " end\n" + " end\n" + " end\n" + "\n" + " t.each {|x| x.join }\n" + " end\n" + "\n" + " def test_class_perform_01 \n" + " assert_instance_of Curl::Easy, c = Curl::Easy.perform($TEST_URL)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body)\n" + " end \n" + "\n" + " def test_class_perform_02\n" + " data = \"\"\n" + " assert_instance_of Curl::Easy, c = Curl::Easy.perform($TEST_URL) { |curl| curl.on_body { |d| data << d; d.length } } \n" + "\n" + " assert_nil c.body_str\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, data)\n" + " end \n" + "\n" + " def test_class_perform_03\n" + " assert_raise(Curl::Err::CouldntReadError) { Curl::Easy.perform($TEST_URL + \"nonexistent\") }\n" + " end \n" + " \n" + " def test_new_01\n" + " c = Curl::Easy.new\n" + " assert_equal Curl::Easy, c.class\n" + " assert_nil c.url\n" + " assert_nil c.body_str\n" + " assert_nil c.header_str\n" + " end\n" + "\n" + " def test_new_02\n" + " c = Curl::Easy.new($TEST_URL)\n" + " assert_equal $TEST_URL, c.url\n" + " end\n" + " \n" + " def test_new_03\n" + " blk = lambda { |i| i.length }\n" + " \n" + " c = Curl::Easy.new do |curl|\n" + " curl.on_body(&blk)\n" + " end\n" + " \n" + " assert_nil c.url \n" + " assert_equal blk, c.on_body # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_body\n" + " end\n" + " \n" + " def test_new_04\n" + " blk = lambda { |i| i.length }\n" + " \n" + " c = Curl::Easy.new($TEST_URL) do |curl|\n" + " curl.on_body(&blk)\n" + " end\n" + " \n" + " assert_equal $TEST_URL, c.url\n" + " assert_equal blk, c.on_body # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_body\n" + " end\n" + "\n" + " class Foo < Curl::Easy ; end\n" + " def test_new_05\n" + " # can use Curl::Easy as a base class\n" + " c = Foo.new\n" + " assert_equal Foo, c.class\n" + " c.url = $TEST_URL\n" + " c.perform\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)\n" + " end\n" + "\n" + " # test invalid use of new\n" + " def test_new_06\n" + " Curl::Easy.new(TestServlet.url) do|curl|\n" + " curl.http_post\n" + " assert_equal \"POST\\n\", curl.body_str\n" + " end\n" + " end\n" + "\n" + " def test_escape\n" + " c = Curl::Easy.new\n" + " \n" + " assert_equal \"one%20two\", c.escape('one two')\n" + " assert_equal \"one%00two%20three\", c.escape(\"one\\000two three\") \n" + " end\n" + " \n" + " def test_unescape\n" + " c = Curl::Easy.new\n" + " \n" + " assert_equal \"one two\", c.unescape('one%20two')\n" + " \n" + " # prior to 7.15.4 embedded nulls cannot be unescaped\n" + " if Curl::VERNUM >= 0x070f04\n" + " assert_equal \"one\\000two three\", c.unescape(\"one%00two%20three\")\n" + " end\n" + " end\n" + " \n" + " def test_headers\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_equal({}, c.headers)\n" + " c.headers = \"Expect:\"\n" + " assert_equal \"Expect:\", c.headers\n" + " c.headers = [\"Expect:\", \"User-Agent: myapp-0.0.0\"]\n" + " assert_equal [\"Expect:\", \"User-Agent: myapp-0.0.0\"], c.headers\n" + " end \n" + "\n" + " def test_get_01 \n" + " c = Curl::Easy.new($TEST_URL) \n" + " assert_equal true, c.http_get\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body_str)\n" + " end \n" + "\n" + " def test_get_02\n" + " data = \"\"\n" + " c = Curl::Easy.new($TEST_URL) do |curl|\n" + " curl.on_body { |d| data << d; d.length }\n" + " end\n" + " \n" + " assert_equal true, c.http_get \n" + " \n" + " assert_nil c.body_str\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, data)\n" + " end \n" + "\n" + " def test_get_03\n" + " c = Curl::Easy.new($TEST_URL + \"nonexistent\") \n" + " assert_raise(Curl::Err::CouldntReadError) { c.http_get }\n" + " assert_equal \"\", c.body_str\n" + " assert_equal \"\", c.header_str\n" + " end \n" + "\n" + "\n" + " def test_last_effective_url_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_equal $TEST_URL, c.url\n" + " assert_nil c.last_effective_url\n" + " \n" + " assert c.http_get\n" + " \n" + " assert_equal c.url, c.last_effective_url\n" + " c.url = \"file://some/new.url\"\n" + " \n" + " assert_not_equal c.last_effective_url, c.url\n" + " end\n" + "\n" + " def test_http_get_block\n" + " curl = Curl::Easy.http_get(TestServlet.url) do|c|\n" + " c.follow_location = true\n" + " c.max_redirects = 3\n" + " end\n" + " assert_equal curl.url, curl.last_effective_url\n" + " assert_equal 'GET', curl.body_str\n" + " end\n" + " \n" + " def test_local_port_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port \n" + " assert_nil c.local_port_range\n" + " assert_nil c.proxy_port\n" + " \n" + " c.local_port = 88\n" + "\n" + " assert_equal 88, c.local_port \n" + " assert_nil c.local_port_range\n" + " assert_nil c.proxy_port\n" + " \n" + " c.local_port = nil\n" + "\n" + " assert_nil c.local_port \n" + " assert_nil c.local_port_range\n" + " assert_nil c.proxy_port\n" + " end\n" + " \n" + " def test_local_port_02\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port \n" + " assert_raise(ArgumentError) { c.local_port = 0 }\n" + " assert_raise(ArgumentError) { c.local_port = 65536 }\n" + " assert_raise(ArgumentError) { c.local_port = -1 }\n" + " end\n" + " \n" + " def test_local_port_range_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port_range\n" + " assert_nil c.local_port\n" + " assert_nil c.proxy_port\n" + "\n" + " c.local_port_range = 88\n" + " assert_equal 88, c.local_port_range\n" + " assert_nil c.local_port\n" + " assert_nil c.proxy_port\n" + " \n" + " c.local_port_range = nil\n" + " \n" + " assert_nil c.local_port_range\n" + " assert_nil c.local_port\n" + " assert_nil c.proxy_port\n" + " end\n" + " \n" + " def test_local_port_range_02\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port_range \n" + " assert_raise(ArgumentError) { c.local_port_range = 0 }\n" + " assert_raise(ArgumentError) { c.local_port_range = 65536 }\n" + " assert_raise(ArgumentError) { c.local_port_range = -1 }\n" + " end\n" + " \n" + " def test_proxy_url_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_equal $TEST_URL, c.url\n" + " assert_nil c.proxy_url\n" + " \n" + " c.proxy_url = \"http://some.proxy\" \n" + "\n" + " assert_equal $TEST_URL, c.url\n" + " assert_equal \"http://some.proxy\", c.proxy_url\n" + " \n" + " c.proxy_url = nil\n" + " assert_equal $TEST_URL, c.url\n" + " assert_nil c.proxy_url\n" + " end\n" + " \n" + " def test_proxy_port_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.local_port\n" + " assert_nil c.local_port_range \n" + " assert_nil c.proxy_port \n" + " \n" + " c.proxy_port = 88\n" + "\n" + " assert_equal 88, c.proxy_port \n" + " assert_nil c.local_port\n" + " assert_nil c.local_port_range\n" + " \n" + " c.proxy_port = nil\n" + " assert_nil c.proxy_port \n" + " assert_nil c.local_port\n" + " assert_nil c.local_port_range\n" + " end\n" + " \n" + " def test_proxy_port_02\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.proxy_port \n" + " assert_raise(ArgumentError) { c.proxy_port = 0 }\n" + " assert_raise(ArgumentError) { c.proxy_port = 65536 }\n" + " assert_raise(ArgumentError) { c.proxy_port = -1 }\n" + " end\n" + " \n" + " def test_proxy_type_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.proxy_type\n" + " \n" + " c.proxy_type = 3\n" + " assert_equal 3, c.proxy_type\n" + " \n" + " c.proxy_type = nil\n" + " assert_nil c.proxy_type\n" + " end\n" + " \n" + " def test_http_auth_types_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.http_auth_types\n" + " \n" + " c.http_auth_types = 3\n" + " assert_equal 3, c.http_auth_types\n" + " \n" + " c.http_auth_types = nil\n" + " assert_nil c.http_auth_types\n" + " end\n" + " \n" + " def test_proxy_auth_types_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.proxy_auth_types\n" + " \n" + " c.proxy_auth_types = 3\n" + " assert_equal 3, c.proxy_auth_types\n" + " \n" + " c.proxy_auth_types = nil\n" + " assert_nil c.proxy_auth_types\n" + " end\n" + " \n" + " def test_max_redirects_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.max_redirects\n" + " \n" + " c.max_redirects = 3\n" + " assert_equal 3, c.max_redirects\n" + " \n" + " c.max_redirects = nil\n" + " assert_nil c.max_redirects\n" + " end\n" + "\n" + " def test_timeout_with_floats\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " c.timeout = 1.5\n" + " assert_equal 1500, c.timeout_ms\n" + " assert_equal 1.5, c.timeout\n" + " end\n" + "\n" + " def test_timeout_with_negative\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " c.timeout = -1.5\n" + " assert_equal 0, c.timeout\n" + " assert_equal 0, c.timeout_ms\n" + "\n" + " c.timeout = -4.8\n" + " assert_equal 0, c.timeout\n" + " assert_equal 0, c.timeout_ms\n" + " end\n" + "\n" + " def test_timeout_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " assert_equal 0, c.timeout\n" + "\n" + " c.timeout = 3\n" + " assert_equal 3, c.timeout\n" + "\n" + " c.timeout = 0\n" + " assert_equal 0, c.timeout\n" + " end\n" + "\n" + " def test_timeout_ms_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " assert_equal 0, c.timeout_ms\n" + "\n" + " c.timeout_ms = 100\n" + " assert_equal 100, c.timeout_ms\n" + "\n" + " c.timeout_ms = nil\n" + " assert_equal 0, c.timeout_ms\n" + " end\n" + "\n" + " def test_timeout_ms_with_floats\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " c.timeout_ms = 55.5\n" + " assert_equal 55, c.timeout_ms\n" + " assert_equal 0.055, c.timeout\n" + " end\n" + "\n" + " def test_timeout_ms_with_negative\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " c.timeout_ms = -1.5\n" + " assert_equal 0, c.timeout\n" + " assert_equal 0, c.timeout_ms\n" + "\n" + " c.timeout_ms = -4.8\n" + " assert_equal 0, c.timeout\n" + " assert_equal 0, c.timeout_ms\n" + " end\n" + "\n" + " def test_connect_timeout_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.connect_timeout\n" + " \n" + " c.connect_timeout = 3\n" + " assert_equal 3, c.connect_timeout\n" + " \n" + " c.connect_timeout = nil\n" + " assert_nil c.connect_timeout\n" + " end\n" + "\n" + " def test_connect_timeout_ms_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + "\n" + " assert_nil c.connect_timeout_ms\n" + "\n" + " c.connect_timeout_ms = 100\n" + " assert_equal 100, c.connect_timeout_ms\n" + "\n" + " c.connect_timeout_ms = nil\n" + " assert_nil c.connect_timeout_ms\n" + " end\n" + "\n" + " def test_ftp_response_timeout_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.ftp_response_timeout\n" + " \n" + " c.ftp_response_timeout = 3\n" + " assert_equal 3, c.ftp_response_timeout\n" + " \n" + " c.ftp_response_timeout = nil\n" + " assert_nil c.ftp_response_timeout\n" + " end\n" + " \n" + " def test_dns_cache_timeout_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_equal 60, c.dns_cache_timeout\n" + " \n" + " c.dns_cache_timeout = nil\n" + " assert_nil c.dns_cache_timeout\n" + " \n" + " c.dns_cache_timeout = 30\n" + " assert_equal 30, c.dns_cache_timeout\n" + " end\n" + " \n" + " def test_low_speed_limit_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.low_speed_limit\n" + " \n" + " c.low_speed_limit = 3\n" + " assert_equal 3, c.low_speed_limit\n" + " \n" + " c.low_speed_limit = nil\n" + " assert_nil c.low_speed_limit\n" + " end\n" + " \n" + " def test_low_speed_time_01\n" + " c = Curl::Easy.new($TEST_URL)\n" + " \n" + " assert_nil c.low_speed_time\n" + " \n" + " c.low_speed_time = 3\n" + " assert_equal 3, c.low_speed_time\n" + " \n" + " c.low_speed_time = nil\n" + " assert_nil c.low_speed_time\n" + " end\n" + " \n" + " def test_on_body\n" + " blk = lambda { |i| i.length }\n" + " \n" + " c = Curl::Easy.new \n" + " c.on_body(&blk)\n" + " \n" + " assert_equal blk, c.on_body # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_body\n" + " end\n" + "\n" + " def test_inspect_with_no_url\n" + " c = Curl::Easy.new\n" + " assert_equal '#', c.inspect\n" + " end\n" + " \n" + " def test_inspect_with_short_url\n" + " c = Curl::Easy.new('http://www.google.com/')\n" + " assert_equal \"#\", c.inspect\n" + " end\n" + " \n" + " def test_inspect_truncates_to_64_chars\n" + " base_url = 'http://www.google.com/'\n" + " truncated_url = base_url + 'x' * (64 - '#'.size - base_url.size)\n" + " long_url = truncated_url + 'yyyy'\n" + " c = Curl::Easy.new(long_url)\n" + " assert_equal 64, c.inspect.size\n" + " assert_equal \"#\", c.inspect\n" + " end\n" + " \n" + " def test_on_header\n" + " blk = lambda { |i| i.length }\n" + " \n" + " c = Curl::Easy.new \n" + " c.on_header(&blk)\n" + " \n" + " assert_equal blk, c.on_header # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_header\n" + " end\n" + " \n" + " def test_on_progress\n" + " blk = lambda { |*args| true }\n" + " \n" + " c = Curl::Easy.new \n" + " c.on_progress(&blk)\n" + " \n" + " assert_equal blk, c.on_progress # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_progress\n" + " end\n" + " \n" + " def test_on_debug\n" + " blk = lambda { |*args| true }\n" + " \n" + " c = Curl::Easy.new \n" + " c.on_debug(&blk)\n" + " \n" + " assert_equal blk, c.on_debug # sets handler nil, returns old handler\n" + " assert_equal nil, c.on_debug\n" + " end\n" + " \n" + " def test_proxy_tunnel\n" + " c = Curl::Easy.new \n" + " assert !c.proxy_tunnel?\n" + " assert c.proxy_tunnel = true\n" + " assert c.proxy_tunnel?\n" + " end\n" + " \n" + " def test_fetch_file_time\n" + " c = Curl::Easy.new \n" + " assert !c.fetch_file_time?\n" + " assert c.fetch_file_time = true\n" + " assert c.fetch_file_time?\n" + " end\n" + " \n" + " def test_ssl_verify_peer\n" + " c = Curl::Easy.new \n" + " assert c.ssl_verify_peer?\n" + " assert !c.ssl_verify_peer = false\n" + " assert !c.ssl_verify_peer?\n" + " end\n" + " \n" + " def test_ssl_verify_host\n" + " c = Curl::Easy.new \n" + " assert c.ssl_verify_host?\n" + " c.ssl_verify_host = 0\n" + " c.ssl_verify_host = false\n" + " assert !c.ssl_verify_host?\n" + " end\n" + " \n" + " def test_header_in_body\n" + " c = Curl::Easy.new \n" + " assert !c.header_in_body?\n" + " assert c.header_in_body = true\n" + " assert c.header_in_body?\n" + " end\n" + " \n" + " def test_use_netrc\n" + " c = Curl::Easy.new \n" + " assert !c.use_netrc?\n" + " assert c.use_netrc = true\n" + " assert c.use_netrc?\n" + " end\n" + " \n" + " def test_follow_location\n" + " c = Curl::Easy.new \n" + " assert !c.follow_location?\n" + " assert c.follow_location = true\n" + " assert c.follow_location?\n" + " end\n" + " \n" + " def test_unrestricted_auth\n" + " c = Curl::Easy.new \n" + " assert !c.unrestricted_auth?\n" + " assert c.unrestricted_auth = true\n" + " assert c.unrestricted_auth?\n" + " end \n" + " \n" + " def test_multipart_form_post\n" + " c = Curl::Easy.new\n" + " assert !c.multipart_form_post?\n" + " assert c.multipart_form_post = true\n" + " assert c.multipart_form_post?\n" + " end\n" + "\n" + " def test_ignore_content_length\n" + " c = Curl::Easy.new\n" + " assert !c.ignore_content_length?\n" + " assert c.ignore_content_length = true\n" + " assert c.ignore_content_length?\n" + " end\n" + "\n" + " def test_resolve_mode\n" + " c = Curl::Easy.new\n" + " assert_equal :auto, c.resolve_mode\n" + " c.resolve_mode = :ipv4\n" + " assert_equal :ipv4, c.resolve_mode \n" + " c.resolve_mode = :ipv6\n" + " assert_equal :ipv6, c.resolve_mode \n" + "\n" + " assert_raises(ArgumentError) { c.resolve_mode = :bad }\n" + " end\n" + "\n" + " def test_enable_cookies\n" + " c = Curl::Easy.new\n" + " assert !c.enable_cookies?\n" + " assert c.enable_cookies = true\n" + " assert c.enable_cookies?\n" + " end\n" + "\n" + " def test_cookies_option\n" + " c = Curl::Easy.new\n" + " assert_nil c.cookies\n" + " assert_equal \"name1=content1; name2=content2;\", c.cookies = \"name1=content1; name2=content2;\"\n" + " assert_equal \"name1=content1; name2=content2;\", c.cookies\n" + " end\n" + "\n" + " def test_cookiefile\n" + " c = Curl::Easy.new\n" + " assert_nil c.cookiefile\n" + " assert_equal \"some.file\", c.cookiefile = \"some.file\"\n" + " assert_equal \"some.file\", c.cookiefile \n" + " end\n" + "\n" + " def test_cookiejar\n" + " c = Curl::Easy.new\n" + " assert_nil c.cookiejar\n" + " assert_equal \"some.file\", c.cookiejar = \"some.file\"\n" + " assert_equal \"some.file\", c.cookiejar \n" + " end\n" + "\n" + " def test_cookielist\n" + " c = Curl::Easy.new TestServlet.url\n" + " c.enable_cookies = true\n" + " c.post_body = URI.encode_www_form('c' => 'somename=somevalue')\n" + " assert_nil c.cookielist\n" + " c.perform\n" + " assert_match(/somevalue/, c.cookielist.join(''))\n" + " end\n" + "\n" + " def test_on_success\n" + " curl = Curl::Easy.new($TEST_URL) \n" + " on_success_called = false\n" + " curl.on_success {|c|\n" + " on_success_called = true\n" + " assert_not_nil c.body\n" + " assert_match(/Content-Length: /, c.head)\n" + " assert_match(/^# DO NOT REMOVE THIS COMMENT/, c.body)\n" + " }\n" + " curl.perform\n" + " assert on_success_called, \"Success handler not called\" \n" + " end\n" + "\n" + " def test_on_success_with_on_failure\n" + " curl = Curl::Easy.new(TestServlet.url + '/error')\n" + " on_failure_called = false\n" + " curl.on_success {|c| } # make sure we get the failure call even though this handler is defined\n" + " curl.on_failure {|c,code| on_failure_called = true }\n" + " curl.perform\n" + " assert_equal 500, curl.response_code\n" + " assert on_failure_called, \"Failure handler not called\" \n" + " end\n" + "\n" + " def test_on_success_with_on_missing\n" + " curl = Curl::Easy.new(TestServlet.url + '/not_here')\n" + " on_missing_called = false\n" + " curl.on_success {|c| } # make sure we get the missing call even though this handler is defined\n" + " curl.on_missing {|c,code| on_missing_called = true }\n" + " curl.perform\n" + " assert_equal 404, curl.response_code\n" + " assert on_missing_called, \"Missing handler not called\" \n" + " end\n" + "\n" + " def test_on_success_with_on_redirect\n" + " curl = Curl::Easy.new(TestServlet.url + '/redirect')\n" + " on_redirect_called = false\n" + " curl.on_success {|c| } # make sure we get the redirect call even though this handler is defined\n" + " curl.on_redirect {|c,code| on_redirect_called = true }\n" + " curl.perform\n" + " assert_equal 302, curl.response_code\n" + " assert on_redirect_called, \"Redirect handler not called\" \n" + " end\n" + " \n" + " def test_get_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_get\n" + " assert_equal 'GET', curl.body_str\n" + " end\n" + " \n" + " def test_post_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_post([Curl::PostField.content('document_id', 5)])\n" + " assert_equal \"POST\\ndocument_id=5\", curl.unescape(curl.body_str)\n" + " end\n" + "\n" + " def test_post_remote_is_easy_handle\n" + " # see: http://pastie.org/560852 and\n" + " # http://groups.google.com/group/curb---ruby-libcurl-bindings/browse_thread/thread/216bb2d9b037f347?hl=en\n" + " [:post, :get, :head, :delete].each do |method|\n" + " retries = 0\n" + " begin\n" + " count = 0\n" + " Curl::Easy.send(\"http_\#{method}\", TestServlet.url) do|c|\n" + " count += 1\n" + " assert_equal Curl::Easy, c.class\n" + " end\n" + " assert_equal 1, count, \"For request method: \#{method.to_s.upcase}\"\n" + " rescue Curl::Err::HostResolutionError => e # travis-ci.org fails to resolve... try again?\n" + " retries+=1\n" + " retry if retries < 3\n" + " raise e\n" + " end\n" + " end\n" + " end\n" + "\n" + " # see: https://github.com/rvanlieshout/curb/commit/8bcdefddc0162484681ebd1a92d52a642666a445\n" + " def test_post_multipart_array_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.multipart_form_post = true\n" + " fields = [\n" + " Curl::PostField.file('foo', File.expand_path(File.join(File.dirname(__FILE__),'..','README.markdown'))),\n" + " Curl::PostField.file('bar', File.expand_path(File.join(File.dirname(__FILE__),'..','README.markdown')))\n" + " ]\n" + " curl.http_post(fields)\n" + " assert_match(/HTTP POST file upload/, curl.body_str)\n" + " assert_match(/Content-Disposition: form-data/, curl.body_str)\n" + " end\n" + " \n" + " def test_post_with_body_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.post_body = 'foo=bar&encoded%20string=val'\n" + " \n" + " curl.perform\n" + " \n" + " assert_equal \"POST\\nfoo=bar&encoded%20string=val\", curl.body_str\n" + " assert_equal 'foo=bar&encoded%20string=val', curl.post_body\n" + " end\n" + " \n" + " def test_form_post_body_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_post('foo=bar', 'encoded%20string=val')\n" + " \n" + " assert_equal \"POST\\nfoo=bar&encoded%20string=val\", curl.body_str\n" + " assert_equal 'foo=bar&encoded%20string=val', curl.post_body\n" + " end\n" + "\n" + " def test_post_multipart_file_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.multipart_form_post = true\n" + " pf = Curl::PostField.file('readme', File.expand_path(File.join(File.dirname(__FILE__),'..','README.markdown')))\n" + " curl.http_post(pf)\n" + " assert_match(/HTTP POST file upload/, curl.body_str)\n" + " assert_match(/Content-Disposition: form-data/, curl.body_str)\n" + " end\n" + "\n" + " def test_delete_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_delete\n" + " assert_equal 'DELETE', curl.body_str\n" + " end\n" + "\n" + " def test_arbitrary_http_verb\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http('PURGE')\n" + " assert_equal 'PURGE', curl.body_str\n" + " end\n" + "\n" + " def test_head_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_head\n" + "\n" + " redirect = curl.header_str.match(/Location: (.*)/)\n" + "\n" + " assert_equal '', curl.body_str\n" + " assert_match('/nonexistent', redirect[1])\n" + " end\n" + "\n" + " def test_head_accessor\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.head = true\n" + " curl.perform\n" + "\n" + " redirect = curl.header_str.match(/Location: (.*)/)\n" + "\n" + " assert_equal '', curl.body_str\n" + " assert_match('/nonexistent', redirect[1])\n" + " curl.head = false\n" + " curl.perform\n" + " assert_equal 'GET', curl.body_str\n" + " end\n" + "\n" + " def test_put_remote\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.headers['Content-Type'] = 'application/json'\n" + " assert curl.http_put(\"message\")\n" + " assert_match(/^PUT/, curl.body_str)\n" + " assert_match(/message$/, curl.body_str)\n" + " assert_match(/message$/, curl.body)\n" + " assert_match(/application\\/json/, curl.header_str)\n" + " assert_match(/application\\/json/, curl.head)\n" + " end \n" + " \n" + " def test_put_data\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.put_data = 'message'\n" + " \n" + " curl.perform\n" + " \n" + " assert_match(/^PUT/, curl.body_str)\n" + " assert_match(/message$/, curl.body_str)\n" + " end\n" + "\n" + " # https://github.com/taf2/curb/issues/101\n" + " def test_put_data_null_bytes\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.put_data = \"a\\0b\"\n" + " \n" + " curl.perform\n" + " \n" + " assert_match(/^PUT/, curl.body_str)\n" + " assert_match(\"a\\0b\", curl.body_str)\n" + " end\n" + "\n" + " def test_put_nil_data_no_crash\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.put_data = nil\n" + " \n" + " curl.perform\n" + " end\n" + "\n" + " def test_put_remote_file\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " File.open(__FILE__,'rb') do|f|\n" + " assert curl.http_put(f)\n" + " end\n" + " assert_equal \"PUT\\n\#{File.read(__FILE__)}\", curl.body_str.tr(\"\\r\", '')\n" + " end\n" + " \n" + " def test_put_class_method\n" + " count = 0\n" + " curl = Curl::Easy.http_put(TestServlet.url,File.open(__FILE__,'rb')) do|c|\n" + " count += 1\n" + " assert_equal Curl::Easy, c.class\n" + " end\n" + " assert_equal 1, count\n" + " assert_equal \"PUT\\n\#{File.read(__FILE__)}\", curl.body_str.tr(\"\\r\", '')\n" + " end\n" + "\n" + " # Generate a self-signed cert with\n" + " # openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 \\\n" + " # -keyout tests/cert.pem -out tests/cert.pem\n" + " def test_cert\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.cert= File.join(File.dirname(__FILE__),\"cert.pem\")\n" + " assert_match(/cert.pem$/,curl.cert)\n" + " end\n" + "\n" + " def test_cert_with_password\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " path = File.join(File.dirname(__FILE__),\"cert.pem\")\n" + " curl.certpassword = 'password'\n" + " curl.cert = path\n" + " assert_match(/cert.pem$/,curl.cert)\n" + " end\n" + "\n" + " def test_cert_type\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.certtype= \"DER\"\n" + " assert_equal \"DER\", curl.certtype\n" + " end\n" + "\n" + " def test_default_certtype\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " assert_nil curl.certtype\n" + " curl.certtype = \"PEM\"\n" + " assert_equal \"PEM\", curl.certtype\n" + " end\n" + "\n" + " # Generate a CA cert with instructions at\n" + " # http://technocage.com/~caskey/openssl/\n" + " def test_ca_cert\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.cacert= File.join(File.dirname(__FILE__),\"cacert.pem\")\n" + " assert_match(/cacert.pem$/, curl.cacert)\n" + " end\n" + "\n" + " def test_user_agent\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.useragent= \"Curb-Easy/Ruby\"\n" + " assert_equal \"Curb-Easy/Ruby\",curl.useragent\n" + " end\n" + "\n" + " def test_username_password\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.username = \"foo\"\n" + " curl.password = \"bar\"\n" + " if !curl.username.nil?\n" + " assert_equal \"foo\", curl.username\n" + " assert_equal \"bar\", curl.password\n" + " else\n" + " curl.userpwd = \"foo:bar\"\n" + " end\n" + " curl.http_auth_types = :basic\n" + " #curl.verbose = true\n" + " curl.perform\n" + " assert_equal 'Basic Zm9vOmJhcg==', $auth_header\n" + " $auth_header = nil\n" + " # curl checks the auth type supported by the server, so we have to create a \n" + " # new easy handle if we're going to change the auth type...\n" + "\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.username = \"foo\"\n" + " curl.password = \"bar\"\n" + " if curl.username.nil?\n" + " curl.userpwd = \"foo:bar\"\n" + " end\n" + " curl.http_auth_types = :ntlm\n" + " curl.perform\n" + " assert_equal 'NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=', $auth_header\n" + " end\n" + "\n" + " def test_primary_ip\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " if curl.respond_to?(:primary_ip)\n" + " curl.perform\n" + " assert_equal '127.0.0.1', curl.primary_ip\n" + " end\n" + " end\n" + "\n" + " def test_post_streaming\n" + " readme = File.expand_path(File.join(File.dirname(__FILE__),'..','README.markdown'))\n" + " \n" + " pf = Curl::PostField.file(\"filename\", readme)\n" + "\n" + " easy = Curl::Easy.new\n" + "\n" + " easy.url = TestServlet.url\n" + " easy.multipart_form_post = true\n" + " easy.http_post(pf)\n" + "\n" + " assert_not_equal(0,easy.body_str.size)\n" + " assert_equal(easy.body_str.tr(\"\\r\", ''), File.read(readme))\n" + " end\n" + "\n" + "\n" + " def test_easy_close\n" + " easy = Curl::Easy.new\n" + " easy.close\n" + " easy.url = TestServlet.url\n" + " easy.http_get\n" + " end\n" + "\n" + " def test_easy_reset\n" + " easy = Curl::Easy.new\n" + " easy.url = TestServlet.url + \"?query=foo\"\n" + " easy.http_get\n" + " settings = easy.reset\n" + " assert settings.key?(:url)\n" + " assert settings.key?(:body_data)\n" + " assert settings.key?(:header_data)\n" + " easy.url = TestServlet.url\n" + " easy.http_get\n" + " end\n" + "\n" + " def test_easy_use_http_versions\n" + " easy = Curl::Easy.new\n" + " easy.url = TestServlet.url + \"?query=foo\"\n" + " #puts \"http none: \#{Curl::HTTP_NONE.inspect}\"\n" + " #puts \"http1.0: \#{Curl::HTTP_1_0.inspect}\"\n" + " #puts \"http1.1: \#{Curl::HTTP_1_1.inspect}\"\n" + " easy.version = Curl::HTTP_1_1\n" + " #easy.verbose = true\n" + " easy.http_get\n" + " end\n" + "\n" + " def test_easy_http_verbs\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.http_delete\n" + " assert_equal 'DELETE', curl.body_str\n" + " curl.http_get\n" + " assert_equal 'GET', curl.body_str\n" + " curl.http_post\n" + " assert_equal \"POST\\n\", curl.body_str\n" + " curl.http('PURGE')\n" + " assert_equal 'PURGE', curl.body_str\n" + " curl.http_put('hello')\n" + " assert_equal \"PUT\\nhello\", curl.body_str\n" + " curl.http('COPY')\n" + " assert_equal 'COPY', curl.body_str\n" + " end\n" + "\n" + " def test_easy_http_verbs_must_respond_to_str\n" + " # issue http://github.com/taf2/curb/issues/45\n" + " assert_nothing_raised do\n" + " c = Curl::Easy.new ; c.url = TestServlet.url ; c.http(:get)\n" + " end\n" + "\n" + " assert_raise RuntimeError do\n" + " c = Curl::Easy.new ; c.url = TestServlet.url ; c.http(FooNoToS.new)\n" + " end\n" + "\n" + " end\n" + "\n" + " # http://github.com/taf2/curb/issues/#issue/33\n" + " def test_easy_http_verbs_with_errors\n" + " curl = Curl::Easy.new(\"http://127.0.0.1:9012/\") # test will fail if http server on port 9012\n" + " assert_raise Curl::Err::ConnectionFailedError do\n" + " curl.http_delete\n" + " end\n" + " curl.url = TestServlet.url\n" + " curl.http_get\n" + " assert_equal 'GET', curl.body_str\n" + " end\n" + "\n" + " def test_easy_can_put_with_content_length\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " rd, wr = IO.pipe\n" + " buf = ((\"hello\")* (1000 / 5))\n" + "\n" + " producer = Thread.new do\n" + " 5.times do\n" + " wr << buf\n" + " sleep 0.1 # act as a slow producer\n" + " end\n" + " end\n" + "\n" + " consumer = Thread.new do\n" + "\n" + " #curl.verbose = true\n" + " curl.headers['Content-Length'] = buf.size * 5\n" + " curl.headers['User-Agent'] = \"Something else\"\n" + " curl.headers['Content-Type'] = \"text/javascript\"\n" + " curl.headers['Date'] = Time.now.httpdate\n" + " curl.headers['Host'] = 's3.amazonaws.com'\n" + " curl.headers['Accept'] = '*/*'\n" + " curl.headers['Authorization'] = 'Foo Bar Biz Baz'\n" + " curl.http_put(rd)\n" + " assert_match(/^PUT/, curl.body_str)\n" + " assert_match(/hello$/, curl.body_str)\n" + " curl.header_str\n" + " curl.body_str\n" + " end\n" + "\n" + " producer.join\n" + " wr.close\n" + " consumer.join\n" + "\n" + " end\n" + "\n" + " def test_get_set_multi_on_easy\n" + " easy = Curl::Easy.new\n" + " assert_nil easy.multi\n" + " multi = Curl::Multi.new\n" + " easy.multi = multi\n" + " assert_not_nil easy.multi\n" + " assert_equal multi, easy.multi\n" + " end\n" + "\n" + " def test_raise_on_progress\n" + " c = Curl::Easy.new($TEST_URL)\n" + " c.on_progress {|w,x,y,z| raise \"error\" }\n" + " c.perform\n" + " rescue => e\n" + " assert_equal 'Curl::Err::AbortedByCallbackError', e.class.to_s\n" + " c.close\n" + " end\n" + "\n" + " def test_raise_on_success\n" + " c = Curl::Easy.new($TEST_URL)\n" + " c.on_success {|x| raise \"error\" }\n" + " c.perform\n" + " rescue Curl::Err::AbortedByCallbackError => e\n" + " assert_equal 'Curl::Err::AbortedByCallbackError', e.class.to_s\n" + " c.close\n" + " end\n" + "\n" + " def test_raise_on_debug\n" + " c = Curl::Easy.new($TEST_URL)\n" + " c.on_debug { raise \"error\" }\n" + " c.perform\n" + " assert true, \"raise in on debug has no effect\"\n" + " end\n" + "\n" + " def test_status_codes\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.perform\n" + " assert_equal '200 OK', curl.status\n" + " end\n" + "\n" + " def test_close_in_on_callbacks\n" + " curl = Curl::Easy.new(TestServlet.url)\n" + " curl.on_body {|d| curl.close; d.size }\n" + " assert_raises RuntimeError do\n" + " curl.perform\n" + " end\n" + " end\n" + "\n" + " def test_set_unsupported_options\n" + " curl = Curl::Easy.new\n" + " assert_raises TypeError do\n" + " curl.set(99999, 1)\n" + " end\n" + " end\n" + "\n" + " include TestServerMethods \n" + "\n" + " def setup\n" + " server_setup\n" + " end\n" + "\n" + "end\n">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) =============================================================================== F =============================================================================== Failure: test_status_codes(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:1165:in 'TestCurbCurlEasy#test_status_codes' <"200 OK">(UTF-8) expected but was <"400 Bad Request">(ASCII-8BIT) diff: ? 200 OK ? 4 Bad Request ? ? ?? ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_username_password(TestCurbCurlEasy) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_easy.rb:984:in 'TestCurbCurlEasy#test_username_password' <"Basic Zm9vOmJhcg=="> expected but was diff: ? "Basic Zm9vOmJhcg==" ? n l ? ???? ??????????????? =============================================================================== F =============================================================================== Failure: test_connection_keepalive(TestCurbCurlMulti): with max connections set to 1 at this point the connection to google should still be open. is not true. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:79:in 'TestCurbCurlMulti#test_connection_keepalive' =============================================================================== E =============================================================================== Error: test_multi_easy_download_01(TestCurbCurlMulti): Curl::Err::AbortedByCallbackError: <200> expected but was <400>. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:477:in 'block in TestCurbCurlMulti#test_multi_easy_download_01' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:233:in 'block in Curl::Multi.download' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:143:in 'block (2 levels) in Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi#perform' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:224:in 'Curl::Multi.download' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:476:in 'TestCurbCurlMulti#test_multi_easy_download_01' =============================================================================== E =============================================================================== Error: test_multi_easy_get_01(TestCurbCurlMulti): Curl::Err::AbortedByCallbackError: <200> expected but was <400>. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:456:in 'block in TestCurbCurlMulti#test_multi_easy_get_01' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:19:in 'block in Curl::Multi.get' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:143:in 'block (2 levels) in Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi#perform' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:19:in 'Curl::Multi.get' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:455:in 'TestCurbCurlMulti#test_multi_easy_get_01' =============================================================================== E =============================================================================== Error: test_multi_easy_http_01(TestCurbCurlMulti): Curl::Err::AbortedByCallbackError: <200> expected but was <400>. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:523:in 'block in TestCurbCurlMulti#test_multi_easy_http_01' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:143:in 'block (2 levels) in Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi#perform' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:522:in 'TestCurbCurlMulti#test_multi_easy_http_01' =============================================================================== E =============================================================================== Error: test_multi_easy_http_with_max_connects(TestCurbCurlMulti): Curl::Err::AbortedByCallbackError: <200> expected but was <400>. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:543:in 'block in TestCurbCurlMulti#test_multi_easy_http_with_max_connects' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:143:in 'block (2 levels) in Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:167:in 'Curl::Multi#perform' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:167:in 'Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:542:in 'TestCurbCurlMulti#test_multi_easy_http_with_max_connects' =============================================================================== E =============================================================================== Error: test_multi_easy_post_01(TestCurbCurlMulti): Curl::Err::AbortedByCallbackError: was expected to be =~ <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods?q=3'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:493:in 'block in TestCurbCurlMulti#test_multi_easy_post_01' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:43:in 'block in Curl::Multi.post' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:143:in 'block (2 levels) in Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi#perform' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:43:in 'Curl::Multi.post' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:491:in 'TestCurbCurlMulti#test_multi_easy_post_01' =============================================================================== E =============================================================================== Error: test_multi_easy_put_01(TestCurbCurlMulti): Curl::Err::AbortedByCallbackError: was expected to be =~ <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:508:in 'block in TestCurbCurlMulti#test_multi_easy_put_01' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:67:in 'block in Curl::Multi.put' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:143:in 'block (2 levels) in Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi#perform' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:164:in 'Curl::Multi.http' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/lib/curl/multi.rb:67:in 'Curl::Multi.put' /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:507:in 'TestCurbCurlMulti#test_multi_easy_put_01' =============================================================================== F =============================================================================== Failure: test_multi_recieves_500(TestCurbCurlMulti): is not true. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:564:in 'TestCurbCurlMulti#test_multi_recieves_500' ===============================================================================/builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:211: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:235: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:120: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:126: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_multi.rb:383: warning: literal string will be frozen in the future (run with --debug-frozen-string-literal for more information) F =============================================================================== Failure: test_protocol_allowed(TestCurbCurlProtocols) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_protocols.rb:14:in 'TestCurbCurlProtocols#test_protocol_allowed' <404> expected but was <400> diff: ? 404 ? 0 ? ? =============================================================================== F =============================================================================== Failure: test_redir_protocol_denied(TestCurbCurlProtocols): exception was expected but none was thrown. /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl_protocols.rb:33:in 'TestCurbCurlProtocols#test_redir_protocol_denied' =============================================================================== F =============================================================================== Failure: test_get(TestCurl) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl.rb:6:in 'TestCurl#test_get' <"GETfoo=bar">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods?foo=bar'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + + + Bad Request + +

Bad Request

? GET foo=bar ? bad URI `/methods? '. ? ??? ++ +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_options(TestCurl) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl.rb:31:in 'TestCurl#test_options' <"OPTIONSfoo=bar">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods?foo=bar'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + + + Bad Request + +

Bad Request

? OPT IONS foo=bar ? bad UR `/methods? '. ? ??? ??? ++ +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_patch(TestCurl) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl.rb:26:in 'TestCurl#test_patch' <"PATCH\n" + "foo=bar">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? PATCH ? ? ?? ?? + Bad Request + +

Bad Request

? foo=bar ? d URI `/methods'. ? ???? ? +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_post(TestCurl) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl.rb:16:in 'TestCurl#test_post' <"POST\n" + "foo=bar">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? POST ? ? ??? +++ + Bad Request + +

Bad Request

? foo=bar ? d URI `/methods'. ? ???? ? +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== F =============================================================================== Failure: test_put(TestCurl) /builddir/build/BUILD/rubygem-curb-1.0.5-build/curb-1.0.5/usr/share/gems/gems/curb-1.0.5/tests/tc_curl.rb:21:in 'TestCurl#test_put' <"PUT\n" + "foo=bar">(UTF-8) expected but was <"\n" + "\n" + " Bad Request\n" + " \n" + "

Bad Request

\n" + " bad URI `/methods'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at\n" + " 4359c94169bd4f3385098264b6026bba:9129\n" + "
\n" + " \n" + "\n">(ASCII-8BIT) diff: + ? PUT ? ? ?? +++ + Bad Request + +

Bad Request

? foo=bar ? d URI `/methods'. ? ???? ? +
+
+ WEBrick/1.7.0 (Ruby/3.4.0/2024-11-09) at + 4359c94169bd4f3385098264b6026bba:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== Finished in 1.860823062 seconds. ------------------------------------------------------------------------------- 180 tests, 573 assertions, 39 failures, 9 errors, 0 pendings, 0 omissions, 0 notifications 73.3333% passed ------------------------------------------------------------------------------- 96.73 tests/s, 307.93 assertions/s error: RPM build errors: Bad exit status from /var/tmp/rpm-tmp.bclkf9 (%check) Bad exit status from /var/tmp/rpm-tmp.bclkf9 (%check) Finish: rpmbuild rubygem-curb-1.0.5-6.fc42.315.07.src.rpm Finish: build phase for rubygem-curb-1.0.5-6.fc42.315.07.src.rpm INFO: chroot_scan: 1 files copied to /var/lib/copr-rpmbuild/results/chroot_scan INFO: /var/lib/mock/fedora-rawhide-x86_64-1731224967.609780/root/var/log/dnf5.log INFO: chroot_scan: creating tarball /var/lib/copr-rpmbuild/results/chroot_scan.tar.gz /bin/tar: Removing leading `/' from member names ERROR: Exception(/var/lib/copr-rpmbuild/results/rubygem-curb-1.0.5-6.fc42.315.07.src.rpm) Config(fedora-rawhide-x86_64) 1 minutes 0 seconds INFO: Results and/or logs in: /var/lib/copr-rpmbuild/results INFO: Cleaning up build root ('cleanup_on_failure=True') Start: clean chroot INFO: unmounting tmpfs. Finish: clean chroot ERROR: Command failed: # /usr/bin/systemd-nspawn -q -M 4359c94169bd4f3385098264b6026bba -D /var/lib/mock/fedora-rawhide-x86_64-1731224967.609780/root -a -u mockbuild --capability=cap_ipc_lock --rlimit=RLIMIT_NOFILE=10240 --capability=cap_ipc_lock --bind=/tmp/mock-resolv.1y36e1qj:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin '--setenv=PROMPT_COMMAND=printf "\033]0;\007"' '--setenv=PS1= \s-\v\$ ' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c '/usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/originals/rubygem-curb.spec' Copr build error: Build failed