]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/check-www-inbox: warn on missing Content-Type
authorEric Wong <e@80x24.org>
Mon, 21 Jan 2019 03:09:22 +0000 (03:09 +0000)
committerEric Wong <e@80x24.org>
Mon, 21 Jan 2019 03:09:22 +0000 (03:09 +0000)
Oops, I might've left it out, somewhere.

t/check-www-inbox.perl

index 7dd1eebeb00a268d7e141e136566db97b1151942..6232f1647bcc9174a9e0d5a9ee7603c6e5840688 100644 (file)
@@ -156,7 +156,9 @@ sub worker_loop {
                # make sure the HTML source doesn't screw up terminals
                # when people curl the source (not remotely an expert
                # on languages or encodings, here).
                # make sure the HTML source doesn't screw up terminals
                # when people curl the source (not remotely an expert
                # on languages or encodings, here).
-               my $ct = $r->header('Content-Type');
+               my $ct = $r->header('Content-Type') || '';
+               warn "no Content-Type: $u\n" if $ct eq '';
+
                if ($atom_check && $ct =~ m!\bapplication/atom\+xml\b!) {
                        my $raw = $r->decoded_content;
                        my ($out, $err) = ('', '');
                if ($atom_check && $ct =~ m!\bapplication/atom\+xml\b!) {
                        my $raw = $r->decoded_content;
                        my ($out, $err) = ('', '');