about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-08-04 08:16:57 +0000
committerEric Wong <e@80x24.org>2022-08-04 20:09:32 +0000
commite28e9985f8b93ba5b0009f66be3b214f5fdea9b5 (patch)
tree34f13bccc54c4131f9e52a6e9004c2920eb33f95
parent26aac1eb5bb6ab22504b841e4898be6ed2ee3468 (diff)
downloadpublic-inbox-e28e9985f8b93ba5b0009f66be3b214f5fdea9b5.tar.gz
This may save a few bytes with many connected clients.
Noticed while working on the JMAP endpoint.
-rw-r--r--lib/PublicInbox/HTTP.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm
index 669211e3..3d4e3499 100644
--- a/lib/PublicInbox/HTTP.pm
+++ b/lib/PublicInbox/HTTP.pm
@@ -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) {