about summary refs log tree commit homepage
path: root/lib/PublicInbox/NNTP.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-08-14 10:21:09 +0000
committerEric Wong <e@80x24.org>2016-08-14 10:51:02 +0000
commit9d1e5fadd7d18f4c96ab0509d673040e34225a04 (patch)
treedd89df05390a2ca2e06448ec0acdbf741729d36e /lib/PublicInbox/NNTP.pm
parent1d0ce406b75fc174bee51e77efe5f10c61fb6098 (diff)
downloadpublic-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/NNTP.pm')
-rw-r--r--lib/PublicInbox/NNTP.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index 0c61dd8a..7bfc6dd6 100644
--- a/lib/PublicInbox/NNTP.pm
+++ b/lib/PublicInbox/NNTP.pm
@@ -9,12 +9,12 @@ use base qw(Danga::Socket);
 use fields qw(nntpd article rbuf ng long_res);
 use PublicInbox::Search;
 use PublicInbox::Msgmap;
+use PublicInbox::MID qw(mid_escape);
 use PublicInbox::Git;
 require PublicInbox::EvCleanup;
 use Email::Simple;
 use POSIX qw(strftime);
 use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC);
-use URI::Escape qw(uri_escape_utf8);
 use constant {
         r501 => '501 command syntax error',
         r221 => '221 Header follows',
@@ -421,7 +421,7 @@ sub set_nntp_headers {
         $hdr->header_set('Xref', xref($ng, $n));
         header_append($hdr, 'List-Post', "<mailto:$ng->{-primary_address}>");
         if (my $url = $ng->base_url) {
-                $mid = uri_escape_utf8($mid);
+                $mid = mid_escape($mid);
                 header_append($hdr, 'Archived-At', "<$url$mid/>");
                 header_append($hdr, 'List-Archive', "<$url>");
         }