diff options
author | Eric Wong <e@yhbt.net> | 2020-03-26 08:21:29 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-03-26 23:47:10 +0000 |
commit | 5513e163236d8a64411050ae2e1f87aa8d24f023 (patch) | |
tree | 042b0ffbfa2d7f3590500eb0d0c2d39f3bc2a9ec /lib/PublicInbox/WWW.pm | |
parent | 53d2c5c6d98465c33f6f257be0b99fcf5cbe38c7 (diff) | |
download | public-inbox-5513e163236d8a64411050ae2e1f87aa8d24f023.tar.gz |
Seeing the example config linkified, some users may inevitably try to following it in a browser with a GET request. Provide a helpful message to inform users to use POST instead of attempting to treat /$INBOX/$ALTID.sql.gz as a Message-Id.
Diffstat (limited to 'lib/PublicInbox/WWW.pm')
-rw-r--r-- | lib/PublicInbox/WWW.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 56d2c42a..275e509f 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -125,6 +125,8 @@ sub call { get_vcs_object($ctx, $1, $2, $3); } elsif ($path_info =~ m!$INBOX_RE/($OID_RE)/s\z!o) { r301($ctx, $1, $2, 's/'); + } elsif ($path_info =~ m!$INBOX_RE/(\w+)\.sql\.gz\z!o) { + get_altid_dump($ctx, $1, $2); # convenience redirects order matters } elsif ($path_info =~ m!$INBOX_RE/([^/]{2,})\z!o) { r301($ctx, $1, $2); |