Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd Do not report status code 500 to blocklistd(8)...



details:   https://anonhg.NetBSD.org/src/rev/5324d0fd394b
branches:  trunk
changeset: 1011832:5324d0fd394b
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Mon Jul 13 09:38:57 2020 +0000

description:
Do not report status code 500 to blocklistd(8)  Add -DNO_BLOCKLIST_SUPPORT
to Makefile.boot.

diffstat:

 libexec/httpd/Makefile.boot |   2 +-
 libexec/httpd/bozohttpd.8   |  12 +++++-------
 libexec/httpd/bozohttpd.c   |   5 ++---
 3 files changed, 8 insertions(+), 11 deletions(-)

diffs (61 lines):

diff -r 0849500342cf -r 5324d0fd394b libexec/httpd/Makefile.boot
--- a/libexec/httpd/Makefile.boot       Mon Jul 13 09:10:34 2020 +0000
+++ b/libexec/httpd/Makefile.boot       Mon Jul 13 09:38:57 2020 +0000
@@ -6,7 +6,7 @@
 CC=    cc
 OPT=   -O
 LARGE_CFLAGS=  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-LOCAL_CFLAGS=  -DNO_LUA_SUPPORT -D_GNU_SOURCE
+LOCAL_CFLAGS=  -DNO_LUA_SUPPORT -DNO_BLOCKLIST_SUPPORT -D_GNU_SOURCE
 CFLAGS=        $(OPT) $(LARGE_CFLAGS) $(LOCAL_CFLAGS)
 
 GROFF= groff -Tascii
diff -r 0849500342cf -r 5324d0fd394b libexec/httpd/bozohttpd.8
--- a/libexec/httpd/bozohttpd.8 Mon Jul 13 09:10:34 2020 +0000
+++ b/libexec/httpd/bozohttpd.8 Mon Jul 13 09:38:57 2020 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: bozohttpd.8,v 1.81 2020/07/11 08:10:52 jruoho Exp $
+.\"    $NetBSD: bozohttpd.8,v 1.82 2020/07/13 09:38:57 jruoho Exp $
 .\"
 .\"    $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -466,16 +466,14 @@
 .Pp
 Upon occurrence,
 .Nm
-reports three HTTP status codes to
+reports two HTTP status codes to
 .Xr blocklistd 8
 as failures:
 .Em 401
-(``Unauthorized'') ,
+(``Unauthorized'')
+and
 .Em 403
-(``Forbidden'') ,
-and
-.Em 500
-(``Internal Server Error'') .
+(``Forbidden'') .
 Of these,
 .Em 401
 is the one received upon authorization failure with the
diff -r 0849500342cf -r 5324d0fd394b libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Mon Jul 13 09:10:34 2020 +0000
+++ b/libexec/httpd/bozohttpd.c Mon Jul 13 09:38:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bozohttpd.c,v 1.116 2020/07/11 08:10:52 jruoho Exp $   */
+/*     $NetBSD: bozohttpd.c,v 1.117 2020/07/13 09:38:57 jruoho Exp $   */
 
 /*     $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $      */
 
@@ -2297,8 +2297,7 @@
                pfilter_notify(BLOCKLIST_AUTH_FAIL, code);
                break;
 
-       case 403: /* FALLTHROUGH */
-       case 500:
+       case 403:
                pfilter_notify(BLOCKLIST_ABUSIVE_BEHAVIOR, code);
                break;
        }



Home | Main Index | Thread Index | Old Index