]> Sergey Matveev's repositories - public-inbox.git/commitdiff
newswww: include body text in 404 response
authorEric Wong <e@80x24.org>
Sun, 14 Aug 2016 10:16:55 +0000 (10:16 +0000)
committerEric Wong <e@80x24.org>
Sun, 14 Aug 2016 10:20:15 +0000 (10:20 +0000)
Some browsers do not give any indication of the HTTP error
code on errors, so show the error text to the user like we
do in the top-level WWW module.

lib/PublicInbox/NewsWWW.pm

index 908c43510dbd8f41bf6ce48dfb2e6212e771fcff..9b01dcd3839023ae69481dd1e282d491b97443c3 100644 (file)
@@ -43,7 +43,7 @@ sub call {
 
                return [ $code, $h, [ "Redirecting to $url\n" ] ]
        }
-       [ 404, [ 'Content-Type' => 'text/plain' ], [] ];
+       [ 404, [ 'Content-Type' => 'text/plain' ], [ "404 Not Found\n" ] ];
 }
 
 1;