about summary refs log tree commit homepage
path: root/t/httpd-corner.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-25 00:29:39 +0000
committerEric Wong <e@80x24.org>2023-10-25 07:28:42 +0000
commit3e634c22ceff4736d3c34d3496e7e5519e6ef356 (patch)
tree25472585f4c93917125b95457fbed3ee975cc2be /t/httpd-corner.t
parent6fe457251172f2f59a4e0a89be2a56913e88f2ad (diff)
downloadpublic-inbox-3e634c22ceff4736d3c34d3496e7e5519e6ef356.tar.gz
Now that psgi_yield is used everywhere, the more complex
psgi_return and it's helper bits can be removed.  We'll also fix
some outdated comments now that everything on psgi_return has
switched to psgi_yield.  GetlineResponse replaces GetlineBody
and does a better job of isolating generic PSGI-only code.
Diffstat (limited to 't/httpd-corner.t')
-rw-r--r--t/httpd-corner.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/httpd-corner.t b/t/httpd-corner.t
index aab3635c..2d2d1061 100644
--- a/t/httpd-corner.t
+++ b/t/httpd-corner.t
@@ -374,13 +374,13 @@ SKIP: {
         is($non_zero, 0, 'read all zeros');
 
         require_mods(@zmods, 4);
-        my $buf = xqx([$curl, '-gsS', "$base/psgi-return-gzip"]);
+        my $buf = xqx([$curl, '-gsS', "$base/psgi-yield-gzip"]);
         is($?, 0, 'curl succesful');
         IO::Uncompress::Gunzip::gunzip(\$buf => \(my $out));
         is($out, "hello world\n");
         my $curl_rdr = { 2 => \(my $curl_err = '') };
         $buf = xqx([$curl, qw(-gsSv --compressed),
-                        "$base/psgi-return-compressible"], undef, $curl_rdr);
+                        "$base/psgi-yield-compressible"], undef, $curl_rdr);
         is($?, 0, 'curl --compressed successful');
         is($buf, "goodbye world\n", 'gzipped response as expected');
         like($curl_err, qr/\bContent-Encoding: gzip\b/,
@@ -388,8 +388,8 @@ SKIP: {
 }
 
 {
-        my $conn = conn_for($sock, 'psgi_return ENOENT');
-        print $conn "GET /psgi-return-enoent HTTP/1.1\r\n\r\n" or die;
+        my $conn = conn_for($sock, 'psgi_yield ENOENT');
+        print $conn "GET /psgi-yield-enoent HTTP/1.1\r\n\r\n" or die;
         my $buf = '';
         sysread($conn, $buf, 16384, length($buf)) until $buf =~ /\r\n\r\n/;
         like($buf, qr!HTTP/1\.[01] 500\b!, 'got 500 error on ENOENT');
@@ -678,13 +678,13 @@ SKIP: {
         my $app = require $psgi;
         test_psgi($app, sub {
                 my ($cb) = @_;
-                my $req = GET('http://example.com/psgi-return-gzip');
+                my $req = GET('http://example.com/psgi-yield-gzip');
                 my $res = $cb->($req);
                 my $buf = $res->content;
                 IO::Uncompress::Gunzip::gunzip(\$buf => \(my $out));
                 is($out, "hello world\n", 'got expected output');
 
-                $req = GET('http://example.com/psgi-return-enoent');
+                $req = GET('http://example.com/psgi-yield-enoent');
                 $res = $cb->($req);
                 is($res->code, 500, 'got error on ENOENT');
                 seek($tmperr, 0, SEEK_SET) or die;