From a5409589fe53734ed073dddb15f0a8033052986b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 25 Dec 2015 11:21:40 +0000 Subject: examples/public-inbox.psgi: make output chunky by default HTTP/1.1 clients will want persistent connections and need to know response terminations. --- examples/public-inbox.psgi | 1 + t/plack.t | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/public-inbox.psgi b/examples/public-inbox.psgi index b0b9ae98..4d34b426 100644 --- a/examples/public-inbox.psgi +++ b/examples/public-inbox.psgi @@ -12,6 +12,7 @@ use Plack::Builder; my $have_deflater = eval { require Plack::Middleware::Deflater; 1 }; builder { + enable 'Plack::Middleware::Chunked'; if ($have_deflater) { enable "Deflater", content_type => [ 'text/html', 'text/plain', diff --git a/t/plack.t b/t/plack.t index 560080f0..31ec58da 100644 --- a/t/plack.t +++ b/t/plack.t @@ -116,7 +116,7 @@ EOF my ($cb) = @_; my $res = $cb->(GET($pfx . '/blah%40example.com/raw')); is(200, $res->code, 'success response received for /*/raw'); - like($res->content, qr!\AFrom !, "mbox returned"); + like($res->content, qr!^From !sm, "mbox returned"); }); # legacy redirects -- cgit v1.2.3-24-ge0c7