Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-HTTP-Tiny for openSUSE:Factory checked in at 2026-01-08 15:28:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-HTTP-Tiny (Old) and /work/SRC/openSUSE:Factory/.perl-HTTP-Tiny.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-HTTP-Tiny" Thu Jan 8 15:28:32 2026 rev:21 rq:1325875 version:0.092 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-HTTP-Tiny/perl-HTTP-Tiny.changes 2025-01-12 11:20:36.338348539 +0100 +++ /work/SRC/openSUSE:Factory/.perl-HTTP-Tiny.new.1928/perl-HTTP-Tiny.changes 2026-01-08 15:29:20.937854741 +0100 @@ -1,0 +2,20 @@ +Fri Jan 2 15:28:43 UTC 2026 - Tina Müller <[email protected]> + +- updated to 0.092 + see /usr/share/doc/packages/perl-HTTP-Tiny/Changes + + 0.092 2025-12-27 20:49:41+01:00 Europe/Berlin + - No changes from 0.091-TRIAL + 0.091 2025-12-13 06:26:51+01:00 Europe/Brussels (TRIAL RELEASE) + [ADDED] + - Added keep_alive_timeout to force keepalive connections to be closed + based on a timeout. + [CHANGED] + - Optional tests are always required when releasing. + - Always use TCP_NODELAY option. + [FIXED] + - Fixed test incorrectly testing cookie jar interactions multiple times. + - Fixed perl version comparisons to work when not starting with 5. + - Fixed link to LIMITATIONS in documentation. + +------------------------------------------------------------------- Old: ---- HTTP-Tiny-0.090.tar.gz New: ---- HTTP-Tiny-0.092.tar.gz README.md _scmsync.obsinfo build.specials.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-HTTP-Tiny.spec ++++++ --- /var/tmp/diff_new_pack.EejRUZ/_old 2026-01-08 15:29:21.509879048 +0100 +++ /var/tmp/diff_new_pack.EejRUZ/_new 2026-01-08 15:29:21.513879218 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-HTTP-Tiny # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,22 +18,23 @@ %define cpan_name HTTP-Tiny Name: perl-HTTP-Tiny -Version: 0.090 +Version: 0.092 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Small, simple, correct HTTP/1.1 client URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml +Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(IPC::Cmd) BuildRequires: perl(Test::More) >= 0.96 -Recommends: perl(HTTP::CookieJar) >= 0.001 +Recommends: perl(HTTP::CookieJar) >= 0.1 Recommends: perl(IO::Socket::IP) >= 0.32 Recommends: perl(IO::Socket::SSL) >= 1.968 -Recommends: perl(Net::SSLeay) >= 1.49 +Recommends: perl(Net::SSLeay) >= 1.490 %{perl_requires} %description @@ -49,7 +50,7 @@ Cookie support requires HTTP::CookieJar or an equivalent class. %prep -%autosetup -n %{cpan_name}-%{version} +%autosetup -n %{cpan_name}-%{version} -p1 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 ++++++ HTTP-Tiny-0.090.tar.gz -> HTTP-Tiny-0.092.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/Changes new/HTTP-Tiny-0.092/Changes --- old/HTTP-Tiny-0.090/Changes 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/Changes 2025-12-27 20:49:46.000000000 +0100 @@ -1,5 +1,30 @@ Release notes for HTTP-Tiny +0.092 2025-12-27 20:49:41+01:00 Europe/Berlin + + - No changes from 0.091-TRIAL + +0.091 2025-12-13 06:26:51+01:00 Europe/Brussels (TRIAL RELEASE) + + [ADDED] + + - Added keep_alive_timeout to force keepalive connections to be closed + based on a timeout. + + [CHANGED] + + - Optional tests are always required when releasing. + + - Always use TCP_NODELAY option. + + [FIXED] + + - Fixed test incorrectly testing cookie jar interactions multiple times. + + - Fixed perl version comparisons to work when not starting with 5. + + - Fixed link to LIMITATIONS in documentation. + 0.090 2024-11-12 11:51:32+01:00 Europe/Brussels - No changes from 0.089-TRIAL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/LICENSE new/HTTP-Tiny-0.092/LICENSE --- old/HTTP-Tiny-0.090/LICENSE 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/LICENSE 2025-12-27 20:49:46.000000000 +0100 @@ -1,4 +1,4 @@ -This software is copyright (c) 2024 by Christian Hansen. +This software is copyright (c) 2025 by Christian Hansen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. @@ -12,7 +12,7 @@ --- The GNU General Public License, Version 1, February 1989 --- -This software is Copyright (c) 2024 by Christian Hansen. +This software is Copyright (c) 2025 by Christian Hansen. This is free software, licensed under: @@ -22,7 +22,7 @@ Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -236,8 +236,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA + along with this program; if not, see <https://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. @@ -264,15 +263,15 @@ program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice + <signature of Moe Ghoul>, 1 April 1989 + Moe Ghoul, President of Vice That's all there is to it! --- The Perl Artistic License 1.0 --- -This software is Copyright (c) 2024 by Christian Hansen. +This software is Copyright (c) 2025 by Christian Hansen. This is free software, licensed under: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/MANIFEST new/HTTP-Tiny-0.092/MANIFEST --- old/HTTP-Tiny-0.090/MANIFEST 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/MANIFEST 2025-12-27 20:49:46.000000000 +0100 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.032. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.036. CONTRIBUTING.mkdn Changes LICENSE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/META.json new/HTTP-Tiny-0.092/META.json --- old/HTTP-Tiny-0.090/META.json 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/META.json 2025-12-27 20:49:46.000000000 +0100 @@ -5,7 +5,7 @@ "David Golden <[email protected]>" ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.036, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -58,8 +58,7 @@ "Test::Pod::Coverage" : "1.08", "Test::Portability::Files" : "0", "Test::Spelling" : "0.17", - "Test::Version" : "1", - "perl" : "5.006" + "Test::Version" : "1" } }, "runtime" : { @@ -75,6 +74,7 @@ "IO::Socket" : "0", "MIME::Base64" : "0", "Socket" : "0", + "Time::HiRes" : "0", "Time::Local" : "0", "bytes" : "0", "perl" : "5.006", @@ -107,7 +107,7 @@ "provides" : { "HTTP::Tiny" : { "file" : "lib/HTTP/Tiny.pm", - "version" : "0.090" + "version" : "0.092" } }, "release_status" : "stable", @@ -122,7 +122,7 @@ "web" : "https://github.com/Perl-Toolchain-Gang/HTTP-Tiny" } }, - "version" : "0.090", + "version" : "0.092", "x_authority" : "cpan:DAGOLDEN", "x_contributors" : [ "Alan Gardner <[email protected]>", @@ -135,6 +135,7 @@ "Claes Jakobsson <[email protected]>", "Clinton Gormley <[email protected]>", "Craig A. Berry <[email protected]>", + "Dan <[email protected]>", "David Golden <[email protected]>", "David Mitchell <[email protected]>", "Dean Pearce <[email protected]>", @@ -152,11 +153,14 @@ "Martin-Louis Bright <[email protected]>", "Matthew Horsfall <[email protected]>", "Michael R. Davis <[email protected]>", + "Michael Stevens <[email protected]>", "Mike Doherty <[email protected]>", "Nicolas Rochelemagne <[email protected]>", "Olaf Alders <[email protected]>", "Olivier Mengu\u00e9 <[email protected]>", "Petr P\u00edsa\u0159 <[email protected]>", + "Philippe Bruhat (BooK) <[email protected]>", + "Rob Mueller <[email protected]>", "sanjay-cpu <[email protected]>", "Serguei Trouchelle <[email protected]>", "Shoichi Kaji <[email protected]>", @@ -170,8 +174,8 @@ "Tony Cook <[email protected]>", "Xavier Guimard <[email protected]>" ], - "x_generated_by_perl" : "v5.38.2", - "x_serialization_backend" : "Cpanel::JSON::XS version 4.38", + "x_generated_by_perl" : "v5.40.0", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.40", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/META.yml new/HTTP-Tiny-0.092/META.yml --- old/HTTP-Tiny-0.090/META.yml 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/META.yml 2025-12-27 20:49:46.000000000 +0100 @@ -22,7 +22,7 @@ ExtUtils::MakeMaker: '6.17' perl: '5.006' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Zilla version 6.036, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -39,7 +39,7 @@ provides: HTTP::Tiny: file: lib/HTTP/Tiny.pm - version: '0.090' + version: '0.092' recommends: HTTP::CookieJar: '0.001' IO::Socket::IP: '0.32' @@ -51,6 +51,7 @@ IO::Socket: '0' MIME::Base64: '0' Socket: '0' + Time::HiRes: '0' Time::Local: '0' bytes: '0' perl: '5.006' @@ -60,7 +61,7 @@ bugtracker: https://github.com/Perl-Toolchain-Gang/HTTP-Tiny/issues homepage: https://github.com/Perl-Toolchain-Gang/HTTP-Tiny repository: https://github.com/Perl-Toolchain-Gang/HTTP-Tiny.git -version: '0.090' +version: '0.092' x_authority: cpan:DAGOLDEN x_contributors: - 'Alan Gardner <[email protected]>' @@ -73,6 +74,7 @@ - 'Claes Jakobsson <[email protected]>' - 'Clinton Gormley <[email protected]>' - 'Craig A. Berry <[email protected]>' + - 'Dan <[email protected]>' - 'David Golden <[email protected]>' - 'David Mitchell <[email protected]>' - 'Dean Pearce <[email protected]>' @@ -90,11 +92,14 @@ - 'Martin-Louis Bright <[email protected]>' - 'Matthew Horsfall <[email protected]>' - 'Michael R. Davis <[email protected]>' + - 'Michael Stevens <[email protected]>' - 'Mike Doherty <[email protected]>' - 'Nicolas Rochelemagne <[email protected]>' - 'Olaf Alders <[email protected]>' - 'Olivier Mengué <[email protected]>' - 'Petr Písař <[email protected]>' + - 'Philippe Bruhat (BooK) <[email protected]>' + - 'Rob Mueller <[email protected]>' - 'sanjay-cpu <[email protected]>' - 'Serguei Trouchelle <[email protected]>' - 'Shoichi Kaji <[email protected]>' @@ -107,6 +112,6 @@ - 'Tom Hukins <[email protected]>' - 'Tony Cook <[email protected]>' - 'Xavier Guimard <[email protected]>' -x_generated_by_perl: v5.38.2 -x_serialization_backend: 'YAML::Tiny version 1.74' +x_generated_by_perl: v5.40.0 +x_serialization_backend: 'YAML::Tiny version 1.76' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/Makefile.PL new/HTTP-Tiny-0.092/Makefile.PL --- old/HTTP-Tiny-0.090/Makefile.PL 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/Makefile.PL 2025-12-27 20:49:46.000000000 +0100 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.032. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.036. use strict; use warnings; @@ -22,6 +22,7 @@ "IO::Socket" => 0, "MIME::Base64" => 0, "Socket" => 0, + "Time::HiRes" => 0, "Time::Local" => 0, "bytes" => 0, "strict" => 0, @@ -42,7 +43,7 @@ "lib" => 0, "open" => 0 }, - "VERSION" => "0.090", + "VERSION" => "0.092", "test" => { "TESTS" => "t/*.t" } @@ -66,6 +67,7 @@ "MIME::Base64" => 0, "Socket" => 0, "Test::More" => "0.96", + "Time::HiRes" => 0, "Time::Local" => 0, "bytes" => 0, "lib" => 0, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/README new/HTTP-Tiny-0.092/README --- old/HTTP-Tiny-0.090/README 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/README 2025-12-27 20:49:46.000000000 +0100 @@ -2,7 +2,7 @@ HTTP::Tiny - A small, simple, correct HTTP/1.1 client VERSION - version 0.090 + version 0.092 SYNOPSIS use HTTP::Tiny; @@ -56,6 +56,9 @@ * "keep_alive" â Whether to reuse the last connection (if for the same scheme, host and port) (defaults to 1) + * "keep_alive_timeout" â How many seconds to keep a connection + available for after a request (defaults to 0, unlimited) + * "max_redirect" â Maximum number of redirects allowed (defaults to 5) * "max_size" â Maximum response size in bytes (only when not using a @@ -107,6 +110,12 @@ persistent connections across multiple destinations, use multiple HTTP::Tiny objects. + The "keep_alive_timeout" parameter allows you to control how long a keep + alive connection will be considered for reuse. By setting this lower + than the server keep alive time, this allows you to avoid race + conditions where the server closes the connection while preparing to + write the request on a reused persistent connection. + See "TLS/SSL SUPPORT" for more on the "verify_SSL" and "SSL_options" attributes. @@ -172,8 +181,8 @@ characters escaped and international domain names encoded. NOTE: Method names are case-sensitive per the HTTP/1.1 specification. - Don't use "get" when you really want "GET". See LIMITATIONS for how this - applies to redirection. + Don't use "get" when you really want "GET". See "LIMITATIONS" for how + this applies to redirection. If the URL includes a "user:password" stanza, they will be used for Basic-style authorization headers. (Authorization headers will not be @@ -533,6 +542,8 @@ * Craig A. Berry <[email protected]> + * Dan <[email protected]> + * David Golden <[email protected]> * David Mitchell <[email protected]> @@ -567,6 +578,8 @@ * Michael R. Davis <[email protected]> + * Michael Stevens <[email protected]> + * Mike Doherty <[email protected]> * Nicolas Rochelemagne <[email protected]> @@ -577,6 +590,10 @@ * Petr PÃsaÅ <[email protected]> + * Philippe Bruhat (BooK) <[email protected]> + + * Rob Mueller <[email protected]> + * sanjay-cpu <[email protected]> * Serguei Trouchelle <[email protected]> @@ -602,7 +619,7 @@ * Xavier Guimard <[email protected]> COPYRIGHT AND LICENSE - This software is copyright (c) 2024 by Christian Hansen. + This software is copyright (c) 2025 by Christian Hansen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/cpanfile new/HTTP-Tiny-0.092/cpanfile --- old/HTTP-Tiny-0.090/cpanfile 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/cpanfile 2025-12-27 20:49:46.000000000 +0100 @@ -1,4 +1,4 @@ -# This file is generated by Dist::Zilla::Plugin::CPANFile v6.032 +# This file is generated by Dist::Zilla::Plugin::CPANFile v6.036 # Do not edit this file directly. To change prereqs, edit the `dist.ini` file. requires "Carp" => "0"; @@ -6,6 +6,7 @@ requires "IO::Socket" => "0"; requires "MIME::Base64" => "0"; requires "Socket" => "0"; +requires "Time::HiRes" => "0"; requires "Time::Local" => "0"; requires "bytes" => "0"; requires "perl" => "5.006"; @@ -69,5 +70,4 @@ requires "Test::Portability::Files" => "0"; requires "Test::Spelling" => "0.17"; requires "Test::Version" => "1"; - requires "perl" => "5.006"; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/dist.ini new/HTTP-Tiny-0.092/dist.ini --- old/HTTP-Tiny-0.090/dist.ini 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/dist.ini 2025-12-27 20:49:46.000000000 +0100 @@ -37,6 +37,4 @@ IO::Socket::SSL = 1.968 Net::SSLeay = 1.49 -[Prereqs / DevelopRequires] -; Non core Perl::Critic policy used in perlcritic.rc -Perl::Critic::Policy::Lax::ProhibitStringyEval::ExceptForRequire = 0 +; authordep Perl::Critic::Policy::Lax::ProhibitStringyEval::ExceptForRequire diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/lib/HTTP/Tiny.pm new/HTTP-Tiny-0.092/lib/HTTP/Tiny.pm --- old/HTTP-Tiny-0.090/lib/HTTP/Tiny.pm 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/lib/HTTP/Tiny.pm 2025-12-27 20:49:46.000000000 +0100 @@ -4,7 +4,7 @@ use warnings; # ABSTRACT: A small, simple, correct HTTP/1.1 client -our $VERSION = '0.090'; +our $VERSION = '0.092'; sub _croak { require Carp; Carp::croak(@_) } @@ -24,6 +24,8 @@ #pod * C<local_address> — The local IP address to bind to #pod * C<keep_alive> — Whether to reuse the last connection (if for the same #pod scheme, host and port) (defaults to 1) +#pod * C<keep_alive_timeout> — How many seconds to keep a connection available +#pod for after a request (defaults to 0, unlimited) #pod * C<max_redirect> — Maximum number of redirects allowed (defaults to 5) #pod * C<max_size> — Maximum response size in bytes (only when not using a data #pod callback). If defined, requests with responses larger than this will return @@ -65,6 +67,12 @@ #pod the persistent connection will be dropped. If you want persistent connections #pod across multiple destinations, use multiple HTTP::Tiny objects. #pod +#pod The C<keep_alive_timeout> parameter allows you to control how long a +#pod keep alive connection will be considered for reuse. By setting this lower +#pod than the server keep alive time, this allows you to avoid race conditions where +#pod the server closes the connection while preparing to write the request on +#pod a reused persistent connection. +#pod #pod See L</TLS/SSL SUPPORT> for more on the C<verify_SSL> and C<SSL_options> #pod attributes. #pod @@ -127,6 +135,7 @@ max_redirect => 5, timeout => defined $args{timeout} ? $args{timeout} : 60, keep_alive => 1, + keep_alive_timeout => 0, verify_SSL => defined $args{verify_SSL} ? $args{verify_SSL} : _verify_SSL_default(), no_proxy => $ENV{no_proxy}, }; @@ -351,7 +360,7 @@ #pod international domain names encoded. #pod #pod B<NOTE>: Method names are B<case-sensitive> per the HTTP/1.1 specification. -#pod Don't use C<get> when you really want C<GET>. See L<LIMITATIONS> for +#pod Don't use C<get> when you really want C<GET>. See L</LIMITATIONS> for #pod how this applies to redirection. #pod #pod If the URL includes a "user:password" stanza, they will be used for Basic-style @@ -694,6 +703,7 @@ && $response->{protocol} eq 'HTTP/1.1' && ($response->{headers}{connection} || '') ne 'close' ) { + $handle->_update_last_used(); $self->{handle} = $handle; } else { @@ -723,9 +733,12 @@ SSL_options => $self->{SSL_options}, verify_SSL => $self->{verify_SSL}, local_address => $self->{local_address}, - keep_alive => $self->{keep_alive} + keep_alive => $self->{keep_alive}, + keep_alive_timeout => $self->{keep_alive_timeout} ); + require Time::HiRes if $self->{keep_alive_timeout} > 0; + if ($self->{_has_proxy}{$scheme} && ! grep { $host =~ /\Q$_\E$/ } @{$self->{no_proxy}}) { return $self->_proxy_connect( $request, $handle ); } @@ -865,7 +878,7 @@ } elsif ( length $args->{content} ) { my $content = $args->{content}; - if ( $] ge '5.008' ) { + if ( "$]" >= 5.008 ) { utf8::downgrade($content, 1) or die(qq/Wide character in request message body\n/); } @@ -1032,7 +1045,7 @@ sub _uri_escape { my ($self, $str) = @_; return "" if !defined $str; - if ( $] ge '5.008' ) { + if ( "$]" >= 5.008 ) { utf8::encode($str); } else { @@ -1051,7 +1064,7 @@ use Errno qw[EINTR EPIPE]; use IO::Socket qw[SOCK_STREAM]; -use Socket qw[SOL_SOCKET SO_KEEPALIVE]; +use Socket qw[SOL_SOCKET SO_KEEPALIVE TCP_NODELAY IPPROTO_TCP]; # PERL_HTTP_TINY_IPV4_ONLY is a private environment variable to force old # behavior if someone is unable to boostrap CPAN from a new perl install; it is @@ -1117,6 +1130,8 @@ Timeout => $self->{timeout}, ) or die(qq/Could not connect to '$host:$port': $@\n/); + $self->{fh}->setsockopt(IPPROTO_TCP, TCP_NODELAY, 1); + binmode($self->{fh}) or die(qq/Could not binmode() socket: '$!'\n/); @@ -1189,7 +1204,7 @@ @_ == 2 || die(q/Usage: $handle->write(buf)/ . "\n"); my ($self, $buf) = @_; - if ( $] ge '5.008' ) { + if ( "$]" >= 5.008 ) { utf8::downgrade($buf, 1) or die(qq/Wide character in write()\n/); } @@ -1474,7 +1489,7 @@ defined $data && length $data or last; - if ( $] ge '5.008' ) { + if ( "$]" >= 5.008 ) { utf8::downgrade($data, 1) or die(qq/Wide character in write_content()\n/); } @@ -1521,7 +1536,7 @@ defined $data && length $data or last; - if ( $] ge '5.008' ) { + if ( "$]" >= 5.008 ) { utf8::downgrade($data, 1) or die(qq/Wide character in write_chunked_body()\n/); } @@ -1621,6 +1636,19 @@ return $self->_do_timeout('write', @_) } +sub _has_keep_alive_expired { + my $self = shift; + return unless $self->{keep_alive_timeout} > 0; + my $now = Time::HiRes::time(); + return $now - ($self->{last_used} || $now) > $self->{keep_alive_timeout}; +} + +sub _update_last_used { + my $self = shift; + return unless $self->{keep_alive_timeout} > 0; + $self->{last_used} = Time::HiRes::time(); +} + sub _assert_ssl { my($ok, $reason) = HTTP::Tiny->can_ssl(); die $reason unless $ok; @@ -1636,6 +1664,7 @@ || $host ne $self->{host} || $port ne $self->{port} || $peer ne $self->{peer} + || $self->_has_keep_alive_expired() || eval { $self->can_read(0) } || $@ ; return 1; @@ -1739,7 +1768,7 @@ =head1 VERSION -version 0.090 +version 0.092 =head1 SYNOPSIS @@ -1804,6 +1833,10 @@ =item * +C<keep_alive_timeout> — How many seconds to keep a connection available for after a request (defaults to 0, unlimited) + +=item * + C<max_redirect> — Maximum number of redirects allowed (defaults to 5) =item * @@ -1859,6 +1892,12 @@ the persistent connection will be dropped. If you want persistent connections across multiple destinations, use multiple HTTP::Tiny objects. +The C<keep_alive_timeout> parameter allows you to control how long a +keep alive connection will be considered for reuse. By setting this lower +than the server keep alive time, this allows you to avoid race conditions where +the server closes the connection while preparing to write the request on +a reused persistent connection. + See L</TLS/SSL SUPPORT> for more on the C<verify_SSL> and C<SSL_options> attributes. @@ -1923,7 +1962,7 @@ international domain names encoded. B<NOTE>: Method names are B<case-sensitive> per the HTTP/1.1 specification. -Don't use C<get> when you really want C<GET>. See L<LIMITATIONS> for +Don't use C<get> when you really want C<GET>. See L</LIMITATIONS> for how this applies to redirection. If the URL includes a "user:password" stanza, they will be used for Basic-style @@ -2389,7 +2428,7 @@ =head1 CONTRIBUTORS -=for stopwords Alan Gardner Alessandro Ghedini A. Sinan Unur Brad Gilbert brian m. carlson Chris Nehren Weyl Claes Jakobsson Clinton Gormley Craig Berry David Golden Mitchell Dean Pearce Edward Zborowski Felipe Gasper Graham Knop Greg Kennedy James E Keenan Raspass Jeremy Mates Jess Robinson Karen Etheridge Lukas Eklund Martin J. Evans Martin-Louis Bright Matthew Horsfall Michael R. Davis Mike Doherty Nicolas Rochelemagne Olaf Alders Olivier Mengué Petr Písař sanjay-cpu Serguei Trouchelle Shoichi Kaji SkyMarshal Sören Kornetzki Steve Grazzini Stig Palmquist Syohei YOSHIDA Tatsuhiko Miyagawa Tom Hukins Tony Cook Xavier Guimard +=for stopwords Alan Gardner Alessandro Ghedini A. Sinan Unur Brad Gilbert brian m. carlson Chris Nehren Weyl Claes Jakobsson Clinton Gormley Craig Berry Dan David Golden Mitchell Dean Pearce Edward Zborowski Felipe Gasper Graham Knop Greg Kennedy James E Keenan Raspass Jeremy Mates Jess Robinson Karen Etheridge Lukas Eklund Martin J. Evans Martin-Louis Bright Matthew Horsfall Michael R. Davis Stevens Mike Doherty Nicolas Rochelemagne Olaf Alders Olivier Mengué Petr Písař Philippe Bruhat (BooK) Rob Mueller sanjay-cpu Serguei Trouchelle Shoichi Kaji SkyMarshal Sören Kornetzki Steve Grazzini Stig Palmquist Syohei YOSHIDA Tatsuhiko Miyagawa Tom Hukins Tony Cook Xavier Guimard =over 4 @@ -2435,6 +2474,10 @@ =item * +Dan <[email protected]> + +=item * + David Golden <[email protected]> =item * @@ -2503,6 +2546,10 @@ =item * +Michael Stevens <[email protected]> + +=item * + Mike Doherty <[email protected]> =item * @@ -2523,6 +2570,14 @@ =item * +Philippe Bruhat (BooK) <[email protected]> + +=item * + +Rob Mueller <[email protected]> + +=item * + sanjay-cpu <[email protected]> =item * @@ -2573,7 +2628,7 @@ =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2024 by Christian Hansen. +This software is copyright (c) 2025 by Christian Hansen. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/t/00-report-prereqs.dd new/HTTP-Tiny-0.092/t/00-report-prereqs.dd --- old/HTTP-Tiny-0.090/t/00-report-prereqs.dd 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/t/00-report-prereqs.dd 2025-12-27 20:49:46.000000000 +0100 @@ -31,8 +31,7 @@ 'Test::Pod::Coverage' => '1.08', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.17', - 'Test::Version' => '1', - 'perl' => '5.006' + 'Test::Version' => '1' } }, 'runtime' => { @@ -48,6 +47,7 @@ 'IO::Socket' => '0', 'MIME::Base64' => '0', 'Socket' => '0', + 'Time::HiRes' => '0', 'Time::Local' => '0', 'bytes' => '0', 'perl' => '5.006', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/t/160_cookies.t new/HTTP-Tiny-0.092/t/160_cookies.t --- old/HTTP-Tiny-0.090/t/160_cookies.t 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/t/160_cookies.t 2025-12-27 20:49:46.000000000 +0100 @@ -12,22 +12,39 @@ use HTTP::Tiny; BEGIN { monkey_patch() } +use SimpleCookieJar; -SKIP: for my $class ( qw/SimpleCookieJar HTTP::CookieJar/ ) { +# XXX: this test is broken. SimpleCookieJar doesn't implement enough to behave +# correctly with the responses in the corpus data. And the requests in the +# corpus match that incorrect implementation, so if used against a real cookie +# jar, it will break. It still tests interactions with the jar object, so it +# is still a valuable test even in its partly broken state. + +for my $class ( + 'SimpleCookieJar', + #'HTTP::CookieJar', # this test doesn't actually work with a real cookie jar + #'HTTP::Cookies', # would be nice to support eventually +) { + (my $module = $class . ".pm") =~ s{::}{/}g; subtest $class => sub { - eval "require $class; 1" - or plan skip_all => "Needs $class"; + eval { require $module; 1 } or do { + die $@ + if $ENV{RELEASE_TESTING}; + plan skip_all => "Needs $class"; + }; for my $file ( dir_list("corpus", qr/^cookies/ ) ) { my $label = basename($file); my $data = do { local (@ARGV,$/) = $file; <> }; my @cases = split /--+\n/, $data; - my $jar = SimpleCookieJar->new(); + my $jar = $class->new(); my $http = undef; + my $case_n = 0; while (@cases) { my ($params, $expect_req, $give_res) = splice( @cases, 0, 3 ); + $case_n++; my $case = parse_case($params); @@ -37,13 +54,13 @@ my %new_args = hashify( $case->{new_args} ); if( exists $headers{Cookie} ) { - my $cookies = delete $headers{Cookie}; - $jar->add( $url, $cookies ); + my $cookies = delete $headers{Cookie}; + $jar->add( $url, $cookies ); } if( exists $headers{'No-Cookie-Jar'} ) { - delete $headers{'No-Cookie-Jar'}; - $jar = undef; + delete $headers{'No-Cookie-Jar'}; + $jar = undef; } my %options; @@ -70,7 +87,7 @@ my $response = $http->get(@call_args); my $got_req = slurp($req_fh); - is( sort_headers($got_req), sort_headers($expect_req), "$label request data"); + is( sort_headers($got_req), sort_headers($expect_req), "$label case $case_n request data"); } } }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/t/170_keepalive.t new/HTTP-Tiny-0.092/t/170_keepalive.t --- old/HTTP-Tiny-0.090/t/170_keepalive.t 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/t/170_keepalive.t 2025-12-27 20:49:46.000000000 +0100 @@ -57,6 +57,17 @@ test_ht( "Default headers change", 1, 'http://foo.com' ); new_ht(); +$h->{handle}->{last_used} = time - 3600; +test_ht( "Unlimited keep_alive_timeout", 1, 'http://foo.com' ); + +new_ht(keep_alive_timeout => 2); +test_ht( "Less than than keep_alive_timeout", 1, 'http://foo.com' ); + +new_ht(keep_alive_timeout => 2); +$h->{handle}->{last_used} = time - 3; +test_ht( "Longer than than keep_alive_timeout", 0, 'http://foo.com' ); + +new_ht(); $h->{handle}->close; test_ht( "Socket closed", 0, 'http://foo.com' ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/t/190_find_CA.t new/HTTP-Tiny-0.092/t/190_find_CA.t --- old/HTTP-Tiny-0.090/t/190_find_CA.t 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/t/190_find_CA.t 2025-12-27 20:49:46.000000000 +0100 @@ -8,7 +8,7 @@ use HTTP::Tiny; plan 'skip_all' => "Only run if HTTP::Tiny->can_ssl()" - unless HTTP::Tiny->can_ssl(); # also requires IO::Socket:SSL + unless $ENV{RELEASE_TESTING} || HTTP::Tiny->can_ssl(); # also requires IO::Socket:SSL delete $ENV{SSL_CERT_FILE}; @@ -20,6 +20,11 @@ my $handle = HTTP::Tiny::Handle->new(); +# RELEASE_TESTING may skip this call, so ensure it is done again. _find_CA +# relies on IO::Socket::SSL being loaded, which would always be done if we +# weren't bypassing the public API. +HTTP::Tiny->can_ssl; + my %ret = $handle->_find_CA(); is($ret{SSL_ca_file}, "corpus/snake-oil.crt", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/t/200_live.t new/HTTP-Tiny-0.092/t/200_live.t --- old/HTTP-Tiny-0.090/t/200_live.t 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/t/200_live.t 2025-12-27 20:49:46.000000000 +0100 @@ -11,11 +11,11 @@ my $test_url = "http://www.google.com/"; my $test_re = qr/google/; -plan 'skip_all' => "Only run for \$ENV{AUTOMATED_TESTING}" - unless $ENV{AUTOMATED_TESTING}; +plan 'skip_all' => "Only run for \$ENV{AUTOMATED_TESTING} or \$ENV{RELEASE_TESTING}" + unless $ENV{AUTOMATED_TESTING} || $ENV{RELEASE_TESTING}; plan 'skip_all' => "Internet connection timed out" - unless IO::Socket::INET->new( + unless $ENV{RELEASE_TESTING} || IO::Socket::INET->new( PeerHost => $test_host, PeerPort => 80, Proto => 'tcp', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/t/200_live_local_ip.t new/HTTP-Tiny-0.092/t/200_live_local_ip.t --- old/HTTP-Tiny-0.090/t/200_live_local_ip.t 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/t/200_live_local_ip.t 2025-12-27 20:49:46.000000000 +0100 @@ -10,11 +10,11 @@ my $test_host = "www.google.com"; my $test_url = "http://www.google.com/"; -plan 'skip_all' => "Only run for \$ENV{AUTOMATED_TESTING}" - unless $ENV{AUTOMATED_TESTING}; +plan 'skip_all' => "Only run for \$ENV{AUTOMATED_TESTING} or \$ENV{RELEASE_TESTING}" + unless $ENV{AUTOMATED_TESTING} || $ENV{RELEASE_TESTING}; plan 'skip_all' => "Internet connection timed out" - unless IO::Socket::INET->new( + unless $ENV{RELEASE_TESTING} || IO::Socket::INET->new( PeerHost => $test_host, PeerPort => 80, Proto => 'tcp', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/t/210_live_ssl.t new/HTTP-Tiny-0.092/t/210_live_ssl.t --- old/HTTP-Tiny-0.090/t/210_live_ssl.t 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/t/210_live_ssl.t 2025-12-27 20:49:46.000000000 +0100 @@ -8,11 +8,11 @@ use HTTP::Tiny; -plan skip_all => 'Only run for $ENV{AUTOMATED_TESTING}' - unless $ENV{AUTOMATED_TESTING}; +plan 'skip_all' => "Only run for \$ENV{AUTOMATED_TESTING} or \$ENV{RELEASE_TESTING}" + unless $ENV{AUTOMATED_TESTING} || $ENV{RELEASE_TESTING}; plan skip_all => "Only run if HTTP::Tiny->can_ssl()" - unless HTTP::Tiny->can_ssl(); + unless $ENV{RELEASE_TESTING} || HTTP::Tiny->can_ssl(); delete $ENV{PERL_HTTP_TINY_SSL_INSECURE_BY_DEFAULT}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/xt/author/00-compile.t new/HTTP-Tiny-0.092/xt/author/00-compile.t --- old/HTTP-Tiny-0.090/xt/author/00-compile.t 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/xt/author/00-compile.t 2025-12-27 20:49:46.000000000 +0100 @@ -1,8 +1,7 @@ -use 5.006; use strict; use warnings; -# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 +# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.059 use Test::More; @@ -35,7 +34,7 @@ # see L<perlfaq8/How can I capture STDERR from an external command?> my $stderr = IO::Handle->new; - diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } + diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'}.$str.q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; @@ -57,7 +56,6 @@ -is(scalar(@warnings), 0, 'no warnings found') - or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ); +is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/HTTP-Tiny-0.090/xt/author/pod-spell.t new/HTTP-Tiny-0.092/xt/author/pod-spell.t --- old/HTTP-Tiny-0.090/xt/author/pod-spell.t 2024-11-12 11:51:37.000000000 +0100 +++ new/HTTP-Tiny-0.092/xt/author/pod-spell.t 2025-12-27 20:49:46.000000000 +0100 @@ -15,8 +15,10 @@ Alders Alessandro Berry +BooK Brad Bright +Bruhat CA CGI Chris @@ -25,6 +27,7 @@ Clinton Cook Craig +Dan David Davis Dean @@ -67,6 +70,7 @@ Mike Mitchell Miyagawa +Mueller Nehren Nicolas Olaf @@ -74,6 +78,7 @@ Palmquist Pearce Petr +Philippe Písař RFC7230 RFC7231 @@ -82,6 +87,7 @@ RFC7234 RFC7235 Raspass +Rob Robinson Rochelemagne Serguei @@ -89,6 +95,7 @@ Sinan SkyMarshal Steve +Stevens Stig Syohei Sören @@ -108,6 +115,7 @@ al3xbio apeiron bgills +book brian carlson castaway @@ -125,6 +133,7 @@ felipe gardner git +grinnz haarg jkeenan jmates @@ -132,6 +141,7 @@ kennedy leklund lib +michael miyagawa mjegh mlbright @@ -141,6 +151,7 @@ pearce ppisar proxying +robm rochelemagne sandals sanjay ++++++ README.md ++++++ ## Build Results Current state of perl in openSUSE:Factory is  The current state of perl in the devel project build (devel:languages:perl)  ++++++ _scmsync.obsinfo ++++++ mtime: 1767367723 commit: 239974c36aa4057bd9e3658003814a049d9a4a23e427994d4ea2baac2871425a url: https://src.opensuse.org/perl/perl-HTTP-Tiny.git revision: 239974c36aa4057bd9e3658003814a049d9a4a23e427994d4ea2baac2871425a projectscmsync: https://src.opensuse.org/perl/_ObsPrj ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-01-02 20:59:15.000000000 +0100 @@ -0,0 +1 @@ +.osc
