From 97bef984363d1279a6ac130d35f063a834e9c241 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Sep 2015 08:55:25 +0000 Subject: www: root atom feed is "new.atom" and not "atom.xml" The MIME type entry for Atom feed relies on "atom", so allow properly-configured static file servers to serve it with the correct Content-Type header. --- lib/PublicInbox/Feed.pm | 4 ++-- lib/PublicInbox/WWW.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 1fef9849..9d581935 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -287,11 +287,11 @@ sub get_feedopts { if (my $mid = $ctx->{mid}) { # per-thread feed: $rv{atomurl} = "$url_base/t/$mid/atom"; } else { - $rv{atomurl} = "$url_base/atom.xml"; + $rv{atomurl} = "$url_base/new.atom"; } } else { $url_base = "http://example.com"; - $rv{atomurl} = "$url_base/atom.xml"; + $rv{atomurl} = "$url_base/new.atom"; } $rv{url} ||= "$url_base/"; $rv{midurl} = "$url_base/m/"; diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 278d786d..a9cb6d71 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -34,7 +34,7 @@ sub run { invalid_list(\%ctx, $1) || redirect_list_index($cgi); } elsif ($path_info =~ m!$LISTNAME_RE(?:/|/index\.html)?\z!o) { invalid_list(\%ctx, $1) || get_index(\%ctx); - } elsif ($path_info =~ m!$LISTNAME_RE/atom\.xml\z!o) { + } elsif ($path_info =~ m!$LISTNAME_RE/(?:atom\.xml|new\.atom)\z!o) { invalid_list(\%ctx, $1) || get_atom(\%ctx); # single-message pages @@ -128,7 +128,7 @@ sub invalid_list_mid { $ret; } -# /$LISTNAME/atom.xml -> Atom feed, includes replies +# /$LISTNAME/new.atom -> Atom feed, includes replies sub get_atom { my ($ctx) = @_; require PublicInbox::Feed; -- cgit v1.2.3-24-ge0c7