]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/httpd-corner.psgi
qspawn: learn to gzip streaming responses
[public-inbox.git] / t / httpd-corner.psgi
index 44629620051eb52424675545f506d1691306ef2a..cb41cfa0512d059a00382bc6683c3f0982bab80b 100644 (file)
@@ -94,6 +94,13 @@ my $app = sub {
                return $qsp->psgi_return($env, undef, sub {
                        [ 200, [ qw(Content-Type application/octet-stream)]]
                });
+       } elsif ($path eq '/psgi-return-compressible') {
+               require PublicInbox::Qspawn;
+               my $cmd = [qw(echo goodbye world)];
+               my $qsp = PublicInbox::Qspawn->new($cmd);
+               return $qsp->psgi_return($env, undef, sub {
+                       [200, [qw(Content-Type text/plain)]]
+               });
        } elsif ($path eq '/psgi-return-enoent') {
                require PublicInbox::Qspawn;
                my $cmd = [ 'this-better-not-exist-in-PATH'.rand ];