about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-09-03 08:28:54 +0000
committerEric Wong <e@80x24.org>2015-09-03 08:28:54 +0000
commit68c9dd7c0e6dc21dfd546ceeadd5da030900a971 (patch)
treeacd0154a8828565fcd3afa36c04b70ac8e52a758 /lib
parent4c1a95b7860f16975aa055e2c11481e791b513d5 (diff)
downloadpublic-inbox-68c9dd7c0e6dc21dfd546ceeadd5da030900a971.tar.gz
We do not want to get legacy URLs swallowed up by our workaround
for weird and wonky servers that attempt to unescape PATH_INFO
before the app sees it.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/WWW.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index 6eebf628..e8b35cb2 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -42,11 +42,6 @@ sub run {
         } elsif ($path_info =~ m!$LISTNAME_RE/$MID_RE/$END_RE\z!o) {
                 msg_page($ctx, $1, $2, $3);
 
-        # some Message-IDs have slashes in them and the HTTP server
-        # may try to be clever and unescape them :<
-        } elsif ($path_info =~ m!$LISTNAME_RE/(\S+/\S+)/$END_RE\z!o) {
-                msg_page($ctx, $1, $2, $3);
-
         # convenience redirects order matters
         } elsif ($path_info =~ m!$LISTNAME_RE/([^/]{2,})\z!o) {
                 r301($ctx, $1, $2);
@@ -354,6 +349,11 @@ sub legacy_redirects {
         } elsif ($path_info =~ m!$LISTNAME_RE/f/(\S+)\z!o) {
                 r301($ctx, $1, $2, 'f/');
 
+        # some Message-IDs have slashes in them and the HTTP server
+        # may try to be clever and unescape them :<
+        } elsif ($path_info =~ m!$LISTNAME_RE/(\S+/\S+)/$END_RE\z!o) {
+                msg_page($ctx, $1, $2, $3);
+
         } else {
                 r404();
         }