From: Eric Wong Date: Fri, 25 Dec 2015 11:21:40 +0000 (+0000) Subject: examples/public-inbox.psgi: make output chunky by default X-Git-Tag: v1.0.0~768 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=a5409589fe53734ed073dddb15f0a8033052986b;hp=0deae67a5ee9760ce500a8a989071aa4ce08b05e examples/public-inbox.psgi: make output chunky by default HTTP/1.1 clients will want persistent connections and need to know response terminations. --- 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