]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/HTTP.pm
http: coerce SERVER_PORT to integer
[public-inbox.git] / lib / PublicInbox / HTTP.pm
index 669211e38099fbacf3e4b4309deeced1568c5d00..3d4e34995dfbd9f11749c052ec7f6766331177f5 100644 (file)
@@ -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) {