Hello community, here is the log from the commit of package perl-Plack for openSUSE:Factory checked in at 2020-12-02 13:58:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Plack (Old) and /work/SRC/openSUSE:Factory/.perl-Plack.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Plack" Wed Dec 2 13:58:04 2020 rev:11 rq:852311 version:1.0048 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Plack/perl-Plack.changes 2019-09-26 20:37:06.799203107 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Plack.new.5913/perl-Plack.changes 2020-12-02 13:58:06.373793859 +0100 @@ -1,0 +2,17 @@ +Mon Nov 30 03:07:54 UTC 2020 - Tina Müller <[email protected]> + +- updated to 1.0048 + see /usr/share/doc/packages/perl-Plack/Changes + + 1.0048 2020-11-29 16:20:00 PST + [IMPROVEMENTS] + - Updated documentation for cotent_length and content_type #625 + - Allow hyphens in file extensions for custom MIME types #614 + - Updated some python test script to work with Python 3 #639 + [BUG FIXES] + - Fix HTTP::Message::PSGI to work with delayed writer without content #653 + - Plackup reloader allows restarting the server when the path contains .git or .svn, just not at the beginning of the path #632 + - Added MIME types for .webp, .ttf and .xlsx files (rrwo) + - Fix Plack::Request content to not error when Content-Type is empty #655 + +------------------------------------------------------------------- Old: ---- Plack-1.0047.tar.gz New: ---- Plack-1.0048.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Plack.spec ++++++ --- /var/tmp/diff_new_pack.YimHZ1/_old 2020-12-02 13:58:07.173794701 +0100 +++ /var/tmp/diff_new_pack.YimHZ1/_new 2020-12-02 13:58:07.177794705 +0100 @@ -1,7 +1,7 @@ # # spec file for package perl-Plack # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,13 +17,13 @@ Name: perl-Plack -Version: 1.0047 +Version: 1.0048 Release: 0 %define cpan_name Plack Summary: Perl Superglue for Web frameworks and Web Servers (PSGI toolkit) License: Artistic-1.0 OR GPL-1.0-or-later Group: Development/Libraries/Perl -Url: https://metacpan.org/release/%{cpan_name} +URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildArch: noarch @@ -37,7 +37,7 @@ BuildRequires: perl(File::ShareDir) >= 1.00 BuildRequires: perl(File::ShareDir::Install) >= 0.06 BuildRequires: perl(Filesys::Notify::Simple) -BuildRequires: perl(HTTP::Entity::Parser) >= 0.17 +BuildRequires: perl(HTTP::Entity::Parser) >= 0.25 BuildRequires: perl(HTTP::Headers::Fast) >= 0.18 BuildRequires: perl(HTTP::Message) >= 5.814 BuildRequires: perl(HTTP::Tiny) >= 0.034 @@ -57,7 +57,7 @@ Requires: perl(Devel::StackTrace::AsHTML) >= 0.11 Requires: perl(File::ShareDir) >= 1.00 Requires: perl(Filesys::Notify::Simple) -Requires: perl(HTTP::Entity::Parser) >= 0.17 +Requires: perl(HTTP::Entity::Parser) >= 0.25 Requires: perl(HTTP::Headers::Fast) >= 0.18 Requires: perl(HTTP::Message) >= 5.814 Requires: perl(HTTP::Tiny) >= 0.034 @@ -81,7 +81,7 @@ %prep %setup -q -n %{cpan_name}-%{version} -find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 +find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Makefile.PL INSTALLDIRS=vendor ++++++ Plack-1.0047.tar.gz -> Plack-1.0048.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/Changes new/Plack-1.0048/Changes --- old/Plack-1.0047/Changes 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/Changes 2020-11-30 01:20:06.000000000 +0100 @@ -1,5 +1,16 @@ Go to http://github.com/plack/Plack/issues for the roadmap and known issues. +1.0048 2020-11-29 16:20:00 PST + [IMPROVEMENTS] + - Updated documentation for cotent_length and content_type #625 + - Allow hyphens in file extensions for custom MIME types #614 + - Updated some python test script to work with Python 3 #639 + [BUG FIXES] + - Fix HTTP::Message::PSGI to work with delayed writer without content #653 + - Plackup reloader allows restarting the server when the path contains .git or .svn, just not at the beginning of the path #632 + - Added MIME types for .webp, .ttf and .xlsx files (rrwo) + - Fix Plack::Request content to not error when Content-Type is empty #655 + 1.0047 2018-02-10 01:23:37 PST [BUG FIXES] - Disable FCGI/lighttpd test that was supposed to be releng only #611 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/MANIFEST new/Plack-1.0048/MANIFEST --- old/Plack-1.0047/MANIFEST 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/MANIFEST 2020-11-30 01:20:06.000000000 +0100 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.009. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. Changes LICENSE MANIFEST @@ -102,6 +102,7 @@ share/baybridge.jpg share/face.jpg t/HTTP-Message-PSGI/content_length.t +t/HTTP-Message-PSGI/empty_delayed_writer.t t/HTTP-Message-PSGI/empty_streamed_response.t t/HTTP-Message-PSGI/host.t t/HTTP-Message-PSGI/path_info.t @@ -210,6 +211,7 @@ t/Plack-Middleware/xframework.t t/Plack-Middleware/xsendfile.t t/Plack-Request/base.t +t/Plack-Request/body-unbuffered.t t/Plack-Request/body.t t/Plack-Request/content-on-get.t t/Plack-Request/content.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/META.json new/Plack-1.0048/META.json --- old/Plack-1.0047/META.json 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/META.json 2020-11-30 01:20:06.000000000 +0100 @@ -4,7 +4,7 @@ "Tatsuhiko Miyagawa" ], "dynamic_config" : 0, - "generated_by" : "Dist::Milla version v1.0.18, Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Milla version v1.0.20, Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.143240", "license" : [ "perl_5" ], @@ -35,7 +35,7 @@ }, "develop" : { "requires" : { - "Dist::Milla" : "v1.0.18", + "Dist::Milla" : "v1.0.20", "Test::Pod" : "1.41" } }, @@ -47,7 +47,7 @@ "Devel::StackTrace::AsHTML" : "0.11", "File::ShareDir" : "1.00", "Filesys::Notify::Simple" : "0", - "HTTP::Entity::Parser" : "0.17", + "HTTP::Entity::Parser" : "0.25", "HTTP::Headers::Fast" : "0.18", "HTTP::Message" : "5.814", "HTTP::Tiny" : "0.034", @@ -105,7 +105,7 @@ "web" : "https://github.com/plack/Plack" } }, - "version" : "1.0047", + "version" : "1.0048", "x_authority" : "cpan:MIYAGAWA", "x_contributors" : [ "Aaron Trevena <[email protected]>", @@ -142,6 +142,7 @@ "David Steinbrunner <[email protected]>", "dmaestro <[email protected]>", "Eduardo Arino de la Rubia <[email protected]>", + "Emmanuel Seyman <[email protected]>", "Eric Johnson <[email protected]>", "Eugen Konkov <[email protected]>", "Fabrice Gabolde <[email protected]>", @@ -187,7 +188,10 @@ "Masahiro Chiba <[email protected]>", "Masahiro Nagano <[email protected]>", "Michael G. Schwern <[email protected]>", + "Michal Josef \u0160pa\u010dek <[email protected]>", "mickey <[email protected]>", + "Narsimham Chelluri <[email protected]>", + "Narsimham Chelluri <[email protected]>", "Nick Wellnhofer <[email protected]>", "Nobuo Danjou <[email protected]>", "Olaf Alders <[email protected]>", @@ -199,6 +203,7 @@ "Panu Ervamaa <[email protected]>", "Paul Driver <[email protected]>", "Pedro Melo <[email protected]>", + "Perlover <[email protected]>", "Peter Flanigan <[email protected]>", "Peter Makholm <[email protected]>", "Piotr Roszatycki <[email protected]>", @@ -210,6 +215,7 @@ "Ricky Morse <[email protected]>", "Robert Rothenberg <[email protected]>", "Rob Hoelz <[email protected]>", + "runarb <[email protected]>", "Ryo Miyake <[email protected]>", "Sawyer X <[email protected]>", "Scott S. McCoy <[email protected]>", @@ -221,7 +227,9 @@ "Stuart A Johnston <[email protected]>", "Takeshi OKURA <[email protected]>", "Tatsuhiko Miyagawa <[email protected]>", + "The Dumb Terminal <[email protected]>", "Thomas Klausner <[email protected]>", + "Thomas Sibley <[email protected]>", "Tim Bunce <[email protected]>", "Tokuhiro Matsuno <[email protected]>", "Tomas Doran <[email protected]>", @@ -235,6 +243,8 @@ "Yuval Kogman <[email protected]>", "\u5510\u9cf3 <[email protected]>" ], - "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233" + "x_generated_by_perl" : "v5.20.1", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.09", + "x_static_install" : 1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/META.yml new/Plack-1.0048/META.yml --- old/Plack-1.0047/META.yml 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/META.yml 2020-11-30 01:20:06.000000000 +0100 @@ -9,7 +9,7 @@ ExtUtils::MakeMaker: '0' File::ShareDir::Install: '0.06' dynamic_config: 0 -generated_by: 'Dist::Milla version v1.0.18, Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Milla version v1.0.20, Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.143240' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -30,7 +30,7 @@ Devel::StackTrace::AsHTML: '0.11' File::ShareDir: '1.00' Filesys::Notify::Simple: '0' - HTTP::Entity::Parser: '0.17' + HTTP::Entity::Parser: '0.25' HTTP::Headers::Fast: '0.18' HTTP::Message: '5.814' HTTP::Tiny: '0.034' @@ -47,7 +47,7 @@ bugtracker: https://github.com/plack/Plack/issues homepage: https://github.com/plack/Plack repository: https://github.com/plack/Plack.git -version: '1.0047' +version: '1.0048' x_authority: cpan:MIYAGAWA x_contributors: - 'Aaron Trevena <[email protected]>' @@ -84,6 +84,7 @@ - 'David Steinbrunner <[email protected]>' - 'dmaestro <[email protected]>' - 'Eduardo Arino de la Rubia <[email protected]>' + - 'Emmanuel Seyman <[email protected]>' - 'Eric Johnson <[email protected]>' - 'Eugen Konkov <[email protected]>' - 'Fabrice Gabolde <[email protected]>' @@ -129,7 +130,10 @@ - 'Masahiro Chiba <[email protected]>' - 'Masahiro Nagano <[email protected]>' - 'Michael G. Schwern <[email protected]>' + - 'Michal Josef Špaček <[email protected]>' - 'mickey <[email protected]>' + - 'Narsimham Chelluri <[email protected]>' + - 'Narsimham Chelluri <[email protected]>' - 'Nick Wellnhofer <[email protected]>' - 'Nobuo Danjou <[email protected]>' - 'Olaf Alders <[email protected]>' @@ -141,6 +145,7 @@ - 'Panu Ervamaa <[email protected]>' - 'Paul Driver <[email protected]>' - 'Pedro Melo <[email protected]>' + - 'Perlover <[email protected]>' - 'Peter Flanigan <[email protected]>' - 'Peter Makholm <[email protected]>' - 'Piotr Roszatycki <[email protected]>' @@ -152,6 +157,7 @@ - 'Ricky Morse <[email protected]>' - 'Robert Rothenberg <[email protected]>' - 'Rob Hoelz <[email protected]>' + - 'runarb <[email protected]>' - 'Ryo Miyake <[email protected]>' - 'Sawyer X <[email protected]>' - 'Scott S. McCoy <[email protected]>' @@ -163,7 +169,9 @@ - 'Stuart A Johnston <[email protected]>' - 'Takeshi OKURA <[email protected]>' - 'Tatsuhiko Miyagawa <[email protected]>' + - 'The Dumb Terminal <[email protected]>' - 'Thomas Klausner <[email protected]>' + - 'Thomas Sibley <[email protected]>' - 'Tim Bunce <[email protected]>' - 'Tokuhiro Matsuno <[email protected]>' - 'Tomas Doran <[email protected]>' @@ -176,4 +184,6 @@ - 'Yury Zavarin <[email protected]>' - 'Yuval Kogman <[email protected]>' - '唐鳳 <[email protected]>' -x_serialization_backend: 'YAML::Tiny version 1.70' +x_generated_by_perl: v5.20.1 +x_serialization_backend: 'YAML::Tiny version 1.73' +x_static_install: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/Makefile.PL new/Plack-1.0048/Makefile.PL --- old/Plack-1.0047/Makefile.PL 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/Makefile.PL 2020-11-30 01:20:06.000000000 +0100 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.009. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012. use strict; use warnings; @@ -33,7 +33,7 @@ "Devel::StackTrace::AsHTML" => "0.11", "File::ShareDir" => "1.00", "Filesys::Notify::Simple" => 0, - "HTTP::Entity::Parser" => "0.17", + "HTTP::Entity::Parser" => "0.25", "HTTP::Headers::Fast" => "0.18", "HTTP::Message" => "5.814", "HTTP::Tiny" => "0.034", @@ -50,7 +50,7 @@ "Test::More" => "0.88", "Test::Requires" => 0 }, - "VERSION" => "1.0047", + "VERSION" => "1.0048", "test" => { "TESTS" => "t/*.t t/HTTP-Message-PSGI/*.t t/HTTP-Server-PSGI/*.t t/Plack-Builder/*.t t/Plack-HTTPParser-PP/*.t t/Plack-Handler/*.t t/Plack-Loader/*.t t/Plack-MIME/*.t t/Plack-Middleware/*.t t/Plack-Middleware/cascade/*.t t/Plack-Middleware/recursive/*.t t/Plack-Middleware/stacktrace/*.t t/Plack-Request/*.t t/Plack-Response/*.t t/Plack-Runner/*.t t/Plack-TempBuffer/*.t t/Plack-Test/*.t t/Plack-Util/*.t" } @@ -64,7 +64,7 @@ "Devel::StackTrace::AsHTML" => "0.11", "File::ShareDir" => "1.00", "Filesys::Notify::Simple" => 0, - "HTTP::Entity::Parser" => "0.17", + "HTTP::Entity::Parser" => "0.25", "HTTP::Headers::Fast" => "0.18", "HTTP::Message" => "5.814", "HTTP::Tiny" => "0.034", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/cpanfile new/Plack-1.0048/cpanfile --- old/Plack-1.0047/cpanfile 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/cpanfile 2020-11-30 01:20:06.000000000 +0100 @@ -16,7 +16,7 @@ requires 'parent'; requires 'Apache::LogFormat::Compiler', '0.33'; requires 'HTTP::Tiny', 0.034; -requires 'HTTP::Entity::Parser', 0.17; +requires 'HTTP::Entity::Parser', 0.25; requires 'WWW::Form::UrlEncoded', 0.23; on test => sub { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/HTTP/Message/PSGI.pm new/Plack-1.0048/lib/HTTP/Message/PSGI.pm --- old/Plack-1.0047/lib/HTTP/Message/PSGI.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/HTTP/Message/PSGI.pm 2020-11-30 01:20:06.000000000 +0100 @@ -137,8 +137,9 @@ }; if (!defined $body) { + $body = []; my $o = Plack::Util::inline_object - write => sub { push @{ $body ||= [] }, @_ }, + write => sub { push @$body, @_ }, close => $convert_resp; return $o; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack/App/Directory.pm new/Plack-1.0048/lib/Plack/App/Directory.pm --- old/Plack-1.0047/lib/Plack/App/Directory.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack/App/Directory.pm 2020-11-30 01:20:06.000000000 +0100 @@ -57,10 +57,10 @@ } sub serve_path { - my($self, $env, $dir, $fullpath) = @_; + my($self, $env, $dir) = @_; if (-f $dir) { - return $self->SUPER::serve_path($env, $dir, $fullpath); + return $self->SUPER::serve_path($env, $dir); } my $dir_url = $env->{SCRIPT_NAME} . $env->{PATH_INFO}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack/App/URLMap.pm new/Plack-1.0048/lib/Plack/App/URLMap.pm --- old/Plack-1.0047/lib/Plack/App/URLMap.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack/App/URLMap.pm 2020-11-30 01:20:06.000000000 +0100 @@ -2,7 +2,7 @@ use strict; use warnings; use parent qw(Plack::Component); -use constant DEBUG => $ENV{PLACK_URLMAP_DEBUG}; +use constant DEBUG => $ENV{PLACK_URLMAP_DEBUG} ? 1 : 0; use Carp (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack/Loader/Restarter.pm new/Plack-1.0048/lib/Plack/Loader/Restarter.pm --- old/Plack-1.0047/lib/Plack/Loader/Restarter.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack/Loader/Restarter.pm 2020-11-30 01:20:06.000000000 +0100 @@ -52,7 +52,7 @@ if ( $file->{path} =~ m{(\d+)$} && $1 >= 4913 && $1 <= 5036) { return 0; } - $file->{path} !~ m!\.(?:git|svn)[/\\]|\.(?:bak|swp|swpx|swx)$|~$|_flymake\.p[lm]$|\.#!; + $file->{path} !~ m!^\.(?:git|svn)[/\\]|\.(?:bak|swp|swpx|swx)$|~$|_flymake\.p[lm]$|\.#!; } sub run { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack/MIME.pm new/Plack-1.0048/lib/Plack/MIME.pm --- old/Plack-1.0047/lib/Plack/MIME.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack/MIME.pm 2020-11-30 01:20:06.000000000 +0100 @@ -150,6 +150,7 @@ ".tiff" => "image/tiff", ".torrent" => "application/x-bittorrent", ".tr" => "text/troff", + ".ttf" => "font/ttf", ".txt" => "text/plain", ".vcf" => "text/x-vcard", ".vcs" => "text/x-vcalendar", @@ -157,6 +158,7 @@ ".war" => "application/java-archive", ".wav" => "audio/x-wav", ".webm" => "video/webm", + ".webp" => "image/webp", ".wma" => "audio/x-ms-wma", ".wmv" => "video/x-ms-wmv", ".wmx" => "video/x-ms-wmx", @@ -166,6 +168,7 @@ ".xbm" => "image/x-xbitmap", ".xhtml" => "application/xhtml+xml", ".xls" => "application/vnd.ms-excel", + ".xlsx" => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ".xml" => "application/xml", ".xpm" => "image/x-xpixmap", ".xsl" => "application/xml", @@ -179,7 +182,7 @@ sub mime_type { my($class, $file) = @_; - $file =~ /(\.[a-zA-Z0-9]+)$/ or return; + $file =~ /(\.[a-zA-Z0-9\-]+)$/ or return; $MIME_TYPES->{lc $1} || $fallback->(lc $1); } @@ -226,5 +229,3 @@ L<Rack::Mime|https://github.com/rack/rack/blob/master/lib/rack/mime.rb> L<MIME::Types> =cut - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack/Middleware.pm new/Plack-1.0048/lib/Plack/Middleware.pm --- old/Plack-1.0047/lib/Plack/Middleware.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack/Middleware.pm 2020-11-30 01:20:06.000000000 +0100 @@ -103,7 +103,7 @@ sub call { my($self, $env) = @_; # pre-processing $env - my $res = $app->($env); + my $res = $self->app->($env); return Plack::Util::response_cb($res, sub { my $res = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack/Request.pm new/Plack-1.0048/lib/Plack/Request.pm --- old/Plack-1.0047/lib/Plack/Request.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack/Request.pm 2020-11-30 01:20:06.000000000 +0100 @@ -2,7 +2,7 @@ use strict; use warnings; use 5.008_001; -our $VERSION = '1.0047'; +our $VERSION = '1.0048'; use HTTP::Headers::Fast; use Carp (); @@ -251,11 +251,6 @@ sub _parse_request_body { my $self = shift; - if ( !$self->env->{CONTENT_TYPE} ) { - $self->env->{'plack.request.body_parameters'} = []; - $self->env->{'plack.request.upload'} = Hash::MultiValue->new(); - return; - } my ($params,$uploads) = $self->request_body_parser->parse($self->env); $self->env->{'plack.request.body_parameters'} = $params; @@ -485,11 +480,20 @@ =item content_length -Shortcut to $req->headers->content_length. +Returns the raw value of the Content-Length header. + +Before version 0.9925, this method was a shortcut for +C<< $req->headers->content_length >>. =item content_type -Shortcut to $req->headers->content_type. +Returns the raw value of the Content-Type header. + +If you want just the MIME type, without any attributes like charset, use +C<< $req->headers->content_type >>. See also L<HTTP::Headers/content_type>. + +Before version 0.9925, this method was a shortcut for +C<< $req->headers->content_type >>. =item header diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack/Response.pm new/Plack-1.0048/lib/Plack/Response.pm --- old/Plack-1.0047/lib/Plack/Response.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack/Response.pm 2020-11-30 01:20:06.000000000 +0100 @@ -1,7 +1,7 @@ package Plack::Response; use strict; use warnings; -our $VERSION = '1.0047'; +our $VERSION = '1.0048'; use Plack::Util::Accessor qw(body status); use Carp (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack/Runner.pm new/Plack-1.0048/lib/Plack/Runner.pm --- old/Plack-1.0047/lib/Plack/Runner.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack/Runner.pm 2020-11-30 01:20:06.000000000 +0100 @@ -161,7 +161,7 @@ } if ($self->{eval}) { - $self->loader->watch("lib"); + $self->loader->watch("lib") if -e "lib"; return build { no strict; no warnings; @@ -175,7 +175,9 @@ $psgi ||= "app.psgi"; require File::Basename; - $self->loader->watch( File::Basename::dirname($psgi) . "/lib", $psgi ); + my $lib = File::Basename::dirname($psgi) . "/lib"; + $self->loader->watch($lib) if -e $lib; + $self->loader->watch($psgi); build { Plack::Util::load_psgi $psgi }; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack/Util.pm new/Plack-1.0048/lib/Plack/Util.pm --- old/Plack-1.0047/lib/Plack/Util.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack/Util.pm 2020-11-30 01:20:06.000000000 +0100 @@ -556,7 +556,7 @@ =item encode_html - my $encoded_string = Plack::Util::encode( $string ); + my $encoded_string = Plack::Util::encode_html( $string ); Entity encodes C<<>, C<< > >>, C<&>, C<"> and C<'> in the input string and returns it. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/lib/Plack.pm new/Plack-1.0048/lib/Plack.pm --- old/Plack-1.0047/lib/Plack.pm 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/lib/Plack.pm 2020-11-30 01:20:06.000000000 +0100 @@ -3,7 +3,7 @@ use strict; use warnings; use 5.008_001; -our $VERSION = '1.0047'; +our $VERSION = '1.0048'; 1; __END__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/t/HTTP-Message-PSGI/empty_delayed_writer.t new/Plack-1.0048/t/HTTP-Message-PSGI/empty_delayed_writer.t --- old/Plack-1.0047/t/HTTP-Message-PSGI/empty_delayed_writer.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Plack-1.0048/t/HTTP-Message-PSGI/empty_delayed_writer.t 2020-11-30 01:20:06.000000000 +0100 @@ -0,0 +1,23 @@ +use strict; +use warnings; +use Test::More; +use HTTP::Message::PSGI; +use HTTP::Request; +use HTTP::Response; + +my $app = sub { + my ($env) = @_; + return sub { + my ($responder) = @_; + my $writer = $responder->([ 200, [] ]); + $writer->close; + }; +}; + +my $env = req_to_psgi(HTTP::Request->new(POST => "http://localhost/post", [ ], 'hello')); + +my $response = HTTP::Response->from_psgi($app->($env)); + +is($response->content, '', 'delayed writer without write gives empty content'); + +done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/t/Plack-Loader/restarter.t new/Plack-1.0048/t/Plack-Loader/restarter.t --- old/Plack-1.0047/t/Plack-Loader/restarter.t 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/t/Plack-Loader/restarter.t 2020-11-30 01:20:06.000000000 +0100 @@ -39,13 +39,13 @@ is $cb->()->content, $return_bodies[0]; touch($restartertestfiles[0]); - sleep 2; + sleep 3; wait_port($port); is $cb->()->content, $return_bodies[1]; touch($restartertestfiles[1]); - sleep 2; + sleep 3; wait_port($port); is $cb->()->content, $return_bodies[2]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/t/Plack-Loader/restarter_valid.t new/Plack-1.0048/t/Plack-Loader/restarter_valid.t --- old/Plack-1.0047/t/Plack-Loader/restarter_valid.t 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/t/Plack-Loader/restarter_valid.t 2020-11-30 01:20:06.000000000 +0100 @@ -6,7 +6,7 @@ my @match = qw( Foo.pm foo.t lib/Bar.pm view/index.tt _myapp/foo.psgi .www/bar.pl _sass.css /Users/joe/foo/bar.pm - /path/to/4912 /path/to/5037 + /path/to/4912 /path/to/5037 myapp.git/some-file ); my @ignore = qw( .git/123 .svn/abc Foo.pm~ _flymake.pl /Users/joe/foo.pl~ /foo/bar/x.txt.bak diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/t/Plack-MIME/add_type.t new/Plack-1.0048/t/Plack-MIME/add_type.t --- old/Plack-1.0047/t/Plack-MIME/add_type.t 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/t/Plack-MIME/add_type.t 2020-11-30 01:20:06.000000000 +0100 @@ -7,4 +7,7 @@ Plack::MIME->add_type(".c" => "application/c-source"); is( Plack::MIME->mime_type("FOO.C"), "application/c-source" ); +Plack::MIME->add_type(".ng-html" => "text/ng-template"); +is( Plack::MIME->mime_type("foo.ng-html"), "text/ng-template" ); + done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/t/Plack-Middleware/cgi-bin/hello.py new/Plack-1.0048/t/Plack-Middleware/cgi-bin/hello.py --- old/Plack-1.0047/t/Plack-Middleware/cgi-bin/hello.py 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/t/Plack-Middleware/cgi-bin/hello.py 2020-11-30 01:20:06.000000000 +0100 @@ -1,9 +1,10 @@ #!/usr/bin/python +from __future__ import print_function import os -print "Content-Type: text/plain" +print("Content-Type: text/plain") print for item in ([ "foo", "bar" ]): - print "Hello " + item + ". " + print("Hello " + item + ". ") -print "QUERY_STRING is " + os.environ['QUERY_STRING'] +print("QUERY_STRING is " + os.environ['QUERY_STRING']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/t/Plack-Middleware/cgibin_exec.t new/Plack-1.0048/t/Plack-Middleware/cgibin_exec.t --- old/Plack-1.0047/t/Plack-Middleware/cgibin_exec.t 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/t/Plack-Middleware/cgibin_exec.t 2020-11-30 01:20:06.000000000 +0100 @@ -11,10 +11,6 @@ plan skip_all => "You don't have /usr/bin/python"; } -if (`/usr/bin/python --version 2>&1` =~ /^Python 3/) { - plan skip_all => "This test doesn't support python 3 yet"; -} - my $app = Plack::App::CGIBin->new(root => "t/Plack-Middleware/cgi-bin")->to_app; test_psgi app => $app, client => sub { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/t/Plack-Middleware/file.t new/Plack-1.0048/t/Plack-Middleware/file.t --- old/Plack-1.0047/t/Plack-Middleware/file.t 2018-02-10 10:23:44.000000000 +0100 +++ new/Plack-1.0048/t/Plack-Middleware/file.t 2020-11-30 01:20:06.000000000 +0100 @@ -45,7 +45,7 @@ is $res->code, 200; like $res->content, qr/We will find for this literal string/; - my $res = $cb->(GET "/../Plack-Middleware/file.t"); + $res = $cb->(GET "/../Plack-Middleware/file.t"); is $res->code, 403; is $res->content, 'forbidden'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Plack-1.0047/t/Plack-Request/body-unbuffered.t new/Plack-1.0048/t/Plack-Request/body-unbuffered.t --- old/Plack-1.0047/t/Plack-Request/body-unbuffered.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Plack-1.0048/t/Plack-Request/body-unbuffered.t 2020-11-30 01:20:06.000000000 +0100 @@ -0,0 +1,37 @@ +use strict; +use warnings; +use Test::More; +use Plack::Test; +use Plack::Request; +use Plack::Util; +use HTTP::Request::Common; + +my $app = sub { + my $env = shift; + + $env->{'psgix.input.buffered'} = 0; + + my $input = $env->{'psgi.input'}; + $env->{'psgi.input'} = Plack::Util::inline_object + read => sub { $input->read(@_) }; + + my $req = Plack::Request->new($env); + is $req->content, '{}'; + + $req->new_response(200)->finalize; +}; + +test_psgi $app, sub { + my $cb = shift; + + # empty Content-Type + my $req = POST "/"; + $req->content_type(""); + $req->content("{}"); + $req->content_length(2); + + my $res = $cb->($req); + ok $res->is_success or diag $res->as_string; +}; + +done_testing; _______________________________________________ openSUSE Commits mailing list -- [email protected] To unsubscribe, email [email protected] List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/[email protected]
