Bug 241280 - www/p5-WWW-Curl Fix compatibility with curl 7.66
Summary: www/p5-WWW-Curl Fix compatibility with curl 7.66
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-15 19:25 UTC by Olivier Cochard
Modified: 2019-10-20 17:22 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
patch to fix p5-WWW-Curl compatibility with curl 7.66 (1.91 KB, patch)
2019-10-15 19:25 UTC, Olivier Cochard
no flags Details | Diff
Fix Multi and CONNECT_TO support (2.74 KB, patch)
2019-10-17 23:12 UTC, Olivier Cochard
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Cochard freebsd_committer 2019-10-15 19:25:57 UTC
Created attachment 208348 [details]
patch to fix p5-WWW-Curl compatibility with curl 7.66

Since perl 7.66 CURL_MULTI_H was replaced by CURLINC_MULTI_H (https://github.com/curl/curl/blob/curl-7_66_0/include/curl/multi.h)
So use the patch from Debian (https://salsa.debian.org/perl-team/modules/packages/libwww-curl-perl/commit/3f511f6f825bb6b81c97777dfb357916b6a4d37e)
Comment 1 Olivier Cochard freebsd_committer 2019-10-17 21:19:21 UTC
Important note: Since curl 7.66, using WWW::Curl::Multi with option CURLOPT_CONNECT_TO, crash it too.

Sample of p5-WWW-Curl code that work only with version previous to curl 7.66:

------------------
#!/usr/local/bin/perl

use strict;
use warnings;

use WWW::Curl::Easy;
use WWW::Curl::Multi;

my $multi = WWW::Curl::Multi->new;
my $easy = WWW::Curl::Easy->new;

$easy->setopt(CURLOPT_PRIVATE, 0);
$easy->setopt(CURLOPT_URL, "http://127.0.0.1");
$easy->setopt(CURLOPT_CONNECT_TO, ["127.0.0.1:80"]);
$easy->setopt(CURLOPT_HTTPHEADER, ['Connection: close']);
$easy->setopt(CURLOPT_WRITEDATA,'');
$multi->add_handle($easy);

print "Next line should be an expected error: Bad filehandle\n";
print "If there is crash, it's a bug\n";
while ($multi->perform != 0) {
    print ".";
}
exit(0);
----------------------
Comment 2 Olivier Cochard freebsd_committer 2019-10-17 23:12:14 UTC
Created attachment 208394 [details]
Fix Multi and CONNECT_TO support

New version of the patch that fix Multi and CONNECT_TO usage.
Comment 3 commit-hook freebsd_committer 2019-10-20 17:22:27 UTC
A commit references this bug:

Author: sunpoet
Date: Sun Oct 20 17:21:53 UTC 2019
New revision: 515062
URL: https://svnweb.freebsd.org/changeset/ports/515062

Log:
  Fix compatibility with curl 7.66

  - Bump PORTREVISION for package change

  PR:		241280
  Submitted by:	olivier

Changes:
  head/www/p5-WWW-Curl/Makefile
  head/www/p5-WWW-Curl/files/patch-Curl.xs
  head/www/p5-WWW-Curl/files/patch-Makefile.PL
Comment 4 Po-Chuan Hsieh freebsd_committer 2019-10-20 17:22:44 UTC
Committed. Thanks!