From 9d1e5fadd7d18f4c96ab0509d673040e34225a04 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 14 Aug 2016 10:21:09 +0000 Subject: www: do not unecessarily escape some chars in paths 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. --- lib/PublicInbox/Mbox.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Mbox.pm') diff --git a/lib/PublicInbox/Mbox.pm b/lib/PublicInbox/Mbox.pm index dc41548b..fd623f6d 100644 --- a/lib/PublicInbox/Mbox.pm +++ b/lib/PublicInbox/Mbox.pm @@ -6,8 +6,7 @@ package PublicInbox::Mbox; use strict; use warnings; -use PublicInbox::MID qw/mid_clean/; -use URI::Escape qw/uri_escape_utf8/; +use PublicInbox::MID qw/mid_clean mid_escape/; require Email::Simple; sub emit1 { @@ -29,7 +28,7 @@ sub msg_str { my $ibx = $ctx->{-inbox}; my $base = $ibx->base_url($ctx->{env}); my $mid = mid_clean($header_obj->header('Message-ID')); - $mid = uri_escape_utf8($mid); + $mid = mid_escape($mid); my @append = ( 'Archived-At', "<$base$mid/>", 'List-Archive', "<$base>", -- cgit v1.2.3-24-ge0c7