diff options
author | Eric Wong <e@80x24.org> | 2016-03-06 02:09:21 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-03-06 02:10:27 +0000 |
commit | 417da3e8e52776ca539572dbc023ad02bb359dd1 (patch) | |
tree | d7050bb27eb5037bfd84c22a8d7ecbb983651c3d /lib/PublicInbox/HTTP.pm | |
parent | 90d7c7c49b6af90624cca042deb9af38a5e44a2f (diff) | |
download | public-inbox-417da3e8e52776ca539572dbc023ad02bb359dd1.tar.gz |
We cannot rely on a client socket having a PSGI env before headers are fully-parsed as we seek to avoid storing hashes for idle clients. Sso print errors to the psgi.errors value which belongs to the httpd listener, instead.
Diffstat (limited to 'lib/PublicInbox/HTTP.pm')
-rw-r--r-- | lib/PublicInbox/HTTP.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm index 8988e7d2..15db1390 100644 --- a/lib/PublicInbox/HTTP.pm +++ b/lib/PublicInbox/HTTP.pm @@ -251,7 +251,7 @@ sub env_chunked { ($_[0]->{HTTP_TRANSFER_ENCODING} || '') =~ /\bchunked\b/i } sub write_err { my ($self) = @_; - my $err = $self->{env}->{'psgi.errors'}; + my $err = $self->{httpd}->{env}->{'psgi.errors'}; my $msg = $! || '(zero write)'; $err->print("error buffering to input: $msg\n"); quit($self, 500); @@ -264,7 +264,7 @@ sub recv_err { $self->{input_left} = $len; return; } - my $err = $self->{env}->{'psgi.errors'}; + my $err = $self->{httpd}->{env}->{'psgi.errors'}; $err->print("error reading for input: $! ($len bytes remaining)\n"); quit($self, 500); } |