X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=t%2Fhttpd-corner.psgi;h=f2427234c05afa8803868c25168af0c01a0d7a90;hp=35d1216ec761e92134647ae50dec3a8bd8565f2a;hb=a71cb67a1237c450a9cbbd6738c5af3b73ba4c61;hpb=decbb9936a25dfedf6ecd916d8e0403f06217ec9 diff --git a/t/httpd-corner.psgi b/t/httpd-corner.psgi index 35d1216e..f2427234 100644 --- a/t/httpd-corner.psgi +++ b/t/httpd-corner.psgi @@ -85,6 +85,15 @@ my $app = sub { close $null; [ 200, [ qw(Content-Type application/octet-stream) ]]; }); + } elsif ($path eq '/psgi-return-gzip') { + require PublicInbox::Qspawn; + require PublicInbox::GzipFilter; + my $cmd = [qw(echo hello world)]; + my $qsp = PublicInbox::Qspawn->new($cmd); + $env->{'qspawn.filter'} = PublicInbox::GzipFilter->new; + return $qsp->psgi_return($env, undef, sub { + [ 200, [ qw(Content-Type application/octet-stream)]] + }); } elsif ($path eq '/pid') { $code = 200; push @$body, "$$\n";