Warning: Permanently added '52.116.123.230' (ED25519) to the list of known hosts. You can reproduce this build on your computer by running: sudo dnf install copr-rpmbuild /usr/bin/copr-rpmbuild --verbose --drop-resultdir --task-url https://copr.fedorainfracloud.org/backend/get-build-task/8256218-fedora-rawhide-s390x --chroot fedora-rawhide-s390x Version: 1.1 PID: 37374 Logging PID: 37375 Task: {'allow_user_ssh': False, 'appstream': False, 'background': True, 'build_id': 8256218, 'buildroot_pkgs': [], 'chroot': 'fedora-rawhide-s390x', 'enable_net': False, 'fedora_review': False, 'git_hash': 'f6005fb2eba73b13a4925a2b61df5c694d59f0d8', 'git_repo': 'https://copr-dist-git.fedorainfracloud.org/git/mtasaka/rubygems-ruby34-01/rubygem-curb', 'isolation': 'default', 'memory_reqs': 2048, 'package_name': 'rubygem-curb', 'package_version': '1.0.5-6', 'project_dirname': 'rubygems-ruby34-01', 'project_name': 'rubygems-ruby34-01', 'project_owner': 'mtasaka', 'repo_priority': None, 'repos': [{'baseurl': 'https://download.copr.fedorainfracloud.org/results/mtasaka/rubygems-ruby34-01/fedora-rawhide-s390x/', 'id': 'copr_base', 'name': 'Copr repository', 'priority': None}, {'baseurl': 'https://download.copr.fedorainfracloud.org/results/mtasaka/ruby-34-02/fedora-rawhide-s390x/', 'id': 'copr_mtasaka_ruby_34_02', 'name': 'Additional repo copr_mtasaka_ruby_34_02'}], 'sandbox': 'mtasaka/rubygems-ruby34-01--mtasaka', 'source_json': {}, 'source_type': None, 'ssh_public_keys': None, 'storage': 0, 'submitter': 'mtasaka', 'tags': [], 'task_id': '8256218-fedora-rawhide-s390x', 'timeout': 86400, 'uses_devel_repo': False, 'with_opts': [], 'without_opts': []} Running: git clone https://copr-dist-git.fedorainfracloud.org/git/mtasaka/rubygems-ruby34-01/rubygem-curb /var/lib/copr-rpmbuild/workspace/workdir-u16xr15z/rubygem-curb --depth 500 --no-single-branch --recursive cmd: ['git', 'clone', 'https://copr-dist-git.fedorainfracloud.org/git/mtasaka/rubygems-ruby34-01/rubygem-curb', '/var/lib/copr-rpmbuild/workspace/workdir-u16xr15z/rubygem-curb', '--depth', '500', '--no-single-branch', '--recursive'] cwd: . rc: 0 stdout: stderr: Cloning into '/var/lib/copr-rpmbuild/workspace/workdir-u16xr15z/rubygem-curb'... Running: git checkout f6005fb2eba73b13a4925a2b61df5c694d59f0d8 -- cmd: ['git', 'checkout', 'f6005fb2eba73b13a4925a2b61df5c694d59f0d8', '--'] cwd: /var/lib/copr-rpmbuild/workspace/workdir-u16xr15z/rubygem-curb rc: 0 stdout: stderr: Note: switching to 'f6005fb2eba73b13a4925a2b61df5c694d59f0d8'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at f6005fb automatic import of rubygem-curb Running: dist-git-client sources /usr/bin/tail: /var/lib/copr-rpmbuild/main.log: file truncated cmd: ['dist-git-client', 'sources'] cwd: /var/lib/copr-rpmbuild/workspace/workdir-u16xr15z/rubygem-curb rc: 0 stdout: stderr: INFO: Reading stdout from command: git rev-parse --abbrev-ref HEAD INFO: Reading stdout from command: git rev-parse HEAD INFO: Reading sources specification file: sources INFO: Downloading curb-1.0.5.gem INFO: Reading stdout from command: curl --help all 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 3105k 0 --:--:-- --:--:-- --:--:-- 3214k INFO: Reading stdout from command: md5sum curb-1.0.5.gem Running (timeout=86400): unbuffer mock --spec /var/lib/copr-rpmbuild/workspace/workdir-u16xr15z/rubygem-curb/rubygem-curb.spec --sources /var/lib/copr-rpmbuild/workspace/workdir-u16xr15z/rubygem-curb --resultdir /var/lib/copr-rpmbuild/results --uniqueext 1731546042.504027 -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-u16xr15z/rubygem-curb/rubygem-curb.spec --sources /var/lib/copr-rpmbuild/workspace/workdir-u16xr15z/rubygem-curb --resultdir /var/lib/copr-rpmbuild/results --uniqueext 1731546042.504027 -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-u16xr15z/rubygem-curb/rubygem-curb.spec) Config(fedora-rawhide-s390x) 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-s390x-bootstrap-1731546042.504027/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-s390x-bootstrap-1731546042.504027/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/a7129d2786e14317bc1721a5059a23f300a3ba95569f7562118ee8696707012e/merged INFO: umounting image registry.fedoraproject.org/fedora:rawhide (/var/lib/containers/storage/overlay/a7129d2786e14317bc1721a5059a23f300a3ba95569f7562118ee8696707012e/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-s390x-1731546042.504027/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.s390x rpm-sequoia-1.7.0-2.fc41.s390x dnf5-5.2.6.2-1.fc42.s390x dnf5-plugins-5.2.6.2-1.fc42.s390x Start: installing minimal buildroot with dnf5 Updating and loading repositories: fedora 100% | 1.0 KiB/s | 5.2 KiB | 00m05s Copr repository 100% | 312.0 B/s | 1.5 KiB | 00m05s Additional repo copr_mtasaka_ruby_34_0 100% | 311.0 B/s | 1.5 KiB | 00m05s Copr repository 100% | 21.9 MiB/s | 829.0 KiB | 00m00s Repositories loaded. Package Arch Version Repository Size Installing group/module packages: bash s390x 5.2.37-1.fc42 fedora 8.4 MiB bzip2 s390x 1.0.8-19.fc41 fedora 99.2 KiB coreutils s390x 9.5-10.fc42 fedora 6.2 MiB cpio s390x 2.15-2.fc41 fedora 1.1 MiB diffutils s390x 3.10-8.fc41 fedora 1.6 MiB fedora-release-common noarch 42-0.102.318.23 copr_mtasaka_ruby_34_02 19.7 KiB findutils s390x 1:4.10.0-4.fc41 fedora 1.9 MiB gawk s390x 5.3.0-4.fc41 fedora 1.8 MiB glibc-minimal-langpack s390x 2.40.9000-16.fc42 fedora 0.0 B grep s390x 3.11-9.fc41 fedora 1.0 MiB gzip s390x 1.13-2.fc41 fedora 400.8 KiB info s390x 7.1.1-2.fc42 fedora 409.1 KiB patch s390x 2.7.6-25.fc41 fedora 298.3 KiB redhat-rpm-config noarch 296-1.fc42 fedora 186.6 KiB rpm-build s390x 4.20.0-1.fc42 fedora 200.4 KiB sed s390x 4.9-3.fc41 fedora 873.2 KiB shadow-utils s390x 2:4.16.0-6.fc42 fedora 4.1 MiB tar s390x 2:1.35-4.fc41 fedora 3.0 MiB unzip s390x 6.0-64.fc41 fedora 410.0 KiB util-linux s390x 2.40.2-8.fc42 fedora 3.7 MiB which s390x 2.21-42.fc41 fedora 83.9 KiB xz s390x 1:5.6.3-2.fc42 fedora 1.2 MiB Installing dependencies: add-determinism s390x 0.4.3-1.fc42 fedora 3.3 MiB alternatives s390x 1.30-1.fc41 fedora 70.1 KiB ansible-srpm-macros noarch 1-16.fc41 fedora 35.7 KiB audit-libs s390x 4.0.2-1.fc41 fedora 350.9 KiB authselect s390x 1.5.0-8.fc42 fedora 157.3 KiB authselect-libs s390x 1.5.0-8.fc42 fedora 823.5 KiB basesystem noarch 11-21.fc41 fedora 0.0 B binutils s390x 2.43.50-5.fc42 fedora 27.0 MiB build-reproducibility-srpm-macros noarch 0.4.3-1.fc42 fedora 735.0 B bzip2-libs s390x 1.0.8-19.fc41 fedora 88.5 KiB ca-certificates noarch 2024.2.69_v8.0.401-2.fc42 fedora 2.6 MiB coreutils-common s390x 9.5-10.fc42 fedora 11.2 MiB cracklib s390x 2.9.11-6.fc41 fedora 250.0 KiB crypto-policies noarch 20241106-1.git35892de.fc42 fedora 136.9 KiB curl s390x 8.10.1-2.fc42 fedora 485.1 KiB cyrus-sasl-lib s390x 2.1.28-27.fc41 fedora 2.4 MiB debugedit s390x 5.1-1.fc42 fedora 195.9 KiB dwz s390x 0.15-8.fc42 fedora 318.6 KiB ed s390x 1.20.2-2.fc41 fedora 150.6 KiB efi-srpm-macros noarch 5-12.fc41 fedora 40.1 KiB elfutils s390x 0.192-3.fc42 fedora 3.1 MiB elfutils-debuginfod-client s390x 0.192-3.fc42 fedora 75.6 KiB elfutils-default-yama-scope noarch 0.192-3.fc42 fedora 1.8 KiB elfutils-libelf s390x 0.192-3.fc42 fedora 1.2 MiB elfutils-libs s390x 0.192-3.fc42 fedora 766.2 KiB fedora-gpg-keys noarch 42-0.3 fedora 126.4 KiB fedora-release noarch 42-0.102.318.23 copr_mtasaka_ruby_34_02 0.0 B fedora-release-identity-basic noarch 42-0.102.318.23 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 s390x 5.45-7.fc41 fedora 103.3 KiB file-libs s390x 5.45-7.fc41 fedora 9.9 MiB filesystem s390x 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 s390x 15.2-2.fc42 fedora 15.2 MiB gdbm s390x 1:1.23-7.fc41 fedora 483.9 KiB gdbm-libs s390x 1:1.23-7.fc41 fedora 133.4 KiB ghc-srpm-macros noarch 1.9.2-1.fc42 fedora 779.0 B glibc s390x 2.40.9000-16.fc42 fedora 5.2 MiB glibc-common s390x 2.40.9000-16.fc42 fedora 1.1 MiB glibc-gconv-extra s390x 2.40.9000-16.fc42 fedora 6.8 MiB gmp s390x 1:6.3.0-2.fc41 fedora 770.0 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 s390x 2.14-1.fc42 fedora 92.9 KiB json-c s390x 0.18-1.fc42 fedora 82.9 KiB kernel-srpm-macros noarch 1.0-24.fc41 fedora 1.9 KiB keyutils-libs s390x 1.6.3-4.fc41 fedora 54.2 KiB krb5-libs s390x 1.21.3-3.fc42 fedora 2.4 MiB libacl s390x 2.3.2-2.fc41 fedora 43.8 KiB libarchive s390x 3.7.7-1.fc42 fedora 1.0 MiB libattr s390x 2.5.2-4.fc41 fedora 28.3 KiB libblkid s390x 2.40.2-8.fc42 fedora 286.4 KiB libbrotli s390x 1.1.0-5.fc41 fedora 925.1 KiB libcap s390x 2.71-1.fc42 fedora 211.8 KiB libcap-ng s390x 0.8.5-3.fc41 fedora 76.7 KiB libcom_err s390x 1.47.1-6.fc42 fedora 67.0 KiB libcurl s390x 8.10.1-2.fc42 fedora 890.1 KiB libeconf s390x 0.7.4-3.fc42 fedora 69.4 KiB libevent s390x 2.1.12-14.fc41 fedora 938.8 KiB libfdisk s390x 2.40.2-8.fc42 fedora 394.8 KiB libffi s390x 3.4.6-3.fc42 fedora 65.9 KiB libgcc s390x 14.2.1-6.fc42 fedora 169.2 KiB libgomp s390x 14.2.1-6.fc42 fedora 527.4 KiB libidn2 s390x 2.3.7-2.fc41 fedora 328.9 KiB libmount s390x 2.40.2-8.fc42 fedora 375.8 KiB libnghttp2 s390x 1.64.0-1.fc42 fedora 177.9 KiB libpkgconf s390x 2.3.0-1.fc42 fedora 85.9 KiB libpsl s390x 0.21.5-4.fc41 fedora 80.3 KiB libpwquality s390x 1.4.5-11.fc41 fedora 420.9 KiB libselinux s390x 3.7-6.fc42 fedora 192.9 KiB libsemanage s390x 3.7-3.fc42 fedora 305.4 KiB libsepol s390x 3.7-3.fc42 fedora 849.8 KiB libsmartcols s390x 2.40.2-8.fc42 fedora 192.2 KiB libssh s390x 0.11.1-1.fc42 fedora 585.3 KiB libssh-config noarch 0.11.1-1.fc42 fedora 277.0 B libstdc++ s390x 14.2.1-6.fc42 fedora 3.1 MiB libtasn1 s390x 4.19.0-9.fc41 fedora 187.5 KiB libtirpc s390x 1.3.6-0.rc1.fc42 fedora 212.6 KiB libtool-ltdl s390x 2.4.7-12.fc41 fedora 74.0 KiB libunistring s390x 1.1-8.fc41 fedora 1.8 MiB libuuid s390x 2.40.2-8.fc42 fedora 41.2 KiB libverto s390x 0.3.2-9.fc41 fedora 29.3 KiB libxcrypt s390x 4.4.36-10.fc42 fedora 271.5 KiB libxml2 s390x 2.12.8-2.fc41 fedora 1.9 MiB libzstd s390x 1.5.6-2.fc41 fedora 875.7 KiB lua-libs s390x 5.4.7-1.fc42 fedora 328.8 KiB lua-srpm-macros noarch 1-14.fc41 fedora 1.3 KiB lz4-libs s390x 1.10.0-1.fc41 fedora 201.3 KiB mpfr s390x 4.2.1-5.fc41 fedora 698.7 KiB ncurses-base noarch 6.5-2.20240629.fc41 fedora 326.3 KiB ncurses-libs s390x 6.5-2.20240629.fc41 fedora 1.1 MiB ocaml-srpm-macros noarch 10-3.fc41 fedora 1.9 KiB openblas-srpm-macros noarch 2-18.fc41 fedora 112.0 B openldap s390x 2.6.8-5.fc41 fedora 683.6 KiB openssl-libs s390x 1:3.2.2-8.fc42 fedora 6.1 MiB p11-kit s390x 0.25.5-4.fc42 fedora 2.5 MiB p11-kit-trust s390x 0.25.5-4.fc42 fedora 479.2 KiB package-notes-srpm-macros noarch 0.5-12.fc41 fedora 1.6 KiB pam s390x 1.7.0-2.fc42 fedora 1.5 MiB pam-libs s390x 1.7.0-2.fc42 fedora 122.8 KiB pcre2 s390x 10.44-1.fc41.1 fedora 684.9 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 s390x 2.3.0-1.fc42 fedora 92.4 KiB pkgconf-m4 noarch 2.3.0-1.fc42 fedora 14.4 KiB pkgconf-pkg-config s390x 2.3.0-1.fc42 fedora 988.0 B popt s390x 1.19-7.fc41 fedora 144.7 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 s390x 8.2-11.fc42 fedora 556.8 KiB rpm s390x 4.20.0-1.fc42 fedora 3.1 MiB rpm-build-libs s390x 4.20.0-1.fc42 fedora 218.4 KiB rpm-libs s390x 4.20.0-1.fc42 fedora 813.6 KiB rpm-sequoia s390x 1.7.0-2.fc41 fedora 3.2 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 s390x 3.46.1-1.fc42 fedora 1.6 MiB systemd-libs s390x 257~rc1-2.fc42 fedora 2.3 MiB util-linux-core s390x 2.40.2-8.fc42 fedora 1.5 MiB xxhash-libs s390x 0.8.2-4.fc42 fedora 68.0 KiB xz-libs s390x 1:5.6.3-2.fc42 fedora 226.1 KiB zig-srpm-macros noarch 1-3.fc41 fedora 1.1 KiB zip s390x 3.0-41.fc41 fedora 750.2 KiB zlib-ng-compat s390x 2.2.2-1.fc42 fedora 109.4 KiB zstd s390x 1.5.6-2.fc41 fedora 1.8 MiB Installing groups: Buildsystem building group Transaction Summary: Installing: 153 packages Total size of inbound packages is 54 MiB. Need to download 0 B. After this operation, 184 MiB extra will be used (install 184 MiB, remove 0 B). [1/1] tar-2:1.35-4.fc41.s390x 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.s390x 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.s390x 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.s390x 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.s390x 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.s390x 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.s390x 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.s390x 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.s390x 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.s390x 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.s390x 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.s3 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] util-linux-0:2.40.2-8.fc42.s390 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] diffutils-0:3.10-8.fc41.s390x 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] findutils-1:4.10.0-4.fc41.s390x 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] gawk-0:5.3.0-4.fc41.s390x 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] glibc-minimal-langpack-0:2.40.9 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] gzip-0:1.13-2.fc41.s390x 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] info-0:7.1.1-2.fc42.s390x 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] xz-1:5.6.3-2.fc42.s390x 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] fedora-release-common-0:42-0.10 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.s390x 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.s390x 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.s390x 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.s390 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.s390x 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.s390x 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.s390x 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.s390x 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] binutils-0:2.43.50-5.fc42.s390x 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] debugedit-0:5.1-1.fc42.s390x 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-0:0.192-3.fc42.s390x 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] elfutils-libelf-0:0.192-3.fc42. 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] libarchive-0:3.7.7-1.fc42.s390x 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] pkgconf-pkg-config-0:2.3.0-1.fc 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] popt-0:1.19-7.fc41.s390x 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] readline-0:8.2-11.fc42.s390x 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] rpm-build-libs-0:4.20.0-1.fc42. 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] rpm-libs-0:4.20.0-1.fc42.s390x 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] zstd-0:1.5.6-2.fc41.s390x 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] filesystem-0:3.18-29.fc42.s390x 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] ncurses-libs-0:6.5-2.20240629.f 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] coreutils-common-0:9.5-10.fc42. 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] gmp-1:6.3.0-2.fc41.s390x 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] libattr-0:2.5.2-4.fc41.s390x 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] libcap-0:2.71-1.fc42.s390x 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] openssl-libs-1:3.2.2-8.fc42.s39 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] systemd-libs-0:257~rc1-2.fc42.s 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] pcre2-0:10.44-1.fc41.1.s390x 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] ed-0:1.20.2-2.fc41.s390x 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] audit-libs-0:4.0.2-1.fc41.s390x 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] libeconf-0:0.7.4-3.fc42.s390x 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] libsemanage-0:3.7-3.fc42.s390x 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] libxcrypt-0:4.4.36-10.fc42.s390 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] pam-libs-0:1.7.0-2.fc42.s390x 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] setup-0:2.15.0-5.fc41.noarch 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] authselect-libs-0:1.5.0-8.fc42. 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] libblkid-0:2.40.2-8.fc42.s390x 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] libcap-ng-0:0.8.5-3.fc41.s390x 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] libfdisk-0:2.40.2-8.fc42.s390x 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] libmount-0:2.40.2-8.fc42.s390x 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] libsmartcols-0:2.40.2-8.fc42.s3 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] libuuid-0:2.40.2-8.fc42.s390x 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] pam-0:1.7.0-2.fc42.s390x 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] util-linux-core-0:2.40.2-8.fc42 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] zlib-ng-compat-0:2.2.2-1.fc42.s 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] mpfr-0:4.2.1-5.fc41.s390x 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] glibc-common-0:2.40.9000-16.fc4 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] xz-libs-1:5.6.3-2.fc42.s390x 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] fedora-repos-0:42-0.3.noarch 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] glibc-gconv-extra-0:2.40.9000-1 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] basesystem-0:11-21.fc41.noarch 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] libgcc-0:14.2.1-6.fc42.s390x 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] libsepol-0:3.7-3.fc42.s390x 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] add-determinism-0:0.4.3-1.fc42. 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] file-libs-0:5.45-7.fc41.s390x 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] curl-0:8.10.1-2.fc42.s390x 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] alternatives-0:1.30-1.fc41.s3 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] elfutils-debuginfod-client-0: 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] jansson-0:2.14-1.fc42.s390x 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] libstdc++-0:14.2.1-6.fc42.s39 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] elfutils-libs-0:0.192-3.fc42. 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] libzstd-0:1.5.6-2.fc41.s390x 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] libxml2-0:2.12.8-2.fc41.s390x 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] lz4-libs-0:1.10.0-1.fc41.s390 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] pkgconf-0:2.3.0-1.fc42.s390x 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] pkgconf-m4-0:2.3.0-1.fc42.noa 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] libgomp-0:14.2.1-6.fc42.s390x 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] lua-libs-0:5.4.7-1.fc42.s390x 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] rpm-sequoia-0:1.7.0-2.fc41.s3 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] sqlite-libs-0:3.46.1-1.fc42.s 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] ncurses-base-0:6.5-2.20240629 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] ca-certificates-0:2024.2.69_v 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] crypto-policies-0:20241106-1. 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] pcre2-syntax-0:10.44-1.fc41.1 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] authselect-0:1.5.0-8.fc42.s39 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] gdbm-1:1.23-7.fc41.s390x 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] gdbm-libs-1:1.23-7.fc41.s390x 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] libpwquality-0:1.4.5-11.fc41. 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] libtirpc-0:1.3.6-0.rc1.fc42.s 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] fedora-gpg-keys-0:42-0.3.noar 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] fedora-repos-rawhide-0:42-0.3 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] json-c-0:0.18-1.fc42.s390x 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] elfutils-default-yama-scope-0 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] libpkgconf-0:2.3.0-1.fc42.s39 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] libffi-0:3.4.6-3.fc42.s390x 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] p11-kit-0:0.25.5-4.fc42.s390x 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] p11-kit-trust-0:0.25.5-4.fc42 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] cracklib-0:2.9.11-6.fc41.s390 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] krb5-libs-0:1.21.3-3.fc42.s39 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] libcom_err-0:1.47.1-6.fc42.s3 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] libtasn1-0:4.19.0-9.fc41.s390 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] keyutils-libs-0:1.6.3-4.fc41. 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] libverto-0:0.3.2-9.fc41.s390x 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] fedora-release-0:42-0.102.318 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-identity-basic 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] gdb-minimal-0:15.2-2.fc42.s39 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] xxhash-libs-0:0.8.2-4.fc42.s3 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] libcurl-0:8.10.1-2.fc42.s390x 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] libbrotli-0:1.1.0-5.fc41.s390 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] libidn2-0:2.3.7-2.fc41.s390x 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] libnghttp2-0:1.64.0-1.fc42.s3 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] libpsl-0:0.21.5-4.fc41.s390x 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] libssh-0:0.11.1-1.fc42.s390x 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] openldap-0:2.6.8-5.fc41.s390x 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] libunistring-0:1.1-8.fc41.s39 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] publicsuffix-list-dafsa-0:202 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] libssh-config-0:0.11.1-1.fc42 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] cyrus-sasl-lib-0:2.1.28-27.fc 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] libevent-0:2.1.12-14.fc41.s39 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] libtool-ltdl-0:2.4.7-12.fc41. 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded -------------------------------------------------------------------------------- [153/153] 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/155] Verify package files 100% | 792.0 B/s | 153.0 B | 00m00s [ 2/155] Prepare transaction 100% | 2.9 KiB/s | 153.0 B | 00m00s [ 3/155] Installing libgcc-0:14.2.1-6. 100% | 83.5 MiB/s | 170.9 KiB | 00m00s [ 4/155] Installing libssh-config-0:0. 100% | 0.0 B/s | 816.0 B | 00m00s [ 5/155] Installing publicsuffix-list- 100% | 0.0 B/s | 68.3 KiB | 00m00s [ 6/155] Installing fedora-release-ide 100% | 0.0 B/s | 976.0 B | 00m00s [ 7/155] Installing fedora-gpg-keys-0: 100% | 42.0 MiB/s | 172.2 KiB | 00m00s [ 8/155] Installing fedora-repos-rawhi 100% | 0.0 B/s | 2.4 KiB | 00m00s [ 9/155] Installing fedora-repos-0:42- 100% | 0.0 B/s | 5.7 KiB | 00m00s [ 10/155] Installing fedora-release-com 100% | 23.4 MiB/s | 24.0 KiB | 00m00s [ 11/155] Installing fedora-release-0:4 100% | 0.0 B/s | 124.0 B | 00m00s [ 12/155] Installing setup-0:2.15.0-5.f 100% | 50.6 MiB/s | 726.1 KiB | 00m00s [ 13/155] Installing filesystem-0:3.18- 100% | 3.1 MiB/s | 212.6 KiB | 00m00s [ 14/155] Installing basesystem-0:11-21 100% | 0.0 B/s | 124.0 B | 00m00s [ 15/155] Installing pcre2-syntax-0:10. 100% | 248.1 MiB/s | 254.1 KiB | 00m00s [ 16/155] Installing ncurses-base-0:6.5 100% | 85.9 MiB/s | 351.7 KiB | 00m00s [ 17/155] Installing glibc-minimal-lang 100% | 0.0 B/s | 124.0 B | 00m00s [ 18/155] Installing ncurses-libs-0:6.5 100% | 177.1 MiB/s | 1.1 MiB | 00m00s [ 19/155] Installing glibc-0:2.40.9000- 100% | 225.0 MiB/s | 5.2 MiB | 00m00s [ 20/155] Installing bash-0:5.2.37-1.fc 100% | 350.1 MiB/s | 8.4 MiB | 00m00s [ 21/155] Installing glibc-common-0:2.4 100% | 155.4 MiB/s | 1.1 MiB | 00m00s [ 22/155] Installing glibc-gconv-extra- 100% | 229.3 MiB/s | 6.9 MiB | 00m00s [ 23/155] Installing zlib-ng-compat-0:2 100% | 107.7 MiB/s | 110.3 KiB | 00m00s [ 24/155] Installing bzip2-libs-0:1.0.8 100% | 0.0 B/s | 89.6 KiB | 00m00s [ 25/155] Installing xz-libs-1:5.6.3-2. 100% | 221.9 MiB/s | 227.2 KiB | 00m00s [ 26/155] Installing popt-0:1.19-7.fc41 100% | 73.9 MiB/s | 151.3 KiB | 00m00s [ 27/155] Installing readline-0:8.2-11. 100% | 272.9 MiB/s | 558.9 KiB | 00m00s [ 28/155] Installing libuuid-0:2.40.2-8 100% | 0.0 B/s | 42.3 KiB | 00m00s [ 29/155] Installing libblkid-0:2.40.2- 100% | 280.8 MiB/s | 287.6 KiB | 00m00s [ 30/155] Installing gmp-1:6.3.0-2.fc41 100% | 251.4 MiB/s | 772.2 KiB | 00m00s [ 31/155] Installing libattr-0:2.5.2-4. 100% | 0.0 B/s | 29.3 KiB | 00m00s [ 32/155] Installing libacl-0:2.3.2-2.f 100% | 0.0 B/s | 44.6 KiB | 00m00s [ 33/155] Installing libxcrypt-0:4.4.36 100% | 267.7 MiB/s | 274.2 KiB | 00m00s [ 34/155] Installing libstdc++-0:14.2.1 100% | 310.4 MiB/s | 3.1 MiB | 00m00s [ 35/155] Installing libzstd-0:1.5.6-2. 100% | 285.5 MiB/s | 877.0 KiB | 00m00s [ 36/155] Installing elfutils-libelf-0: 100% | 393.9 MiB/s | 1.2 MiB | 00m00s [ 37/155] Installing libeconf-0:0.7.4-3 100% | 0.0 B/s | 71.0 KiB | 00m00s [ 38/155] Installing gdbm-libs-1:1.23-7 100% | 132.0 MiB/s | 135.1 KiB | 00m00s [ 39/155] Installing dwz-0:0.15-8.fc42. 100% | 312.5 MiB/s | 320.0 KiB | 00m00s [ 40/155] Installing mpfr-0:4.2.1-5.fc4 100% | 228.0 MiB/s | 700.4 KiB | 00m00s [ 41/155] Installing gawk-0:5.3.0-4.fc4 100% | 259.2 MiB/s | 1.8 MiB | 00m00s [ 42/155] Installing unzip-0:6.0-64.fc4 100% | 201.9 MiB/s | 413.5 KiB | 00m00s [ 43/155] Installing file-libs-0:5.45-7 100% | 621.6 MiB/s | 9.9 MiB | 00m00s [ 44/155] Installing file-0:5.45-7.fc41 100% | 20.5 MiB/s | 104.8 KiB | 00m00s [ 45/155] Installing crypto-policies-0: 100% | 39.9 MiB/s | 163.3 KiB | 00m00s [ 46/155] Installing pcre2-0:10.44-1.fc 100% | 223.4 MiB/s | 686.3 KiB | 00m00s [ 47/155] Installing grep-0:3.11-9.fc41 100% | 203.7 MiB/s | 1.0 MiB | 00m00s [ 48/155] Installing xz-1:5.6.3-2.fc42. 100% | 206.8 MiB/s | 1.2 MiB | 00m00s [ 49/155] Installing libcap-ng-0:0.8.5- 100% | 0.0 B/s | 78.6 KiB | 00m00s [ 50/155] Installing audit-libs-0:4.0.2 100% | 172.4 MiB/s | 353.0 KiB | 00m00s [ 51/155] Installing pam-libs-0:1.7.0-2 100% | 122.3 MiB/s | 125.2 KiB | 00m00s [ 52/155] Installing libcap-0:2.71-1.fc 100% | 105.8 MiB/s | 216.7 KiB | 00m00s [ 53/155] Installing systemd-libs-0:257 100% | 254.5 MiB/s | 2.3 MiB | 00m00s [ 54/155] Installing libsmartcols-0:2.4 100% | 188.7 MiB/s | 193.2 KiB | 00m00s [ 55/155] Installing libsepol-0:3.7-3.f 100% | 276.9 MiB/s | 850.7 KiB | 00m00s [ 56/155] Installing libselinux-0:3.7-6 100% | 189.6 MiB/s | 194.2 KiB | 00m00s [ 57/155] Installing sed-0:4.9-3.fc41.s 100% | 215.2 MiB/s | 881.4 KiB | 00m00s [ 58/155] Installing findutils-1:4.10.0 100% | 270.4 MiB/s | 1.9 MiB | 00m00s [ 59/155] Installing libmount-0:2.40.2- 100% | 184.0 MiB/s | 376.9 KiB | 00m00s [ 60/155] Installing alternatives-0:1.3 100% | 0.0 B/s | 71.7 KiB | 00m00s [ 61/155] Installing lz4-libs-0:1.10.0- 100% | 197.6 MiB/s | 202.4 KiB | 00m00s [ 62/155] Installing lua-libs-0:5.4.7-1 100% | 322.3 MiB/s | 330.0 KiB | 00m00s [ 63/155] Installing libffi-0:3.4.6-3.f 100% | 0.0 B/s | 67.3 KiB | 00m00s [ 64/155] Installing libcom_err-0:1.47. 100% | 0.0 B/s | 68.0 KiB | 00m00s [ 65/155] Installing libtasn1-0:4.19.0- 100% | 184.9 MiB/s | 189.3 KiB | 00m00s [ 66/155] Installing p11-kit-0:0.25.5-4 100% | 251.2 MiB/s | 2.5 MiB | 00m00s [ 67/155] Installing libunistring-0:1.1 100% | 295.6 MiB/s | 1.8 MiB | 00m00s [ 68/155] Installing libidn2-0:2.3.7-2. 100% | 163.5 MiB/s | 334.9 KiB | 00m00s [ 69/155] Installing libpsl-0:0.21.5-4. 100% | 0.0 B/s | 81.4 KiB | 00m00s [ 70/155] Installing p11-kit-trust-0:0. 100% | 93.9 MiB/s | 480.9 KiB | 00m00s [ 71/155] Installing zstd-0:1.5.6-2.fc4 100% | 262.1 MiB/s | 1.8 MiB | 00m00s [ 72/155] Installing util-linux-core-0: 100% | 220.5 MiB/s | 1.5 MiB | 00m00s [ 73/155] Installing tar-2:1.35-4.fc41. 100% | 302.0 MiB/s | 3.0 MiB | 00m00s [ 74/155] Installing libsemanage-0:3.7- 100% | 100.0 MiB/s | 307.1 KiB | 00m00s [ 75/155] Installing shadow-utils-2:4.1 100% | 219.8 MiB/s | 4.2 MiB | 00m00s [ 76/155] Installing zip-0:3.0-41.fc41. 100% | 245.5 MiB/s | 754.1 KiB | 00m00s [ 77/155] Installing gdbm-1:1.23-7.fc41 100% | 238.7 MiB/s | 488.8 KiB | 00m00s [ 78/155] Installing cyrus-sasl-lib-0:2 100% | 298.6 MiB/s | 2.4 MiB | 00m00s [ 79/155] Installing libfdisk-0:2.40.2- 100% | 193.3 MiB/s | 395.9 KiB | 00m00s [ 80/155] Installing libxml2-0:2.12.8-2 100% | 268.5 MiB/s | 1.9 MiB | 00m00s [ 81/155] Installing bzip2-0:1.0.8-19.f 100% | 101.3 MiB/s | 103.7 KiB | 00m00s [ 82/155] Installing add-determinism-0: 100% | 299.0 MiB/s | 3.3 MiB | 00m00s [ 83/155] Installing build-reproducibil 100% | 0.0 B/s | 1.0 KiB | 00m00s [ 84/155] Installing sqlite-libs-0:3.46 100% | 265.6 MiB/s | 1.6 MiB | 00m00s [ 85/155] Installing ed-0:1.20.2-2.fc41 100% | 149.3 MiB/s | 152.9 KiB | 00m00s [ 86/155] Installing patch-0:2.7.6-25.f 100% | 292.8 MiB/s | 299.9 KiB | 00m00s [ 87/155] Installing elfutils-default-y 100% | 681.0 KiB/s | 2.0 KiB | 00m00s [ 88/155] Installing elfutils-libs-0:0. 100% | 187.5 MiB/s | 768.1 KiB | 00m00s [ 89/155] Installing cpio-0:2.15-2.fc41 100% | 223.8 MiB/s | 1.1 MiB | 00m00s [ 90/155] Installing diffutils-0:3.10-8 100% | 271.4 MiB/s | 1.6 MiB | 00m00s [ 91/155] Installing jansson-0:2.14-1.f 100% | 92.1 MiB/s | 94.3 KiB | 00m00s [ 92/155] Installing libgomp-0:14.2.1-6 100% | 258.2 MiB/s | 528.8 KiB | 00m00s [ 93/155] Installing json-c-0:0.18-1.fc 100% | 82.2 MiB/s | 84.1 KiB | 00m00s [ 94/155] Installing libpkgconf-0:2.3.0 100% | 84.9 MiB/s | 87.0 KiB | 00m00s [ 95/155] Installing pkgconf-0:2.3.0-1. 100% | 92.7 MiB/s | 94.9 KiB | 00m00s [ 96/155] Installing keyutils-libs-0:1. 100% | 0.0 B/s | 55.6 KiB | 00m00s [ 97/155] Installing libverto-0:0.3.2-9 100% | 0.0 B/s | 31.1 KiB | 00m00s [ 98/155] Installing xxhash-libs-0:0.8. 100% | 0.0 B/s | 69.4 KiB | 00m00s [ 99/155] Installing libbrotli-0:1.1.0- 100% | 226.4 MiB/s | 927.4 KiB | 00m00s [100/155] Installing libnghttp2-0:1.64. 100% | 174.9 MiB/s | 179.1 KiB | 00m00s [101/155] Installing libtool-ltdl-0:2.4 100% | 0.0 B/s | 75.1 KiB | 00m00s [102/155] Installing pkgconf-m4-0:2.3.0 100% | 0.0 B/s | 14.8 KiB | 00m00s [103/155] Installing pkgconf-pkg-config 100% | 1.7 MiB/s | 1.8 KiB | 00m00s [104/155] Installing coreutils-common-0 100% | 339.1 MiB/s | 11.2 MiB | 00m00s [105/155] Installing openssl-libs-1:3.2 100% | 279.2 MiB/s | 6.1 MiB | 00m00s [106/155] Installing coreutils-0:9.5-10 100% | 281.6 MiB/s | 6.2 MiB | 00m00s [107/155] Installing ca-certificates-0: 100% | 1.8 MiB/s | 2.4 MiB | 00m01s [108/155] Installing krb5-libs-0:1.21.3 100% | 219.8 MiB/s | 2.4 MiB | 00m00s [109/155] Installing libarchive-0:3.7.7 100% | 249.5 MiB/s | 1.0 MiB | 00m00s [110/155] Installing gzip-0:1.13-2.fc41 100% | 132.3 MiB/s | 406.3 KiB | 00m00s [111/155] Installing authselect-libs-0: 100% | 163.8 MiB/s | 838.5 KiB | 00m00s [112/155] Installing cracklib-0:2.9.11- 100% | 85.1 MiB/s | 261.4 KiB | 00m00s [113/155] Installing libpwquality-0:1.4 100% | 141.0 MiB/s | 433.3 KiB | 00m00s [114/155] Installing libtirpc-0:1.3.6-0 100% | 104.7 MiB/s | 214.4 KiB | 00m00s [115/155] Installing pam-0:1.7.0-2.fc42 100% | 133.2 MiB/s | 1.6 MiB | 00m00s [116/155] Installing libssh-0:0.11.1-1. 100% | 191.2 MiB/s | 587.4 KiB | 00m00s [117/155] Installing rpm-sequoia-0:1.7. 100% | 289.1 MiB/s | 3.2 MiB | 00m00s [118/155] Installing rpm-libs-0:4.20.0- 100% | 265.3 MiB/s | 815.1 KiB | 00m00s [119/155] Installing rpm-build-libs-0:4 100% | 214.1 MiB/s | 219.3 KiB | 00m00s [120/155] Installing libevent-0:2.1.12- 100% | 306.8 MiB/s | 942.6 KiB | 00m00s [121/155] Installing openldap-0:2.6.8-5 100% | 223.8 MiB/s | 687.4 KiB | 00m00s [122/155] Installing libcurl-0:8.10.1-2 100% | 217.6 MiB/s | 891.2 KiB | 00m00s [123/155] Installing elfutils-debuginfo 100% | 75.9 MiB/s | 77.7 KiB | 00m00s [124/155] Installing binutils-0:2.43.50 100% | 325.2 MiB/s | 27.0 MiB | 00m00s [125/155] Installing elfutils-0:0.192-3 100% | 306.6 MiB/s | 3.1 MiB | 00m00s [126/155] Installing gdb-minimal-0:15.2 100% | 304.0 MiB/s | 15.2 MiB | 00m00s [127/155] Installing debugedit-0:5.1-1. 100% | 193.9 MiB/s | 198.6 KiB | 00m00s [128/155] Installing curl-0:8.10.1-2.fc 100% | 68.0 MiB/s | 487.6 KiB | 00m00s [129/155] Installing rpm-0:4.20.0-1.fc4 100% | 167.0 MiB/s | 2.5 MiB | 00m00s [130/155] Installing efi-srpm-macros-0: 100% | 0.0 B/s | 41.2 KiB | 00m00s [131/155] Installing lua-srpm-macros-0: 100% | 0.0 B/s | 1.9 KiB | 00m00s [132/155] Installing zig-srpm-macros-0: 100% | 0.0 B/s | 1.7 KiB | 00m00s [133/155] Installing rust-srpm-macros-0 100% | 0.0 B/s | 5.6 KiB | 00m00s [134/155] Installing qt6-srpm-macros-0: 100% | 0.0 B/s | 732.0 B | 00m00s [135/155] Installing qt5-srpm-macros-0: 100% | 0.0 B/s | 776.0 B | 00m00s [136/155] Installing perl-srpm-macros-0 100% | 0.0 B/s | 1.1 KiB | 00m00s [137/155] Installing package-notes-srpm 100% | 0.0 B/s | 2.0 KiB | 00m00s [138/155] Installing openblas-srpm-macr 100% | 0.0 B/s | 392.0 B | 00m00s [139/155] Installing ocaml-srpm-macros- 100% | 0.0 B/s | 2.2 KiB | 00m00s [140/155] Installing kernel-srpm-macros 100% | 0.0 B/s | 2.3 KiB | 00m00s [141/155] Installing gnat-srpm-macros-0 100% | 0.0 B/s | 1.3 KiB | 00m00s [142/155] Installing ghc-srpm-macros-0: 100% | 0.0 B/s | 1.0 KiB | 00m00s [143/155] Installing fpc-srpm-macros-0: 100% | 0.0 B/s | 420.0 B | 00m00s [144/155] Installing ansible-srpm-macro 100% | 0.0 B/s | 36.2 KiB | 00m00s [145/155] Installing fonts-srpm-macros- 100% | 0.0 B/s | 57.0 KiB | 00m00s [146/155] Installing forge-srpm-macros- 100% | 0.0 B/s | 40.3 KiB | 00m00s [147/155] Installing go-srpm-macros-0:3 100% | 0.0 B/s | 62.0 KiB | 00m00s [148/155] Installing python-srpm-macros 100% | 50.9 MiB/s | 52.2 KiB | 00m00s [149/155] Installing redhat-rpm-config- 100% | 94.4 MiB/s | 193.2 KiB | 00m00s [150/155] Installing rpm-build-0:4.20.0 100% | 102.0 MiB/s | 209.0 KiB | 00m00s [151/155] Installing pyproject-srpm-mac 100% | 1.2 MiB/s | 2.5 KiB | 00m00s [152/155] Installing util-linux-0:2.40. 100% | 177.6 MiB/s | 3.7 MiB | 00m00s [153/155] Installing authselect-0:1.5.0 100% | 78.9 MiB/s | 161.7 KiB | 00m00s [154/155] Installing which-0:2.21-42.fc 100% | 84.1 MiB/s | 86.1 KiB | 00m00s [155/155] Installing info-0:7.1.1-2.fc4 100% | 248.9 KiB/s | 409.5 KiB | 00m02s 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.s390x alternatives-1.30-1.fc41.s390x ansible-srpm-macros-1-16.fc41.noarch audit-libs-4.0.2-1.fc41.s390x authselect-1.5.0-8.fc42.s390x authselect-libs-1.5.0-8.fc42.s390x basesystem-11-21.fc41.noarch bash-5.2.37-1.fc42.s390x binutils-2.43.50-5.fc42.s390x build-reproducibility-srpm-macros-0.4.3-1.fc42.noarch bzip2-1.0.8-19.fc41.s390x bzip2-libs-1.0.8-19.fc41.s390x ca-certificates-2024.2.69_v8.0.401-2.fc42.noarch coreutils-9.5-10.fc42.s390x coreutils-common-9.5-10.fc42.s390x cpio-2.15-2.fc41.s390x cracklib-2.9.11-6.fc41.s390x crypto-policies-20241106-1.git35892de.fc42.noarch curl-8.10.1-2.fc42.s390x cyrus-sasl-lib-2.1.28-27.fc41.s390x debugedit-5.1-1.fc42.s390x diffutils-3.10-8.fc41.s390x dwz-0.15-8.fc42.s390x ed-1.20.2-2.fc41.s390x efi-srpm-macros-5-12.fc41.noarch elfutils-0.192-3.fc42.s390x elfutils-debuginfod-client-0.192-3.fc42.s390x elfutils-default-yama-scope-0.192-3.fc42.noarch elfutils-libelf-0.192-3.fc42.s390x elfutils-libs-0.192-3.fc42.s390x fedora-gpg-keys-42-0.3.noarch fedora-release-42-0.102.318.23.noarch fedora-release-common-42-0.102.318.23.noarch fedora-release-identity-basic-42-0.102.318.23.noarch fedora-repos-42-0.3.noarch fedora-repos-rawhide-42-0.3.noarch file-5.45-7.fc41.s390x file-libs-5.45-7.fc41.s390x filesystem-3.18-29.fc42.s390x findutils-4.10.0-4.fc41.s390x 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.s390x gdb-minimal-15.2-2.fc42.s390x gdbm-1.23-7.fc41.s390x gdbm-libs-1.23-7.fc41.s390x ghc-srpm-macros-1.9.2-1.fc42.noarch glibc-2.40.9000-16.fc42.s390x glibc-common-2.40.9000-16.fc42.s390x glibc-gconv-extra-2.40.9000-16.fc42.s390x glibc-minimal-langpack-2.40.9000-16.fc42.s390x gmp-6.3.0-2.fc41.s390x 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.s390x gzip-1.13-2.fc41.s390x info-7.1.1-2.fc42.s390x jansson-2.14-1.fc42.s390x json-c-0.18-1.fc42.s390x kernel-srpm-macros-1.0-24.fc41.noarch keyutils-libs-1.6.3-4.fc41.s390x krb5-libs-1.21.3-3.fc42.s390x libacl-2.3.2-2.fc41.s390x libarchive-3.7.7-1.fc42.s390x libattr-2.5.2-4.fc41.s390x libblkid-2.40.2-8.fc42.s390x libbrotli-1.1.0-5.fc41.s390x libcap-2.71-1.fc42.s390x libcap-ng-0.8.5-3.fc41.s390x libcom_err-1.47.1-6.fc42.s390x libcurl-8.10.1-2.fc42.s390x libeconf-0.7.4-3.fc42.s390x libevent-2.1.12-14.fc41.s390x libfdisk-2.40.2-8.fc42.s390x libffi-3.4.6-3.fc42.s390x libgcc-14.2.1-6.fc42.s390x libgomp-14.2.1-6.fc42.s390x libidn2-2.3.7-2.fc41.s390x libmount-2.40.2-8.fc42.s390x libnghttp2-1.64.0-1.fc42.s390x libpkgconf-2.3.0-1.fc42.s390x libpsl-0.21.5-4.fc41.s390x libpwquality-1.4.5-11.fc41.s390x libselinux-3.7-6.fc42.s390x libsemanage-3.7-3.fc42.s390x libsepol-3.7-3.fc42.s390x libsmartcols-2.40.2-8.fc42.s390x libssh-0.11.1-1.fc42.s390x libssh-config-0.11.1-1.fc42.noarch libstdc++-14.2.1-6.fc42.s390x libtasn1-4.19.0-9.fc41.s390x libtirpc-1.3.6-0.rc1.fc42.s390x libtool-ltdl-2.4.7-12.fc41.s390x libunistring-1.1-8.fc41.s390x libuuid-2.40.2-8.fc42.s390x libverto-0.3.2-9.fc41.s390x libxcrypt-4.4.36-10.fc42.s390x libxml2-2.12.8-2.fc41.s390x libzstd-1.5.6-2.fc41.s390x lua-libs-5.4.7-1.fc42.s390x lua-srpm-macros-1-14.fc41.noarch lz4-libs-1.10.0-1.fc41.s390x mpfr-4.2.1-5.fc41.s390x ncurses-base-6.5-2.20240629.fc41.noarch ncurses-libs-6.5-2.20240629.fc41.s390x ocaml-srpm-macros-10-3.fc41.noarch openblas-srpm-macros-2-18.fc41.noarch openldap-2.6.8-5.fc41.s390x openssl-libs-3.2.2-8.fc42.s390x p11-kit-0.25.5-4.fc42.s390x p11-kit-trust-0.25.5-4.fc42.s390x package-notes-srpm-macros-0.5-12.fc41.noarch pam-1.7.0-2.fc42.s390x pam-libs-1.7.0-2.fc42.s390x patch-2.7.6-25.fc41.s390x pcre2-10.44-1.fc41.1.s390x pcre2-syntax-10.44-1.fc41.1.noarch perl-srpm-macros-1-56.fc41.noarch pkgconf-2.3.0-1.fc42.s390x pkgconf-m4-2.3.0-1.fc42.noarch pkgconf-pkg-config-2.3.0-1.fc42.s390x popt-1.19-7.fc41.s390x 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.s390x redhat-rpm-config-296-1.fc42.noarch rpm-4.20.0-1.fc42.s390x rpm-build-4.20.0-1.fc42.s390x rpm-build-libs-4.20.0-1.fc42.s390x rpm-libs-4.20.0-1.fc42.s390x rpm-sequoia-1.7.0-2.fc41.s390x rust-srpm-macros-26.3-3.fc42.noarch sed-4.9-3.fc41.s390x setup-2.15.0-5.fc41.noarch shadow-utils-4.16.0-6.fc42.s390x sqlite-libs-3.46.1-1.fc42.s390x systemd-libs-257~rc1-2.fc42.s390x tar-1.35-4.fc41.s390x unzip-6.0-64.fc41.s390x util-linux-2.40.2-8.fc42.s390x util-linux-core-2.40.2-8.fc42.s390x which-2.21-42.fc41.s390x xxhash-libs-0.8.2-4.fc42.s390x xz-5.6.3-2.fc42.s390x xz-libs-5.6.3-2.fc42.s390x zig-srpm-macros-1-3.fc41.noarch zip-3.0-41.fc41.s390x zlib-ng-compat-2.2.2-1.fc42.s390x zstd-1.5.6-2.fc41.s390x Start: buildsrpm Start: rpmbuild -bs Building target platforms: s390x Building for target s390x setting SOURCE_DATE_EPOCH=1721779200 Wrote: /builddir/build/SRPMS/rubygem-curb-1.0.5-6.fc42.318.23.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-s390x-1731546042.504027/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-u16xr15z/rubygem-curb/rubygem-curb.spec) Config(child) 0 minutes 35 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.318.23.src.rpm) Config(fedora-rawhide-s390x) Start(bootstrap): chroot init INFO: mounting tmpfs at /var/lib/mock/fedora-rawhide-s390x-bootstrap-1731546042.504027/root. INFO: reusing tmpfs at /var/lib/mock/fedora-rawhide-s390x-bootstrap-1731546042.504027/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-s390x-1731546042.504027/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.s390x rpm-sequoia-1.7.0-2.fc41.s390x dnf5-5.2.6.2-1.fc42.s390x dnf5-plugins-5.2.6.2-1.fc42.s390x Finish: chroot init Start: build phase for rubygem-curb-1.0.5-6.fc42.318.23.src.rpm Start: build setup for rubygem-curb-1.0.5-6.fc42.318.23.src.rpm Building target platforms: s390x Building for target s390x setting SOURCE_DATE_EPOCH=1721779200 Wrote: /builddir/build/SRPMS/rubygem-curb-1.0.5-6.fc42.318.23.src.rpm Updating and loading repositories: fedora 100% | 98.3 KiB/s | 5.2 KiB | 00m00s Additional repo copr_mtasaka_ruby_34_0 100% | 309.0 B/s | 1.5 KiB | 00m05s Copr repository 100% | 85.2 KiB/s | 1.5 KiB | 00m00s Copr repository 100% | 164.5 KiB/s | 829.8 KiB | 00m05s Repositories loaded. Package Arch Version Repository Size Installing: gcc s390x 14.2.1-6.fc42 fedora 78.2 MiB iproute s390x 6.10.0-1.fc41 fedora 2.2 MiB libcurl-devel s390x 8.10.1-2.fc42 fedora 1.3 MiB ruby-devel s390x 3.4.0~20241113.2324git30e1d6b5a8-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 1.6 MiB ruby-libs s390x 3.4.0~20241113.2324git30e1d6b5a8-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 13.7 MiB rubygem-test-unit noarch 3.6.2-202.fc42.316.21 copr_base 355.1 KiB rubygem-webrick noarch 1.7.0-9.fc41 fedora 196.9 KiB rubygems-devel noarch 3.6.0~20241113.2324git30e1d6b5a8-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 13.4 KiB Installing dependencies: annobin-docs noarch 12.70-1.fc42 fedora 97.7 KiB annobin-plugin-gcc s390x 12.70-1.fc42 fedora 985.3 KiB brotli s390x 1.1.0-5.fc41 fedora 35.6 KiB brotli-devel s390x 1.1.0-5.fc41 fedora 65.6 KiB cmake-filesystem s390x 3.30.5-1.fc42 fedora 0.0 B cpp s390x 14.2.1-6.fc42 fedora 26.2 MiB gcc-plugin-annobin s390x 14.2.1-6.fc42 fedora 57.1 KiB glibc-devel s390x 2.40.9000-16.fc42 fedora 2.6 MiB kernel-headers s390x 6.12.0-0.rc7.58.fc42 fedora 6.4 MiB libasan s390x 14.2.1-6.fc42 fedora 1.6 MiB libatomic s390x 14.2.1-6.fc42 fedora 28.3 KiB libbpf s390x 2:1.5.0-1.fc42 fedora 451.1 KiB libidn2-devel s390x 2.3.7-2.fc41 fedora 252.1 KiB libmnl s390x 1.0.5-6.fc41 fedora 59.0 KiB libmpc s390x 1.3.1-6.fc41 fedora 164.5 KiB libnghttp2-devel s390x 1.64.0-1.fc42 fedora 295.4 KiB libpsl-devel s390x 0.21.5-4.fc41 fedora 110.3 KiB libssh-devel s390x 0.11.1-1.fc42 fedora 177.8 KiB libubsan s390x 14.2.1-6.fc42 fedora 487.2 KiB libxcrypt-devel s390x 4.4.36-10.fc42 fedora 30.5 KiB libyaml s390x 0.2.5-15.fc41 fedora 134.3 KiB make s390x 1:4.4.1-9.fc42 fedora 1.9 MiB openssl-devel s390x 1:3.2.2-8.fc42 fedora 4.3 MiB psmisc s390x 23.7-3.fc41 fedora 832.8 KiB publicsuffix-list noarch 20240107-4.fc41 fedora 318.0 KiB ruby s390x 3.4.0~20241113.2324git30e1d6b5a8-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 80.1 KiB ruby-default-gems noarch 3.4.0~20241113.2324git30e1d6b5a8-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 66.0 KiB rubygem-io-console s390x 0.8.0~beta1-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 33.1 KiB rubygem-json s390x 2.8.1-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 145.2 KiB rubygem-power_assert noarch 2.0.4-200.fc42.316.21 copr_base 29.6 KiB rubygem-psych s390x 5.2.0-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 132.5 KiB rubygem-rdoc noarch 6.7.0-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 1.8 MiB rubygems noarch 3.6.0~20241113.2324git30e1d6b5a8-15.fc42.318.23.mod1 copr_mtasaka_ruby_34_02 1.4 MiB rubypick noarch 1.1.1-21.fc41 fedora 4.4 KiB zlib-ng-compat-devel s390x 2.2.2-1.fc42 fedora 106.8 KiB Transaction Summary: Installing: 43 packages Total size of inbound packages is 55 MiB. Need to download 6 MiB. After this operation, 149 MiB extra will be used (install 149 MiB, remove 0 B). [1/2] gcc-0:14.2.1-6.fc42.s390x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [2/5] ruby-libs-0:3.4.0~20241113.2324gi 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [3/6] ruby-devel-0:3.4.0~20241113.2324g 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [4/8] rubygems-devel-0:3.6.0~20241113.2 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 5/12] cpp-0:14.2.1-6.fc42.s390x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 6/13] glibc-devel-0:2.40.9000-16.fc42 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 7/14] libasan-0:14.2.1-6.fc42.s390x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 8/15] libatomic-0:14.2.1-6.fc42.s390x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [ 9/16] libmpc-0:1.3.1-6.fc41.s390x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [10/17] libubsan-0:14.2.1-6.fc42.s390x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [11/18] make-1:4.4.1-9.fc42.s390x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [12/26] rubypick-0:1.1.1-21.fc41.noarch 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [13/27] ruby-0:3.4.0~20241113.2324git30 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [14/28] rubygems-0:3.6.0~20241113.2324g 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [15/29] kernel-headers-0:6.12.0-0.rc7.5 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [16/30] libxcrypt-devel-0:4.4.36-10.fc4 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [17/35] rubygem-json-0:2.8.1-15.fc42.31 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [18/36] rubygem-rdoc-0:6.7.0-15.fc42.31 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [19/37] rubygem-psych-0:5.2.0-15.fc42.3 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [20/38] libyaml-0:0.2.5-15.fc41.s390x 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [21/39] rubygem-io-console-0:0.8.0~beta 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [22/40] ruby-default-gems-0:3.4.0~20241 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [23/41] annobin-plugin-gcc-0:12.70-1.fc 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [24/42] gcc-plugin-annobin-0:14.2.1-6.f 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [25/43] annobin-docs-0:12.70-1.fc42.noa 100% | 0.0 B/s | 0.0 B | 00m00s >>> Already downloaded [26/43] rubygem-webrick-0:1.7.0-9.fc41. 100% | 13.3 KiB/s | 66.5 KiB | 00m05s [27/43] iproute-0:6.10.0-1.fc41.s390x 100% | 168.5 KiB/s | 844.4 KiB | 00m05s [28/43] libbpf-2:1.5.0-1.fc42.s390x 100% | 3.1 MiB/s | 196.2 KiB | 00m00s [29/43] libcurl-devel-0:8.10.1-2.fc42.s 100% | 173.3 KiB/s | 881.4 KiB | 00m05s [30/43] rubygem-test-unit-0:3.6.2-202.f 100% | 1.0 MiB/s | 79.6 KiB | 00m00s [31/43] libmnl-0:1.0.5-6.fc41.s390x 100% | 1.5 MiB/s | 28.3 KiB | 00m00s [32/43] psmisc-0:23.7-3.fc41.s390x 100% | 15.5 MiB/s | 318.3 KiB | 00m00s [33/43] libidn2-devel-0:2.3.7-2.fc41.s3 100% | 2.9 MiB/s | 70.7 KiB | 00m00s [34/43] brotli-devel-0:1.1.0-5.fc41.s39 100% | 997.6 KiB/s | 33.9 KiB | 00m00s [35/43] libnghttp2-devel-0:1.64.0-1.fc4 100% | 2.3 MiB/s | 55.6 KiB | 00m00s [36/43] libpsl-devel-0:0.21.5-4.fc41.s3 100% | 2.0 MiB/s | 33.2 KiB | 00m00s [37/43] zlib-ng-compat-devel-0:2.2.2-1. 100% | 2.7 MiB/s | 38.1 KiB | 00m00s [38/43] libssh-devel-0:0.11.1-1.fc42.s3 100% | 1.7 MiB/s | 42.1 KiB | 00m00s [39/43] brotli-0:1.1.0-5.fc41.s390x 100% | 1.0 MiB/s | 20.4 KiB | 00m00s [40/43] publicsuffix-list-0:20240107-4. 100% | 4.3 MiB/s | 87.5 KiB | 00m00s [41/43] rubygem-power_assert-0:2.0.4-20 100% | 18.8 MiB/s | 19.3 KiB | 00m00s [42/43] cmake-filesystem-0:3.30.5-1.fc4 100% | 1.2 MiB/s | 17.3 KiB | 00m00s [43/43] openssl-devel-1:3.2.2-8.fc42.s3 100% | 30.2 MiB/s | 2.8 MiB | 00m00s -------------------------------------------------------------------------------- [43/43] Total 100% | 552.9 KiB/s | 5.6 MiB | 00m10s Running transaction [ 1/45] Verify package files 100% | 244.0 B/s | 43.0 B | 00m00s [ 2/45] Prepare transaction 100% | 573.0 B/s | 43.0 B | 00m00s [ 3/45] Installing ruby-libs-0:3.4.0~20 100% | 246.0 MiB/s | 13.8 MiB | 00m00s [ 4/45] Installing ruby-0:3.4.0~2024111 100% | 0.0 B/s | 81.8 KiB | 00m00s [ 5/45] Installing rubypick-0:1.1.1-21. 100% | 0.0 B/s | 5.1 KiB | 00m00s [ 6/45] Installing cmake-filesystem-0:3 100% | 7.1 MiB/s | 7.3 KiB | 00m00s [ 7/45] Installing libmpc-0:1.3.1-6.fc4 100% | 162.1 MiB/s | 166.0 KiB | 00m00s [ 8/45] Installing cpp-0:14.2.1-6.fc42. 100% | 297.8 MiB/s | 26.2 MiB | 00m00s [ 9/45] Installing libssh-devel-0:0.11. 100% | 176.1 MiB/s | 180.3 KiB | 00m00s [10/45] Installing zlib-ng-compat-devel 100% | 105.8 MiB/s | 108.3 KiB | 00m00s [11/45] Installing annobin-docs-0:12.70 100% | 0.0 B/s | 98.8 KiB | 00m00s [12/45] Installing libyaml-0:0.2.5-15.f 100% | 132.5 MiB/s | 135.7 KiB | 00m00s [13/45] Installing rubygems-0:3.6.0~202 100% | 166.3 MiB/s | 1.5 MiB | 00m00s [14/45] Installing rubygem-io-console-0 100% | 34.7 MiB/s | 35.6 KiB | 00m00s [15/45] Installing ruby-default-gems-0: 100% | 37.3 MiB/s | 76.4 KiB | 00m00s [16/45] Installing rubygem-psych-0:5.2. 100% | 69.0 MiB/s | 141.4 KiB | 00m00s [17/45] Installing rubygem-json-0:2.8.1 100% | 74.1 MiB/s | 151.7 KiB | 00m00s [18/45] Installing rubygem-rdoc-0:6.7.0 100% | 209.3 MiB/s | 1.9 MiB | 00m00s [19/45] Installing rubygem-power_assert 100% | 0.0 B/s | 32.4 KiB | 00m00s [20/45] Installing publicsuffix-list-0: 100% | 311.6 MiB/s | 319.1 KiB | 00m00s [21/45] Installing libpsl-devel-0:0.21. 100% | 110.9 MiB/s | 113.6 KiB | 00m00s [22/45] Installing brotli-0:1.1.0-5.fc4 100% | 0.0 B/s | 36.2 KiB | 00m00s [23/45] Installing brotli-devel-0:1.1.0 100% | 22.1 MiB/s | 68.0 KiB | 00m00s [24/45] Installing kernel-headers-0:6.1 100% | 199.3 MiB/s | 6.6 MiB | 00m00s [25/45] Installing libxcrypt-devel-0:4. 100% | 16.0 MiB/s | 32.9 KiB | 00m00s [26/45] Installing glibc-devel-0:2.40.9 100% | 128.6 MiB/s | 2.7 MiB | 00m00s [27/45] Installing openssl-devel-1:3.2. 100% | 68.2 MiB/s | 5.2 MiB | 00m00s [28/45] Installing libnghttp2-devel-0:1 100% | 289.5 MiB/s | 296.5 KiB | 00m00s [29/45] Installing libidn2-devel-0:2.3. 100% | 127.0 MiB/s | 260.1 KiB | 00m00s [30/45] Installing make-1:4.4.1-9.fc42. 100% | 266.1 MiB/s | 1.9 MiB | 00m00s [31/45] Installing libubsan-0:14.2.1-6. 100% | 238.3 MiB/s | 488.1 KiB | 00m00s [32/45] Installing libatomic-0:14.2.1-6 100% | 0.0 B/s | 29.0 KiB | 00m00s [33/45] Installing libasan-0:14.2.1-6.f 100% | 234.6 MiB/s | 1.6 MiB | 00m00s [34/45] Installing gcc-0:14.2.1-6.fc42. 100% | 334.1 MiB/s | 78.2 MiB | 00m00s [35/45] Installing psmisc-0:23.7-3.fc41 100% | 166.1 MiB/s | 850.7 KiB | 00m00s [36/45] Installing libmnl-0:1.0.5-6.fc4 100% | 0.0 B/s | 60.4 KiB | 00m00s [37/45] Installing libbpf-2:1.5.0-1.fc4 100% | 220.7 MiB/s | 451.9 KiB | 00m00s [38/45] Installing iproute-0:6.10.0-1.f 100% | 218.8 MiB/s | 2.2 MiB | 00m00s [39/45] Installing annobin-plugin-gcc-0 100% | 107.1 MiB/s | 987.0 KiB | 00m00s [40/45] Installing gcc-plugin-annobin-0 100% | 5.2 MiB/s | 58.6 KiB | 00m00s [41/45] Installing libcurl-devel-0:8.10 100% | 97.0 MiB/s | 1.4 MiB | 00m00s [42/45] Installing rubygem-test-unit-0: 100% | 179.1 MiB/s | 366.8 KiB | 00m00s [43/45] Installing rubygems-devel-0:3.6 100% | 0.0 B/s | 14.2 KiB | 00m00s [44/45] Installing rubygem-webrick-0:1. 100% | 99.9 MiB/s | 204.6 KiB | 00m00s [45/45] Installing ruby-devel-0:3.4.0~2 100% | 17.7 MiB/s | 1.6 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.318.23.src.rpm Start: rpmbuild rubygem-curb-1.0.5-6.fc42.318.23.src.rpm Building target platforms: s390x Building for target s390x setting SOURCE_DATE_EPOCH=1721779200 Executing(%mkbuilddir): /bin/sh -e /var/tmp/rpm-tmp.1WZTLU + 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.c6GVp6 + 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.6OuyKd + 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection ' + 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection ' + 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection'\'' --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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection'\'' --with-ldflags='\''-Wl,-z,relro -Wl,--as-needed -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.20241114-53-6snuh1", "sitelibdir=./.gem.20241114-53-6snuh1", "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.20241114-53-6snuh1", "sitelibdir=./.gem.20241114-53-6snuh1"] 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -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,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,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.20241114-53-6snuh1", "sitelibdir=./.gem.20241114-53-6snuh1", "install"] /usr/bin/mkdir -p . ./.gem.20241114-53-6snuh1 exit > .sitearchdir.time /usr/bin/install -c -m 0755 curb_core.so ./.gem.20241114-53-6snuh1 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.20241114-53-6snuh1", "sitelibdir=./.gem.20241114-53-6snuh1", "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.20241114-53-6snuh1 sitelibdir\=./.gem.20241114-53-6snuh1 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.20241114-53-6snuh1 sitelibdir\=./.gem.20241114-53-6snuh1 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.20241114-53-6snuh1 sitelibdir\=./.gem.20241114-53-6snuh1 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.20241114-53-6snuh1 sitelibdir\=./.gem.20241114-53-6snuh1 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.fPplGP + 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection ' + 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection ' + 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -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.318.23 --unique-debug-suffix -1.0.5-6.fc42.318.23.s390x --unique-debug-src-base rubygem-curb-1.0.5-6.fc42.318.23.s390x --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -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.318.23.s390x 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.mGPqfY + 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection ' + 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection ' + 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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -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=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -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 ~/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 + 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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14)\r\n" + "< Date: Thu, 14 Nov 2024 01:02:28 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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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=2'.\n" + "
\n" + "
\n" + " WEBrick/1.7.0 (Ruby/3.4.0/2024-11-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800: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-14) at\n" + " b6fb9afcc5f645d7a45a7fa1df056800: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-14) at + b6fb9afcc5f645d7a45a7fa1df056800:9129 +
+ + ? Encoding: UTF -8 ? ASCII BIT ? ??? +++ =============================================================================== Finished in 1.395465452 seconds. ------------------------------------------------------------------------------- 180 tests, 573 assertions, 39 failures, 9 errors, 0 pendings, 0 omissions, 0 notifications 73.3333% passed ------------------------------------------------------------------------------- 128.99 tests/s, 410.62 assertions/s error: RPM build errors: Bad exit status from /var/tmp/rpm-tmp.mGPqfY (%check) Bad exit status from /var/tmp/rpm-tmp.mGPqfY (%check) Finish: rpmbuild rubygem-curb-1.0.5-6.fc42.318.23.src.rpm Finish: build phase for rubygem-curb-1.0.5-6.fc42.318.23.src.rpm INFO: chroot_scan: 1 files copied to /var/lib/copr-rpmbuild/results/chroot_scan INFO: /var/lib/mock/fedora-rawhide-s390x-1731546042.504027/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.318.23.src.rpm) Config(fedora-rawhide-s390x) 1 minutes 11 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 b6fb9afcc5f645d7a45a7fa1df056800 -D /var/lib/mock/fedora-rawhide-s390x-1731546042.504027/root -a -u mockbuild --capability=cap_ipc_lock --rlimit=RLIMIT_NOFILE=10240 --capability=cap_ipc_lock --bind=/tmp/mock-resolv.47yhpp5x:/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 s390x --nodeps /builddir/build/originals/rubygem-curb.spec' Copr build error: Build failed