diff -Nru libplack-perl-1.0042/Changes libplack-perl-1.0044/Changes --- libplack-perl-1.0042/Changes 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/Changes 2017-04-27 17:46:51.000000000 +0000 @@ -1,5 +1,16 @@ Go to http://github.com/plack/Plack/issues for the roadmap and known issues. +1.0044 2017-04-26 22:30:27 PDT + [IMPROVEMENTS] + - Allow passing an already-open listen socket to HTTP::Server::PSGI + and add an option to do so in Plack::Test::Server. + +1.0043 2017-02-21 19:00:31 PST + [IMPROVEMENTS] + - Fixed typo in docs #578 #584 + - Remove test that expects cookie to be delimited by comma #573 + - Stop upper-casing all header keys in Plack::Request->headers #585 + 1.0042 2016-09-28 22:37:33 PDT [BUG FIXES] - Revert: Allow passing an already-open listen socket to HTTP::Server::PSGI #550 diff -Nru libplack-perl-1.0042/cpanfile libplack-perl-1.0044/cpanfile --- libplack-perl-1.0042/cpanfile 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/cpanfile 2017-04-27 17:46:51.000000000 +0000 @@ -10,7 +10,7 @@ requires 'Hash::MultiValue', '0.05'; requires 'Pod::Usage', '1.36'; requires 'Stream::Buffered', '0.02'; -requires 'Test::TCP', '2.00'; +requires 'Test::TCP', '2.15'; requires 'Try::Tiny'; requires 'URI', '1.59'; requires 'parent'; diff -Nru libplack-perl-1.0042/debian/changelog libplack-perl-1.0044/debian/changelog --- libplack-perl-1.0042/debian/changelog 2016-10-26 22:57:04.000000000 +0000 +++ libplack-perl-1.0044/debian/changelog 2017-09-27 14:47:08.000000000 +0000 @@ -1,3 +1,17 @@ +libplack-perl (1.0044-1) unstable; urgency=medium + + * Drop debian/tests/pkg-perl/smoke-tests, handled by pkg-perl- + autopkgtest now. + * Import upstream version 1.0044. + Fixes test failure with new Cookie::Baker, as seen on ci.debian.net. + * Drop spelling.patch, merged upstream. + * Update years of packaging copyright. + * Bump versioned (build) dependency on libtest-tcp-perl. + * Declare compliance with Debian Policy 4.1.0. + * Drop alternative (build) dependency on ancient libwww-perl. + + -- gregor herrmann Wed, 27 Sep 2017 16:47:08 +0200 + libplack-perl (1.0042-1) unstable; urgency=medium [ Salvatore Bonaccorso ] diff -Nru libplack-perl-1.0042/debian/control libplack-perl-1.0044/debian/control --- libplack-perl-1.0042/debian/control 2016-10-26 22:57:04.000000000 +0000 +++ libplack-perl-1.0044/debian/control 2017-09-27 14:47:08.000000000 +0000 @@ -24,7 +24,7 @@ libhash-multivalue-perl, libhttp-entity-parser-perl, libhttp-headers-fast-perl, - libhttp-message-perl | libwww-perl (<< 6.0), + libhttp-message-perl, libhttp-request-ascgi-perl, libio-handle-util-perl, liblog-dispatch-array-perl, @@ -33,7 +33,7 @@ libmodule-refresh-perl, libstream-buffered-perl, libtest-requires-perl, - libtest-tcp-perl (>= 2.00), + libtest-tcp-perl (>= 2.15), libtry-tiny-perl, liburi-perl, libwww-perl, @@ -41,7 +41,7 @@ perl, perl (>= 5.19.2) | libhttp-tiny-perl (>= 0.034), python -Standards-Version: 3.9.8 +Standards-Version: 4.1.0 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libplack-perl.git Vcs-Git: https://anonscm.debian.org/git/pkg-perl/packages/libplack-perl.git Homepage: https://metacpan.org/release/Plack @@ -59,9 +59,9 @@ libhash-multivalue-perl, libhttp-entity-parser-perl, libhttp-headers-fast-perl, - libhttp-message-perl | libwww-perl (<< 6.0), + libhttp-message-perl, libstream-buffered-perl, - libtest-tcp-perl (>= 2.00), + libtest-tcp-perl (>= 2.15), libtry-tiny-perl, liburi-perl, libwww-form-urlencoded-perl, diff -Nru libplack-perl-1.0042/debian/copyright libplack-perl-1.0044/debian/copyright --- libplack-perl-1.0042/debian/copyright 2016-10-26 22:57:04.000000000 +0000 +++ libplack-perl-1.0044/debian/copyright 2017-09-27 14:47:08.000000000 +0000 @@ -10,7 +10,7 @@ Files: debian/* Copyright: 2010-2011, Jonathan Yu 2010-2011, Krzysztof Krzyżaniak (eloy) - 2010-2016, gregor herrmann + 2010-2017, gregor herrmann 2010, Iñigo Tejedor Arrondo 2012, Alessandro Ghedini License: Artistic or GPL-1+ diff -Nru libplack-perl-1.0042/debian/patches/series libplack-perl-1.0044/debian/patches/series --- libplack-perl-1.0042/debian/patches/series 2016-10-26 22:57:04.000000000 +0000 +++ libplack-perl-1.0044/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -spelling.patch diff -Nru libplack-perl-1.0042/debian/patches/spelling.patch libplack-perl-1.0044/debian/patches/spelling.patch --- libplack-perl-1.0042/debian/patches/spelling.patch 2016-10-26 22:57:04.000000000 +0000 +++ libplack-perl-1.0044/debian/patches/spelling.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -Description: spelling fix -Origin: vendor -Author: gregor herrmann -Last-Update: 2016-10-23 -Forwarded: https://github.com/plack/Plack/issues/578 -Bug: https://github.com/plack/Plack/issues/578 -Applied: d901b5d0d71d6064ff09d04a07cd493ec02e19a8 - ---- a/lib/Plack/Middleware/Chunked.pm -+++ b/lib/Plack/Middleware/Chunked.pm -@@ -41,7 +41,7 @@ - - =head1 SYNOPSIS - -- # Mostly from server implemenations -+ # Mostly from server implementations - $app = Plack::Middeware::Chunked->wrap($app); - - =head1 DESCRIPTION diff -Nru libplack-perl-1.0042/debian/tests/pkg-perl/smoke-tests libplack-perl-1.0044/debian/tests/pkg-perl/smoke-tests --- libplack-perl-1.0042/debian/tests/pkg-perl/smoke-tests 2016-10-26 22:57:04.000000000 +0000 +++ libplack-perl-1.0044/debian/tests/pkg-perl/smoke-tests 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -t/*.t -t/*/*.t -t/*/*/*.t diff -Nru libplack-perl-1.0042/lib/HTTP/Server/PSGI.pm libplack-perl-1.0044/lib/HTTP/Server/PSGI.pm --- libplack-perl-1.0042/lib/HTTP/Server/PSGI.pm 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/lib/HTTP/Server/PSGI.pm 2017-04-27 17:46:52.000000000 +0000 @@ -35,8 +35,14 @@ my($class, %args) = @_; my $self = bless { - host => $args{host} || 0, - port => $args{port} || 8080, + ($args{listen_sock} ? ( + listen_sock => $args{listen_sock}, + host => $args{listen_sock}->sockhost, + port => $args{listen_sock}->sockport, + ):( + host => $args{host} || 0, + port => $args{port} || 8080, + )), timeout => $args{timeout} || 300, server_software => $args{server_software} || $class, server_ready => $args{server_ready} || sub {}, @@ -82,17 +88,19 @@ sub setup_listener { my $self = shift; - my %args = ( - Listen => SOMAXCONN, - LocalPort => $self->{port}, - LocalAddr => $self->{host}, - Proto => 'tcp', - ReuseAddr => 1, - ); - - my $class = $self->prepare_socket_class(\%args); - $self->{listen_sock} ||= $class->new(%args) - or die "failed to listen to port $self->{port}: $!"; + $self->{listen_sock} ||= do { + my %args = ( + Listen => SOMAXCONN, + LocalPort => $self->{port}, + LocalAddr => $self->{host}, + Proto => 'tcp', + ReuseAddr => 1, + ); + + my $class = $self->prepare_socket_class(\%args); + $class->new(%args) + or die "failed to listen to port $self->{port}: $!"; + }; $self->{server_ready}->({ %$self, proto => $self->{ssl} ? 'https' : 'http' }); } diff -Nru libplack-perl-1.0042/lib/Plack/Handler/FCGI.pm libplack-perl-1.0044/lib/Plack/Handler/FCGI.pm --- libplack-perl-1.0042/lib/Plack/Handler/FCGI.pm 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/lib/Plack/Handler/FCGI.pm 2017-04-27 17:46:52.000000000 +0000 @@ -419,7 +419,7 @@ mod_fcgid: - FcgiPassHeader Authorization + FcgidPassHeader Authorization =head2 Server::Starter diff -Nru libplack-perl-1.0042/lib/Plack/Middleware/Chunked.pm libplack-perl-1.0044/lib/Plack/Middleware/Chunked.pm --- libplack-perl-1.0042/lib/Plack/Middleware/Chunked.pm 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/lib/Plack/Middleware/Chunked.pm 2017-04-27 17:46:52.000000000 +0000 @@ -41,7 +41,7 @@ =head1 SYNOPSIS - # Mostly from server implemenations + # Mostly from server implementations $app = Plack::Middeware::Chunked->wrap($app); =head1 DESCRIPTION diff -Nru libplack-perl-1.0042/lib/Plack/Request.pm libplack-perl-1.0044/lib/Plack/Request.pm --- libplack-perl-1.0042/lib/Plack/Request.pm 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/lib/Plack/Request.pm 2017-04-27 17:46:51.000000000 +0000 @@ -2,7 +2,7 @@ use strict; use warnings; use 5.008_001; -our $VERSION = '1.0042'; +our $VERSION = '1.0044'; use HTTP::Headers::Fast; use Carp (); @@ -93,7 +93,7 @@ $self->{headers} = HTTP::Headers::Fast->new( map { (my $field = $_) =~ s/^HTTPS?_//; - ( $field => $env->{$_} ); + ( lc($field) => $env->{$_} ); } grep { /^(?:HTTP|CONTENT)/i } keys %$env ); diff -Nru libplack-perl-1.0042/lib/Plack/Response.pm libplack-perl-1.0044/lib/Plack/Response.pm --- libplack-perl-1.0042/lib/Plack/Response.pm 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/lib/Plack/Response.pm 2017-04-27 17:46:52.000000000 +0000 @@ -1,7 +1,7 @@ package Plack::Response; use strict; use warnings; -our $VERSION = '1.0042'; +our $VERSION = '1.0044'; use Plack::Util::Accessor qw(body status); use Carp (); diff -Nru libplack-perl-1.0042/lib/Plack/Test/Server.pm libplack-perl-1.0044/lib/Plack/Test/Server.pm --- libplack-perl-1.0042/lib/Plack/Test/Server.pm 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/lib/Plack/Test/Server.pm 2017-04-27 17:46:52.000000000 +0000 @@ -11,10 +11,20 @@ sub new { my($class, $app, %args) = @_; + my $host = $args{host} || '127.0.0.1'; my $server = Test::TCP->new( + listen => $args{listen}, + host => $host, code => sub { - my $port = shift; - my $server = Plack::Loader->auto(port => $port, host => ($args{host} || '127.0.0.1')); + my $sock_or_port = shift; + my $server = Plack::Loader->auto( + ($args{listen} ? ( + listen_sock => $sock_or_port, + ):( + port => $sock_or_port, + host => $host, + )) + ); $server->run($app); exit; }, diff -Nru libplack-perl-1.0042/lib/Plack.pm libplack-perl-1.0044/lib/Plack.pm --- libplack-perl-1.0042/lib/Plack.pm 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/lib/Plack.pm 2017-04-27 17:46:51.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use warnings; use 5.008_001; -our $VERSION = '1.0042'; +our $VERSION = '1.0044'; 1; __END__ diff -Nru libplack-perl-1.0042/Makefile.PL libplack-perl-1.0044/Makefile.PL --- libplack-perl-1.0042/Makefile.PL 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/Makefile.PL 2017-04-27 17:46:51.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.007. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.009. use strict; use warnings; @@ -40,7 +40,7 @@ "Hash::MultiValue" => "0.05", "Pod::Usage" => "1.36", "Stream::Buffered" => "0.02", - "Test::TCP" => "2.00", + "Test::TCP" => "2.15", "Try::Tiny" => 0, "URI" => "1.59", "WWW::Form::UrlEncoded" => "0.23", @@ -50,7 +50,7 @@ "Test::More" => "0.88", "Test::Requires" => 0 }, - "VERSION" => "1.0042", + "VERSION" => "1.0044", "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" } @@ -73,7 +73,7 @@ "Stream::Buffered" => "0.02", "Test::More" => "0.88", "Test::Requires" => 0, - "Test::TCP" => "2.00", + "Test::TCP" => "2.15", "Try::Tiny" => 0, "URI" => "1.59", "WWW::Form::UrlEncoded" => "0.23", diff -Nru libplack-perl-1.0042/MANIFEST libplack-perl-1.0044/MANIFEST --- libplack-perl-1.0042/MANIFEST 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/MANIFEST 2017-04-27 17:46:51.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.007. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.009. Changes LICENSE MANIFEST @@ -109,6 +109,7 @@ t/HTTP-Message-PSGI/unknown_response.t t/HTTP-Message-PSGI/utf8_req.t t/HTTP-Server-PSGI/harakiri.t +t/HTTP-Server-PSGI/listen.t t/HTTP-Server-PSGI/post.t t/Plack-Builder/builder.t t/Plack-Builder/mount.t @@ -216,6 +217,7 @@ t/Plack-Request/double_port.t t/Plack-Request/foo1.txt t/Plack-Request/foo2.txt +t/Plack-Request/headers.t t/Plack-Request/hostname.t t/Plack-Request/many_upload.t t/Plack-Request/multi_read.t diff -Nru libplack-perl-1.0042/META.json libplack-perl-1.0044/META.json --- libplack-perl-1.0042/META.json 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/META.json 2017-04-27 17:46:51.000000000 +0000 @@ -4,7 +4,7 @@ "Tatsuhiko Miyagawa" ], "dynamic_config" : 0, - "generated_by" : "Dist::Milla version v1.0.16, Dist::Zilla version 6.007, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Milla version v1.0.17, Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -35,7 +35,7 @@ }, "develop" : { "requires" : { - "Dist::Milla" : "v1.0.16", + "Dist::Milla" : "v1.0.17", "Test::Pod" : "1.41" } }, @@ -54,7 +54,7 @@ "Hash::MultiValue" : "0.05", "Pod::Usage" : "1.36", "Stream::Buffered" : "0.02", - "Test::TCP" : "2.00", + "Test::TCP" : "2.15", "Try::Tiny" : "0", "URI" : "1.59", "WWW::Form::UrlEncoded" : "0.23", @@ -105,7 +105,7 @@ "web" : "https://github.com/plack/Plack" } }, - "version" : "1.0042", + "version" : "1.0044", "x_authority" : "cpan:MIYAGAWA", "x_contributors" : [ "Aaron Trevena ", @@ -139,6 +139,7 @@ "David E. Wheeler ", "David Schmidt ", "David Steinbrunner ", + "dmaestro ", "Eduardo Arino de la Rubia ", "Eric Johnson ", "Eugen Konkov ", @@ -230,6 +231,6 @@ "Yuval Kogman ", "\u5510\u9cf3 " ], - "x_serialization_backend" : "Cpanel::JSON::XS version 3.0217" + "x_serialization_backend" : "Cpanel::JSON::XS version 3.0231" } diff -Nru libplack-perl-1.0042/META.yml libplack-perl-1.0044/META.yml --- libplack-perl-1.0042/META.yml 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/META.yml 2017-04-27 17:46:51.000000000 +0000 @@ -9,7 +9,7 @@ ExtUtils::MakeMaker: '0' File::ShareDir::Install: '0.06' dynamic_config: 0 -generated_by: 'Dist::Milla version v1.0.16, Dist::Zilla version 6.007, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Milla version v1.0.17, Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -37,7 +37,7 @@ Hash::MultiValue: '0.05' Pod::Usage: '1.36' Stream::Buffered: '0.02' - Test::TCP: '2.00' + Test::TCP: '2.15' Try::Tiny: '0' URI: '1.59' WWW::Form::UrlEncoded: '0.23' @@ -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.0042' +version: '1.0044' x_authority: cpan:MIYAGAWA x_contributors: - 'Aaron Trevena ' @@ -81,6 +81,7 @@ - 'David E. Wheeler ' - 'David Schmidt ' - 'David Steinbrunner ' + - 'dmaestro ' - 'Eduardo Arino de la Rubia ' - 'Eric Johnson ' - 'Eugen Konkov ' @@ -171,4 +172,4 @@ - 'Yury Zavarin ' - 'Yuval Kogman ' - '唐鳳 ' -x_serialization_backend: 'YAML::Tiny version 1.69' +x_serialization_backend: 'YAML::Tiny version 1.70' diff -Nru libplack-perl-1.0042/t/author-pod-syntax.t libplack-perl-1.0044/t/author-pod-syntax.t --- libplack-perl-1.0042/t/author-pod-syntax.t 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/t/author-pod-syntax.t 2017-04-27 17:46:52.000000000 +0000 @@ -2,7 +2,7 @@ BEGIN { unless ($ENV{AUTHOR_TESTING}) { - print "1..0 # SKIP these tests are for testing by the author\n"; + print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } diff -Nru libplack-perl-1.0042/t/HTTP-Server-PSGI/harakiri.t libplack-perl-1.0044/t/HTTP-Server-PSGI/harakiri.t --- libplack-perl-1.0042/t/HTTP-Server-PSGI/harakiri.t 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/t/HTTP-Server-PSGI/harakiri.t 2017-04-27 17:46:52.000000000 +0000 @@ -1,7 +1,7 @@ use strict; use warnings; -use Plack::Runner; +use Plack::Loader; use Test::More; use Test::TCP; use Test::Requires qw(LWP::UserAgent); @@ -9,11 +9,11 @@ my $ua_timeout = 3; test_tcp( + listen => 1, server => sub { - my $port = shift; - my $runner = Plack::Runner->new; - $runner->parse_options("--host" => "127.0.0.1", "--port" => $port, "-E", "dev", "-s", "HTTP::Server::PSGI"); - $runner->run( + my $socket = shift; + my $server = Plack::Loader->auto(listen_sock => $socket); + $server->run( sub { my $env = shift; if ($env->{PATH_INFO} eq '/kill') { diff -Nru libplack-perl-1.0042/t/HTTP-Server-PSGI/listen.t libplack-perl-1.0044/t/HTTP-Server-PSGI/listen.t --- libplack-perl-1.0042/t/HTTP-Server-PSGI/listen.t 1970-01-01 00:00:00.000000000 +0000 +++ libplack-perl-1.0044/t/HTTP-Server-PSGI/listen.t 2017-04-27 17:46:52.000000000 +0000 @@ -0,0 +1,39 @@ +use strict; +use warnings; + +use HTTP::Server::PSGI; +use Test::More; +use Test::TCP; +use Test::Requires qw(LWP::UserAgent); + +my $ua_timeout = 3; + +test_tcp( + listen => 1, + server => sub { + my $socket = shift; + my $server = HTTP::Server::PSGI->new( + listen_sock => $socket, + ); + $server->run( + sub { + my $env = shift; + return [ + 200, + [ 'Content-Type' => 'text/plain' ], + [ "Hi" ], + ]; + }, + ); + }, + client => sub { + my $port = shift; + my $ua = LWP::UserAgent->new; + my $res = $ua->get("http://127.0.0.1:$port/"); + ok $res->is_success; + is $res->code, 200; + is $res->content, 'Hi'; + }, +); + +done_testing; diff -Nru libplack-perl-1.0042/t/HTTP-Server-PSGI/post.t libplack-perl-1.0044/t/HTTP-Server-PSGI/post.t --- libplack-perl-1.0042/t/HTTP-Server-PSGI/post.t 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/t/HTTP-Server-PSGI/post.t 2017-04-27 17:46:52.000000000 +0000 @@ -1,17 +1,17 @@ use strict; use warnings; -use Plack::Runner; +use Plack::Loader; use Test::More; use Test::TCP; use Test::Requires qw(LWP::UserAgent); test_tcp( + listen => 1, server => sub { - my $port = shift; - my $runner = Plack::Runner->new; - $runner->parse_options("--host" => "127.0.0.1", "--port" => $port, "-E", "dev", "-s", "HTTP::Server::PSGI"); - $runner->run( + my $socket = shift; + my $server = Plack::Loader->auto(listen_sock => $socket); + $server->run( sub { my $env = shift; my $buf = ''; diff -Nru libplack-perl-1.0042/t/Plack-Loader/restarter.t libplack-perl-1.0044/t/Plack-Loader/restarter.t --- libplack-perl-1.0042/t/Plack-Loader/restarter.t 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/t/Plack-Loader/restarter.t 2017-04-27 17:46:52.000000000 +0000 @@ -50,11 +50,12 @@ is $cb->()->content, $return_bodies[2]; }, + listen => 1, server => sub { - my $port = shift; + my $socket = shift; my $loader = Plack::Loader::Restarter->new; - my $server = $loader->auto(port => $port, host => '127.0.0.1'); + my $server = $loader->auto(listen_sock => $socket); $loader->preload_app($builder); $loader->watch('t'); $loader->run($server); diff -Nru libplack-perl-1.0042/t/Plack-Request/cookie.t libplack-perl-1.0044/t/Plack-Request/cookie.t --- libplack-perl-1.0042/t/Plack-Request/cookie.t 2016-09-29 05:37:37.000000000 +0000 +++ libplack-perl-1.0044/t/Plack-Request/cookie.t 2017-04-27 17:46:52.000000000 +0000 @@ -55,23 +55,4 @@ $cb->(HTTP::Request->new(GET => "/")); }; -$app = sub { - my $warn = 0; - local $SIG{__WARN__} = sub { $warn++ }; - - my $req = Plack::Request->new(shift); - - is $req->cookies->{Foo}, 'Bar'; - is $warn, 0; - - $req->new_response(200)->finalize; -}; - -test_psgi $app, sub { - my $cb = shift; - my $req = HTTP::Request->new(GET => "/"); - $req->header(Cookie => 'Foo=Bar,; Bar=Baz;'); - $cb->($req); -}; - done_testing; diff -Nru libplack-perl-1.0042/t/Plack-Request/headers.t libplack-perl-1.0044/t/Plack-Request/headers.t --- libplack-perl-1.0042/t/Plack-Request/headers.t 1970-01-01 00:00:00.000000000 +0000 +++ libplack-perl-1.0044/t/Plack-Request/headers.t 2017-04-27 17:46:52.000000000 +0000 @@ -0,0 +1,25 @@ +use strict; +use warnings; +use Test::More; + +use Plack::Test; +use Plack::Request; +use HTTP::Request::Common; + +my $app = sub { + my $env = shift; + my $req = Plack::Request->new($env); + + return [200, ['Content-Type', 'text/plain'], [ $req->headers->as_string ]]; +}; + +my $test = Plack::Test->create($app); + +my $res = $test->request(GET '/', 'Foo' => 1, 'foo-bar' => 1, 'www-authenticate' => 'basic bar'); + +like $res->content, qr/Foo: 1/, 'no uppercase'; +like $res->content, qr/Foo-Bar: 1/, 'standard casing'; +like $res->content, qr/Host: localhost/, 'standard casing'; +like $res->content, qr/WWW-Authenticate: basic bar/, 'standard casing'; + +done_testing;