about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-02-29 00:11:23 +0000
committerEric Wong <e@80x24.org>2016-02-29 00:27:41 +0000
commit9b12760f530967f7200d04c9d8b5c0b27d9e1283 (patch)
treea2b67c3c3ed262f355863a4c8cf382e5f58ba5b9 /lib
parent997e3033e58dfd101d5e5bb7491c609fde75099f (diff)
downloadpublic-inbox-9b12760f530967f7200d04c9d8b5c0b27d9e1283.tar.gz
Just in case we screwed up somewhere, we need to match up
syswrite to sysseek and we also favor procedural calls for
native types.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/HTTP.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index 928c0f22..4d771f2b 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -109,7 +109,7 @@ sub app_dispatch ($) {
                 $host =~ s/:(\d+)\z// and $env->{SERVER_PORT} = $1;
                 $env->{SERVER_NAME} = $host;
         }
-        $env->{'psgi.input'}->seek(0, SEEK_SET);
+        sysseek($env->{'psgi.input'}, 0, SEEK_SET) or die "input seek failed: $!";
         my $res = Plack::Util::run_app($self->{httpd}->{app}, $env);
         eval {
                 if (ref($res) eq 'CODE') {
@@ -204,7 +204,7 @@ sub event_write {
         if ($self->{rbuf} eq '') {
                 $self->watch_read(1);
         } else {
-                # avoid recursion
+                # avoid recursion for pipelined requests
                 Danga::Socket->AddTimer(0, sub { rbuf_process($self) });
         }
 }