* [PATCH 4/6] git: lowercase host in host_prefix_url
2024-01-09 11:39 4% [PATCH 0/6] WWW updates Eric Wong
@ 2024-01-09 11:39 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2024-01-09 11:39 UTC (permalink / raw)
To: meta
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
^ permalink raw reply related [relevance 7%]
* [PATCH 0/6] WWW updates
@ 2024-01-09 11:39 4% Eric Wong
2024-01-09 11:39 7% ` [PATCH 4/6] git: lowercase host in host_prefix_url Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2024-01-09 11:39 UTC (permalink / raw)
To: meta
1/6 is something I hit on FreeBSD *shrug*
3/6 came out of an abandoned (for now) idea for the cache in 5/6
4/6 is preparation for 5/6
5/6 linkification is something I've wanted for a while, but held
off since it could get expensive and WWW is already slow enough.
More WWW stuff on the way to wire up coderepos for the release
(6/6 is the start of that) but ugh, my mind wanders towards
weird optimization ideas instead :x
Eric Wong (6):
git: workaround occasional -watch error message
doc: txt2pre: linkify -extindex(1), dedupe -config(5)
test_common: key2sub: don't require final ';' in scripts
git: lowercase host in host_prefix_url
www: linkify inbox addresses in To/Cc headers
www: use autodie in more coderepo places
Documentation/txt2pre | 2 +-
lib/PublicInbox/Git.pm | 13 ++++++-
lib/PublicInbox/SearchView.pm | 2 +-
lib/PublicInbox/TestCommon.pm | 2 +-
lib/PublicInbox/View.pm | 70 ++++++++++++++++++++++++++++++----
lib/PublicInbox/ViewVCS.pm | 11 ++----
lib/PublicInbox/WwwCoderepo.pm | 5 ++-
7 files changed, 84 insertions(+), 21 deletions(-)
^ permalink raw reply [relevance 4%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2024-01-09 11:39 4% [PATCH 0/6] WWW updates Eric Wong
2024-01-09 11:39 7% ` [PATCH 4/6] git: lowercase host in host_prefix_url Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).