From e5b18ce1fb0a71099db31dbb2b57b220c1815ef7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 9 Jan 2024 11:39:26 +0000 Subject: git: lowercase host in host_prefix_url 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index 7b991c6b..f125b029 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -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 -- cgit v1.2.3-24-ge0c7