diff options
author | Eric Wong <e@80x24.org> | 2014-04-12 00:49:34 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2014-04-12 00:49:34 +0000 |
commit | c394de9f2c91c2c5ed1f7832a5a7cc0206120b7f (patch) | |
tree | c62cf7391c8f0d5dafe47806bc0dd768a9d58569 /public-inbox.cgi | |
parent | 6e4654d5c509a2772f9fa8dcd0c46e05ca5feaea (diff) | |
download | public-inbox-c394de9f2c91c2c5ed1f7832a5a7cc0206120b7f.tar.gz |
We may have something like /foo.cgi/m/$MID.html in there.
Diffstat (limited to 'public-inbox.cgi')
-rwxr-xr-x | public-inbox.cgi | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/public-inbox.cgi b/public-inbox.cgi index 6a6f31e2..fb435777 100755 --- a/public-inbox.cgi +++ b/public-inbox.cgi @@ -16,7 +16,7 @@ use CGI qw(:cgi :escapeHTML -nosticky); # PSGI/FastCGI/mod_perl compat use Encode qw(decode_utf8); use PublicInbox::Config; use Digest::SHA qw(sha1_hex); -our $LISTNAME_RE = qr!\A/([\w\.\-]+)!; +our $LISTNAME_RE = qr!\A(?:/.*?)?/([\w\.\-]+)!; our $pi_config; BEGIN { $pi_config = PublicInbox::Config->new; @@ -55,7 +55,7 @@ sub main { # top-level indices and feeds if ($path_info eq "/") { r404(); - } elsif ($path_info =~ m!$LISTNAME_RE(?:/|/index\.html)?\z!o) { + } elsif ($path_info =~ m!$LISTNAME_RE/(?:index\.html)?\z!o) { invalid_list(\%ctx, $1) || get_index(\%ctx, $cgi, 1); } elsif ($path_info =~ m!$LISTNAME_RE/index\.atom\.xml\z!o) { invalid_list(\%ctx, $1) || get_atom(\%ctx, $cgi, 1); |