Module Name:    src
Committed By:   jruoho
Date:           Mon Jul 13 09:38:57 UTC 2020

Modified Files:
        src/libexec/httpd: Makefile.boot bozohttpd.8 bozohttpd.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/libexec/httpd/Makefile.boot
cvs rdiff -u -r1.81 -r1.82 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.116 -r1.117 src/libexec/httpd/bozohttpd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/httpd/Makefile.boot
diff -u src/libexec/httpd/Makefile.boot:1.7 src/libexec/httpd/Makefile.boot:1.8
--- src/libexec/httpd/Makefile.boot:1.7	Wed Oct 30 07:28:13 2019
+++ src/libexec/httpd/Makefile.boot	Mon Jul 13 09:38:57 2020
@@ -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

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.81 src/libexec/httpd/bozohttpd.8:1.82
--- src/libexec/httpd/bozohttpd.8:1.81	Sat Jul 11 08:10:52 2020
+++ src/libexec/httpd/bozohttpd.8	Mon Jul 13 09:38:57 2020
@@ -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 @@ compilation option.
 .Pp
 Upon occurrence,
 .Nm
-reports three HTTP status codes to
+reports two HTTP status codes to
 .Xr blocklistd 8
 as failures:
 .Em 401
-(``Unauthorized'') ,
-.Em 403
-(``Forbidden'') ,
+(``Unauthorized'')
 and
-.Em 500
-(``Internal Server Error'') .
+.Em 403
+(``Forbidden'') .
 Of these,
 .Em 401
 is the one received upon authorization failure with the

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.116 src/libexec/httpd/bozohttpd.c:1.117
--- src/libexec/httpd/bozohttpd.c:1.116	Sat Jul 11 08:10:52 2020
+++ src/libexec/httpd/bozohttpd.c	Mon Jul 13 09:38:57 2020
@@ -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 @@ bozo_http_error(bozohttpd_t *httpd, int 
 		pfilter_notify(BLOCKLIST_AUTH_FAIL, code);
 		break;
 
-	case 403: /* FALLTHROUGH */
-	case 500:
+	case 403:
 		pfilter_notify(BLOCKLIST_ABUSIVE_BEHAVIOR, code);
 		break;
 	}

Reply via email to