X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FNewsWWW.pm;h=01e34d7b136b9d87e1931f4bac43b635c048de95;hb=3d41aa23f35501ca92aab8aa42980fa73f7fa74f;hp=908c43510dbd8f41bf6ce48dfb2e6212e771fcff;hpb=3f779258173530ca88f31e1dc5332f951d2c44cd;p=public-inbox.git
diff --git a/lib/PublicInbox/NewsWWW.pm b/lib/PublicInbox/NewsWWW.pm
index 908c4351..01e34d7b 100644
--- a/lib/PublicInbox/NewsWWW.pm
+++ b/lib/PublicInbox/NewsWWW.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 all contributors
+# Copyright (C) 2016-2018 all contributors
# License: AGPL-3.0+
#
# Plack app redirector for mapping /$NEWSGROUP requests to
@@ -9,7 +9,7 @@ package PublicInbox::NewsWWW;
use strict;
use warnings;
use PublicInbox::Config;
-use URI::Escape qw(uri_escape_utf8);
+use PublicInbox::MID qw(mid_escape);
sub new {
my ($class, $pi_config) = @_;
@@ -35,7 +35,7 @@ sub call {
# article IDs are not stable across clones,
# do not encourage caching/bookmarking them
$code = 302;
- $url .= uri_escape_utf8($mid) . '/';
+ $url .= mid_escape($mid) . '/';
}
}
@@ -43,7 +43,7 @@ sub call {
return [ $code, $h, [ "Redirecting to $url\n" ] ]
}
- [ 404, [ 'Content-Type' => 'text/plain' ], [] ];
+ [ 404, [ 'Content-Type' => 'text/plain' ], [ "404 Not Found\n" ] ];
}
1;