From 0fea7793b22efd2596983283947ee43687e0cfac Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 17 Aug 2015 07:46:54 +0000 Subject: mid: compress Message-IDs with '%' in them Some HTTP servers (apache2 2.2.22-13+deb7u5) on my system apparently do not handle "%25" correctly. I'm not yet sure if it's something weird with my rewrite rules or what.... --- t/view.t | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't') diff --git a/t/view.t b/t/view.t index 3107285c..463fc076 100644 --- a/t/view.t +++ b/t/view.t @@ -144,4 +144,13 @@ EOF like($html, qr/\bhi = bye\b/, "HTML output decoded QP"); } + +{ # XXX dirty hack + use PublicInbox::MID qw/mid_compressed/; + like(mid_compressed('foo%bar@wtf'), qr/\A[a-f0-9]{40}\z/, + "percent always converted to sha1 to workaround buggy httpds"); + is(mid_compressed('foobar@wtf'), 'foobar@wtf', + 'regular MID not compressed'); +} + done_testing(); -- cgit v1.2.3-24-ge0c7