]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/HTTP.pm
rename reference to git epochs as "partitions"
[public-inbox.git] / lib / PublicInbox / HTTP.pm
index 11bd241e91a1661d316a7f3d037f047b938762df..977614b489d80143c75ebe366513194e5d4977cb 100644 (file)
@@ -18,6 +18,7 @@ use Plack::HTTPParser qw(parse_http_request); # XS or pure Perl
 use HTTP::Status qw(status_message);
 use HTTP::Date qw(time2str);
 use IO::Handle;
+require PublicInbox::EvCleanup;
 use constant {
        CHUNK_START => -1,   # [a-f0-9]+\r\n
        CHUNK_END => -2,     # \r\n
@@ -141,7 +142,7 @@ sub app_dispatch {
        $env->{REMOTE_ADDR} = $self->{remote_addr};
        $env->{REMOTE_PORT} = $self->{remote_port};
        if (my $host = $env->{HTTP_HOST}) {
-               $host =~ s/:(\d+)\z// and $env->{SERVER_PORT} = $1;
+               $host =~ s/:([0-9]+)\z// and $env->{SERVER_PORT} = $1;
                $env->{SERVER_NAME} = $host;
        }
        if (defined $input) {