about summary refs log tree commit homepage
path: root/t/httpd-corner.psgi
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-05-21 05:27:06 +0000
committerEric Wong <e@80x24.org>2016-05-21 05:30:10 +0000
commit57b18b44e1770b163aba55eacf53195a8305398e (patch)
treedaae849408c649ab8aaa8cd100055de34873f7e2 /t/httpd-corner.psgi
parent97d3489257811dad5381ca8b114d1b0c45554a20 (diff)
downloadpublic-inbox-57b18b44e1770b163aba55eacf53195a8305398e.tar.gz
This hopefully makes the intent of the code clearer, too.
The the HTTP use of the numeric reference for getline
caused problems in Git.pm, already.
Diffstat (limited to 't/httpd-corner.psgi')
-rw-r--r--t/httpd-corner.psgi2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/httpd-corner.psgi b/t/httpd-corner.psgi
index 2f7be832..222b9e01 100644
--- a/t/httpd-corner.psgi
+++ b/t/httpd-corner.psgi
@@ -30,6 +30,7 @@ my $app = sub {
                         return sub {
                                 open my $f, '<', $fifo or
                                                 die "open $fifo: $!\n";
+                                local $/ = "\n";
                                 my @r = <$f>;
                                 $_[0]->([200, $h, \@r ]);
                         };
@@ -38,6 +39,7 @@ my $app = sub {
                                 my $fh = $_[0]->([200, $h]);
                                 open my $f, '<', $fifo or
                                                 die "open $fifo: $!\n";
+                                local $/ = "\n";
                                 while (defined(my $l = <$f>)) {
                                         $fh->write($l);
                                 }