]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
git: lowercase host in host_prefix_url
authorEric Wong <e@80x24.org>
Tue, 9 Jan 2024 11:39:26 +0000 (11:39 +0000)
committerEric Wong <e@80x24.org>
Wed, 10 Jan 2024 10:26:57 +0000 (10:26 +0000)
This will make it more effective for use as a cache key.
I'm not entirely happy with this sub being in the Git module
since it's used by lei and command-line tools, but that's
for another day to deal with...

lib/PublicInbox/Git.pm

index 7b991c6b3be0c3e2c52a46ddc2449107c00b4db1..f125b0291934af42c5677293f22c7f2140e926aa 100644 (file)
@@ -505,7 +505,7 @@ sub host_prefix_url ($$) {
        my $host_port = $env->{HTTP_HOST} //
                "$env->{SERVER_NAME}:$env->{SERVER_PORT}";
        my $sn = $env->{SCRIPT_NAME} // '';
-       "$env->{'psgi.url_scheme'}://$host_port$sn/$url";
+       "$env->{'psgi.url_scheme'}://\L$host_port\E$sn/$url";
 }
 
 sub base_url { # for coderepos, PSGI-only