diff options
author | Eric Wong <e@80x24.org> | 2016-08-14 10:21:09 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-08-14 10:51:02 +0000 |
commit | 9d1e5fadd7d18f4c96ab0509d673040e34225a04 (patch) | |
tree | dd89df05390a2ca2e06448ec0acdbf741729d36e /lib/PublicInbox/WWW.pm | |
parent | 1d0ce406b75fc174bee51e77efe5f10c61fb6098 (diff) | |
download | public-inbox-9d1e5fadd7d18f4c96ab0509d673040e34225a04.tar.gz |
Based on reading RFC 3986, it seems '@', ':', '!', '$', '&', "'", '; '(', ')', '*', '+', ',', ';', '=' are all allowed in path-absolute where we have the Message-ID. In any case, it seems '@' is fairly common in path components nowadays and too common in Message-IDs.
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r-- | lib/PublicInbox/WWW.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 60cb4430..6f6a0033 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -15,7 +15,8 @@ use strict; use warnings; use PublicInbox::Config; use PublicInbox::Hval; -use URI::Escape qw(uri_escape_utf8 uri_unescape); +use URI::Escape qw(uri_unescape); +use PublicInbox::MID qw(mid_escape); require PublicInbox::Git; use PublicInbox::GitHTTPBackend; our $INBOX_RE = qr!\A/([\w\.\-]+)!; @@ -353,7 +354,7 @@ sub r301 { } my $url = $obj->base_url($ctx->{env}); my $qs = $ctx->{env}->{QUERY_STRING}; - $url .= (uri_escape_utf8($mid) . '/') if (defined $mid); + $url .= (mid_escape($mid) . '/') if (defined $mid); $url .= $suffix if (defined $suffix); $url .= "?$qs" if $qs ne ''; |