]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/HTTP.pm
eofpipe: drop {arg} support for now
[public-inbox.git] / lib / PublicInbox / HTTP.pm
index 669211e38099fbacf3e4b4309deeced1568c5d00..0dba425dd6354d4925fa82b49a24ea669a16db76 100644 (file)
@@ -69,7 +69,7 @@ sub new ($$$) {
 
 sub event_step { # called by PublicInbox::DS
        my ($self) = @_;
-
+       local $SIG{__WARN__} = $self->{srv_env}->{'pi-httpd.warn_cb'};
        return unless $self->flush_write && $self->{sock};
 
        # only read more requests if we've drained the write buffer,
@@ -135,7 +135,7 @@ sub app_dispatch {
        $env->{REMOTE_ADDR} = $self->{remote_addr};
        $env->{REMOTE_PORT} = $self->{remote_port};
        if (defined(my $host = $env->{HTTP_HOST})) {
-               $host =~ s/:([0-9]+)\z// and $env->{SERVER_PORT} = $1;
+               $host =~ s/:([0-9]+)\z// and $env->{SERVER_PORT} = $1 + 0;
                $env->{SERVER_NAME} = $host;
        }
        if (defined $input) {