* [PATCH 1/7] t/plack: ensure we can cascade on common endpoints
2016-05-28 1:57 4% [PATCH 0/7] miscellaneous cleanups Eric Wong
@ 2016-05-28 1:57 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-05-28 1:57 UTC (permalink / raw)
To: meta
We don't serve things like robots.txt, favicon.ico, or
.well-known/ endpoints ourselves, but ensure we can be
used with Plack::App::Cascade for others.
---
t/plack.t | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/t/plack.t b/t/plack.t
index 04680b2..a4f3245 100644
--- a/t/plack.t
+++ b/t/plack.t
@@ -62,16 +62,24 @@ EOF
require $psgi;
};
+ test_psgi($app, sub {
+ my ($cb) = @_;
+ foreach my $u (qw(robots.txt favicon.ico .well-known/foo)) {
+ my $res = $cb->(GET("http://example.com/$u"));
+ is($res->code, 404, "$u is missing");
+ }
+ });
+
# redirect with newsgroup
test_psgi($app, sub {
my ($cb) = @_;
my $from = 'http://example.com/inbox.test';
my $to = 'http://example.com/test/';
my $res = $cb->(GET($from));
- is($res->code, 301, 'is permanent redirect');
+ is($res->code, 301, 'newsgroup name is permanent redirect');
is($to, $res->header('Location'), 'redirect location matches');
$from .= '/';
- is($res->code, 301, 'is permanent redirect');
+ is($res->code, 301, 'newsgroup name/ is permanent redirect');
is($to, $res->header('Location'), 'redirect location matches');
});
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/7] miscellaneous cleanups
@ 2016-05-28 1:57 4% Eric Wong
2016-05-28 1:57 7% ` [PATCH 1/7] t/plack: ensure we can cascade on common endpoints Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-05-28 1:57 UTC (permalink / raw)
To: meta
Only the last one (NewsGroup class removal for ::Inbox) is
likely to cause problems but I'll be checking logs for
errors.
Eric Wong (7):
t/plack: ensure we can cascade on common endpoints
http: clarify comments about layering violation
Makefile.PL: allow N to be overridden
examples: config no longer supports atomUrl
www: remove footer_html support
config: remove try_cat
remove redundant NewsGroup class
MANIFEST | 1 -
Makefile.PL | 2 +-
examples/public-inbox-config | 1 -
lib/PublicInbox/Config.pm | 49 +++++++++++++++-----------
lib/PublicInbox/HTTP.pm | 6 ++--
lib/PublicInbox/Inbox.pm | 17 ++++-----
lib/PublicInbox/NNTP.pm | 9 ++---
lib/PublicInbox/NNTPD.pm | 27 ++++----------
lib/PublicInbox/NewsGroup.pm | 84 --------------------------------------------
lib/PublicInbox/NewsWWW.pm | 38 ++------------------
lib/PublicInbox/WWW.pm | 6 ++--
t/config.t | 2 ++
t/nntp.t | 15 +++++---
t/nntpd.t | 4 ++-
t/plack.t | 12 +++++--
15 files changed, 83 insertions(+), 190 deletions(-)
^ permalink raw reply [relevance 4%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-05-28 1:57 4% [PATCH 0/7] miscellaneous cleanups Eric Wong
2016-05-28 1:57 7% ` [PATCH 1/7] t/plack: ensure we can cascade on common endpoints Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).