head	1.14;
access;
symbols
	bozohttpd-20260503:1.14
	bozohttpd-20240428:1.14
	netbsd-11-0-RC3:1.14
	netbsd-11-0-RC2:1.14
	netbsd-11-0-RC1:1.14
	perseant-exfatfs-base-20250801:1.14
	netbsd-11:1.14.0.10
	netbsd-11-base:1.14
	netbsd-10-1-RELEASE:1.14
	perseant-exfatfs-base-20240630:1.14
	perseant-exfatfs:1.14.0.8
	perseant-exfatfs-base:1.14
	netbsd-8-3-RELEASE:1.7.4.3
	netbsd-9-4-RELEASE:1.13.2.1
	netbsd-10-0-RELEASE:1.14
	netbsd-10-0-RC6:1.14
	netbsd-10-0-RC5:1.14
	netbsd-10-0-RC4:1.14
	bozohttpd-20240126:1.14
	netbsd-10-0-RC3:1.14
	netbsd-10-0-RC2:1.14
	netbsd-10-0-RC1:1.14
	netbsd-10:1.14.0.6
	netbsd-10-base:1.14
	netbsd-9-3-RELEASE:1.13.2.1
	bozohttpd-20220517:1.14
	cjep_sun2x-base1:1.14
	cjep_sun2x:1.14.0.4
	cjep_sun2x-base:1.14
	cjep_staticlib_x-base1:1.14
	netbsd-9-2-RELEASE:1.13.2.1
	cjep_staticlib_x:1.14.0.2
	cjep_staticlib_x-base:1.14
	bozohttpd-20210227:1.14
	netbsd-9-1-RELEASE:1.13
	bozohttpd-20201014:1.13
	bozohttpd-20200820:1.13
	bozohttpd-20190228:1.12
	phil-wifi-20200421:1.13
	phil-wifi-20200411:1.13
	is-mlppp:1.13.0.4
	is-mlppp-base:1.13
	phil-wifi-20200406:1.13
	netbsd-8-2-RELEASE:1.7.4.2
	netbsd-9-0-RELEASE:1.13
	netbsd-9-0-RC2:1.13
	netbsd-9-0-RC1:1.13
	phil-wifi-20191119:1.13
	netbsd-9:1.13.0.2
	netbsd-9-base:1.13
	phil-wifi-20190609:1.13
	netbsd-8-1-RELEASE:1.7.4.1
	netbsd-8-1-RC1:1.7.4.1
	pgoyette-compat-merge-20190127:1.7.10.3
	pgoyette-compat-20190127:1.12
	pgoyette-compat-20190118:1.12
	pgoyette-compat-1226:1.12
	pgoyette-compat-1126:1.11
	bozohttpd-20181125:1.11
	bozohttpd-20181123:1.11
	bozohttpd-20181121:1.11
	bozohttpd-20181118:1.9
	pgoyette-compat-1020:1.8
	pgoyette-compat-0930:1.8
	pgoyette-compat-0906:1.8
	netbsd-7-2-RELEASE:1.4.24.3
	pgoyette-compat-0728:1.7
	netbsd-8-0-RELEASE:1.7
	phil-wifi:1.7.0.12
	phil-wifi-base:1.7
	pgoyette-compat-0625:1.7
	netbsd-8-0-RC2:1.7
	pgoyette-compat-0521:1.7
	pgoyette-compat-0502:1.7
	pgoyette-compat-0422:1.7
	netbsd-8-0-RC1:1.7
	pgoyette-compat-0415:1.7
	pgoyette-compat-0407:1.7
	pgoyette-compat-0330:1.7
	pgoyette-compat-0322:1.7
	pgoyette-compat-0315:1.7
	netbsd-7-1-2-RELEASE:1.4.24.3
	pgoyette-compat:1.7.0.10
	pgoyette-compat-base:1.7
	netbsd-7-1-1-RELEASE:1.4.24.3
	matt-nb8-mediatek:1.7.0.8
	matt-nb8-mediatek-base:1.7
	perseant-stdc-iso10646:1.7.0.6
	perseant-stdc-iso10646-base:1.7
	netbsd-8:1.7.0.4
	netbsd-8-base:1.7
	prg-localcount2-base3:1.7
	prg-localcount2-base2:1.7
	prg-localcount2-base1:1.7
	prg-localcount2:1.7.0.2
	prg-localcount2-base:1.7
	pgoyette-localcount-20170426:1.7
	bouyer-socketcan-base1:1.7
	pgoyette-localcount-20170320:1.7
	netbsd-7-1:1.4.24.3.0.2
	netbsd-7-1-RELEASE:1.4.24.3
	netbsd-7-1-RC2:1.4.24.3
	netbsd-7-nhusb-base-20170116:1.4.24.2
	bouyer-socketcan:1.6.0.2
	bouyer-socketcan-base:1.6
	pgoyette-localcount-20170107:1.6
	netbsd-7-1-RC1:1.4.24.2
	pgoyette-localcount-20161104:1.6
	netbsd-7-0-2-RELEASE:1.4.26.1
	localcount-20160914:1.5
	netbsd-7-nhusb:1.4.24.1.0.2
	netbsd-7-nhusb-base:1.4.24.1
	pgoyette-localcount-20160806:1.5
	pgoyette-localcount-20160726:1.5
	pgoyette-localcount:1.5.0.2
	pgoyette-localcount-base:1.5
	netbsd-7-0-1-RELEASE:1.4.26.1
	netbsd-7-0:1.4.0.26
	netbsd-7-0-RELEASE:1.4
	netbsd-7-0-RC3:1.4
	netbsd-7-0-RC2:1.4
	netbsd-7-0-RC1:1.4
	bozohttpd-20150320:1.4
	bozohttpd-20141225:1.4
	netbsd-5-2-3-RELEASE:1.2.20.1
	netbsd-5-1-5-RELEASE:1.2.16.1
	netbsd-6-0-6-RELEASE:1.4
	netbsd-6-1-5-RELEASE:1.4
	netbsd-7:1.4.0.24
	netbsd-7-base:1.4
	yamt-pagecache-base9:1.4
	yamt-pagecache-tag8:1.4
	netbsd-6-1-4-RELEASE:1.4
	netbsd-6-0-5-RELEASE:1.4
	tls-earlyentropy:1.4.0.22
	tls-earlyentropy-base:1.4
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.4
	riastradh-drm2-base3:1.4
	netbsd-6-1-3-RELEASE:1.4
	netbsd-6-0-4-RELEASE:1.4
	netbsd-5-2-2-RELEASE:1.2
	netbsd-5-1-4-RELEASE:1.2
	bozohttpd-20140102:1.4
	netbsd-6-1-2-RELEASE:1.4
	netbsd-6-0-3-RELEASE:1.4
	netbsd-5-2-1-RELEASE:1.2
	netbsd-5-1-3-RELEASE:1.2
	netbsd-6-1-1-RELEASE:1.4
	riastradh-drm2-base2:1.4
	riastradh-drm2-base1:1.4
	riastradh-drm2:1.4.0.16
	riastradh-drm2-base:1.4
	bozohttpd-20130711:1.4
	netbsd-6-1:1.4.0.20
	netbsd-6-0-2-RELEASE:1.4
	netbsd-6-1-RELEASE:1.4
	netbsd-6-1-RC4:1.4
	netbsd-6-1-RC3:1.4
	agc-symver:1.4.0.18
	agc-symver-base:1.4
	netbsd-6-1-RC2:1.4
	netbsd-6-1-RC1:1.4
	yamt-pagecache-base8:1.4
	netbsd-5-2:1.2.0.20
	netbsd-6-0-1-RELEASE:1.4
	yamt-pagecache-base7:1.4
	netbsd-5-2-RELEASE:1.2
	netbsd-5-2-RC1:1.2
	matt-nb6-plus-nbase:1.4
	yamt-pagecache-base6:1.4
	netbsd-6-0:1.4.0.14
	netbsd-6-0-RELEASE:1.4
	netbsd-6-0-RC2:1.4
	tls-maxphys:1.4.0.12
	tls-maxphys-base:1.4
	matt-nb6-plus:1.4.0.10
	matt-nb6-plus-base:1.4
	netbsd-6-0-RC1:1.4
	yamt-pagecache-base5:1.4
	yamt-pagecache-base4:1.4
	netbsd-6:1.4.0.8
	netbsd-6-base:1.4
	netbsd-5-1-2-RELEASE:1.2
	netbsd-5-1-1-RELEASE:1.2
	bozohttpd-20111118:1.1.1.4
	yamt-pagecache-base3:1.4
	yamt-pagecache-base2:1.4
	yamt-pagecache:1.4.0.6
	yamt-pagecache-base:1.4
	cherry-xenmp:1.4.0.4
	cherry-xenmp-base:1.4
	bouyer-quota2-nbase:1.4
	bouyer-quota2:1.4.0.2
	bouyer-quota2-base:1.4
	matt-mips64-premerge-20101231:1.4
	matt-nb5-pq3:1.2.0.18
	matt-nb5-pq3-base:1.2
	netbsd-5-1:1.2.0.16
	netbsd-5-1-RELEASE:1.2
	bozohttpd-20100920:1.1.1.4
	netbsd-5-1-RC4:1.2
	bozohttpd-20100621:1.1.1.4
	bozohttpd-20100617:1.1.1.4
	netbsd-5-1-RC3:1.2
	netbsd-5-1-RC2:1.2
	bozohttpd-20100512:1.1.1.4
	bozohttpd-20100510:1.1.1.4
	bozohttpd-20100509:1.1.1.4
	netbsd-5-1-RC1:1.2
	netbsd-5-0-2-RELEASE:1.2
	matt-premerge-20091211:1.4
	netbsd-5-0-1-RELEASE:1.2
	bozohttpd-20090522:1.1.1.4
	jym-xensuspend-nbase:1.3
	netbsd-5-0:1.2.0.14
	netbsd-5-0-RELEASE:1.2
	bozohttpd-20090418:1.1.1.3
	mrg-merged-to-bozohttpd-20090417-post:1.3
	bozohttpd-20090417:1.1.1.3
	netbsd-5-0-RC4:1.2
	netbsd-5-0-RC3:1.2
	netbsd-5-0-RC2:1.2
	jym-xensuspend:1.2.0.12
	jym-xensuspend-base:1.3
	netbsd-5-0-RC1:1.2
	netbsd-5:1.2.0.10
	netbsd-5-base:1.2
	mjf-devfs2:1.2.0.8
	mjf-devfs2-base:1.2
	yamt-pf42-base4:1.2
	yamt-pf42-base3:1.2
	hpcarm-cleanup-nbase:1.2
	yamt-pf42-base2:1.2
	yamt-pf42:1.2.0.6
	yamt-pf42-base:1.2
	bozohttpd-20080303:1.1.1.2
	keiichi-mipv6:1.2.0.4
	keiichi-mipv6-base:1.2
	cube-autoconf:1.2.0.2
	cube-autoconf-base:1.2
	hpcarm-cleanup-base:1.2
	bozohttpd-20060517:1.1.1.1
	bozohttpd:1.1.1;
locks; strict;
comment	@# @;


1.14
date	2021.02.11.09.23.55;	author mrg;	state Exp;
branches;
next	1.13;
commitid	iGHHLmATAQ8R1hHC;

1.13
date	2019.03.27.04.50.30;	author mrg;	state Exp;
branches
	1.13.2.1;
next	1.12;
commitid	8SBrfaA1hAsjBXgB;

1.12
date	2018.12.14.23.57.22;	author maya;	state Exp;
branches;
next	1.11;
commitid	76pVCaWJScqBfP3B;

1.11
date	2018.11.21.09.37.02;	author mrg;	state Exp;
branches;
next	1.10;
commitid	yeR5yTgAssJteN0B;

1.10
date	2018.11.20.01.06.46;	author mrg;	state Exp;
branches;
next	1.9;
commitid	XYgWE3S6fC4ppC0B;

1.9
date	2018.11.19.04.12.22;	author mrg;	state Exp;
branches;
next	1.8;
commitid	MUoLEU4MO1Fbvv0B;

1.8
date	2018.08.24.11.41.16;	author martin;	state Exp;
branches;
next	1.7;
commitid	GXygKQDQvO6wMmPA;

1.7
date	2017.01.31.14.33.54;	author mrg;	state Exp;
branches
	1.7.4.1
	1.7.10.1
	1.7.12.1;
next	1.6;
commitid	BX7leUhVGCoN28Ez;

1.6
date	2016.09.23.16.55.56;	author schmonz;	state Exp;
branches
	1.6.2.1;
next	1.5;
commitid	sFcO8e8K0cBH1rnz;

1.5
date	2015.12.27.07.43.39;	author mrg;	state Exp;
branches
	1.5.2.1;
next	1.4;
commitid	KOdUBNPMyolfGyOy;

1.4
date	2009.05.23.02.26.03;	author mrg;	state Exp;
branches
	1.4.8.1
	1.4.14.1
	1.4.20.1
	1.4.24.1
	1.4.26.1;
next	1.3;

1.3
date	2009.04.18.07.48.02;	author mrg;	state Exp;
branches;
next	1.2;

1.2
date	2007.10.16.01.31.05;	author tls;	state dead;
branches
	1.2.10.1
	1.2.12.1
	1.2.16.1
	1.2.20.1;
next	1.1;

1.1
date	2007.10.16.01.14.05;	author tls;	state Exp;
branches
	1.1.1.1;
next	;

1.13.2.1
date	2021.03.05.13.34.19;	author martin;	state Exp;
branches;
next	;
commitid	n1snW5vVPzYiG7KC;

1.7.4.1
date	2018.11.24.17.13.51;	author martin;	state Exp;
branches;
next	1.7.4.2;
commitid	uWLCjvlvfCBpFd1B;

1.7.4.2
date	2019.06.12.10.32.00;	author martin;	state Exp;
branches;
next	1.7.4.3;
commitid	PJR2ZrMMmyeSZSqB;

1.7.4.3
date	2021.03.27.13.38.52;	author martin;	state Exp;
branches;
next	;
commitid	0fy0WIi8VRCg1XMC;

1.7.10.1
date	2018.09.06.06.55.20;	author pgoyette;	state Exp;
branches;
next	1.7.10.2;
commitid	HCi1bXD317XIK0RA;

1.7.10.2
date	2018.11.26.01.52.13;	author pgoyette;	state Exp;
branches;
next	1.7.10.3;
commitid	Zj4q5SspGdKXto1B;

1.7.10.3
date	2018.12.26.14.01.28;	author pgoyette;	state Exp;
branches;
next	;
commitid	xUhK8IAeBM1azj5B;

1.7.12.1
date	2019.06.10.22.05.29;	author christos;	state Exp;
branches;
next	;
commitid	jtc8rnCzWiEEHGqB;

1.6.2.1
date	2017.04.21.16.53.13;	author bouyer;	state Exp;
branches;
next	;
commitid	dUG7nkTKALCadqOz;

1.5.2.1
date	2016.11.04.14.48.55;	author pgoyette;	state Exp;
branches;
next	1.5.2.2;
commitid	2m1JRwYmpwPkOOsz;

1.5.2.2
date	2017.03.20.06.57.01;	author pgoyette;	state Exp;
branches;
next	;
commitid	jjw7cAwgyKq7RfKz;

1.4.8.1
date	2016.04.15.19.36.09;	author snj;	state Exp;
branches;
next	1.4.8.2;
commitid	oto82FwXp6Vs5L2z;

1.4.8.2
date	2017.03.07.07.25.19;	author snj;	state Exp;
branches;
next	;
commitid	g5OheTlyDwAXyAIz;

1.4.14.1
date	2016.04.15.19.38.13;	author snj;	state Exp;
branches;
next	1.4.14.2;
commitid	Uf1dmObit37d6L2z;

1.4.14.2
date	2017.03.07.07.16.08;	author snj;	state Exp;
branches;
next	;
commitid	rdr2mHDfrnupvAIz;

1.4.20.1
date	2016.04.15.19.37.27;	author snj;	state Exp;
branches;
next	1.4.20.2;
commitid	zYyoXbZSiqDU5L2z;

1.4.20.2
date	2017.03.07.07.21.54;	author snj;	state Exp;
branches;
next	;
commitid	u1UVe6SlnvFSxAIz;

1.4.24.1
date	2016.04.10.10.33.11;	author martin;	state Exp;
branches
	1.4.24.1.2.1;
next	1.4.24.2;
commitid	bbLuZQFN3EQMe42z;

1.4.24.2
date	2016.12.23.07.42.09;	author snj;	state Exp;
branches;
next	1.4.24.3;
commitid	NN4w7Q2T4fuf25zz;

1.4.24.3
date	2017.02.12.22.07.17;	author snj;	state Exp;
branches
	1.4.24.3.2.1;
next	1.4.24.4;
commitid	k0fmNBASWNSmbIFz;

1.4.24.4
date	2018.11.24.17.22.58;	author martin;	state Exp;
branches;
next	1.4.24.5;
commitid	9CQaC30uxHyxId1B;

1.4.24.5
date	2019.06.15.15.54.58;	author martin;	state Exp;
branches;
next	;
commitid	M3W48f6zlGiMHirB;

1.4.24.1.2.1
date	2017.01.18.08.46.23;	author skrll;	state Exp;
branches;
next	1.4.24.1.2.2;
commitid	M6f3RyDtiAR3wqCz;

1.4.24.1.2.2
date	2017.03.13.07.41.25;	author skrll;	state Exp;
branches;
next	;
commitid	vH6VFbpxnMy7rmJz;

1.4.24.3.2.1
date	2018.11.24.17.23.21;	author martin;	state Exp;
branches;
next	1.4.24.3.2.2;
commitid	IwFcHr2C6ZuGId1B;

1.4.24.3.2.2
date	2019.06.15.15.56.22;	author martin;	state Exp;
branches;
next	;
commitid	kC51tYYbUjIhIirB;

1.4.26.1
date	2016.04.15.18.55.49;	author snj;	state Exp;
branches;
next	1.4.26.2;
commitid	RlNTxli26oeuRK2z;

1.4.26.2
date	2016.12.23.07.47.40;	author snj;	state Exp;
branches;
next	1.4.26.3;
commitid	fChUvrsBGKZL35zz;

1.4.26.3
date	2017.02.12.21.59.45;	author snj;	state Exp;
branches;
next	1.4.26.4;
commitid	p8XNh9nFUGOB7IFz;

1.4.26.4
date	2018.11.24.17.23.48;	author martin;	state Exp;
branches;
next	1.4.26.5;
commitid	ynOo4QuCZaJNId1B;

1.4.26.5
date	2019.06.15.15.57.32;	author martin;	state Exp;
branches;
next	;
commitid	fLxl4ur27ZtHIirB;

1.2.10.1
date	2014.07.09.15.21.21;	author msaitoh;	state Exp;
branches;
next	;
commitid	6P3UulRicc5jrIHx;

1.2.12.1
date	2009.05.13.19.18.38;	author jym;	state Exp;
branches;
next	;

1.2.16.1
date	2014.07.09.16.09.39;	author msaitoh;	state Exp;
branches;
next	;
commitid	NgScSkUrfSmYHIHx;

1.2.20.1
date	2014.07.09.16.04.13;	author msaitoh;	state Exp;
branches;
next	;
commitid	vGNE3klASBlIFIHx;

1.1.1.1
date	2007.10.16.01.14.05;	author tls;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2008.03.03.22.03.08;	author mrg;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2009.04.18.07.09.27;	author mrg;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2009.05.23.02.21.19;	author mrg;	state Exp;
branches;
next	;


desc
@@


1.14
log
@changes in bozohttpd 20210210:
	o  fix various NULL derefs from malformed headers.  mostly from
	   <emily@@ingalls.rocks>.
@
text
@#	$NetBSD: Makefile,v 1.13 2019/03/27 04:50:30 mrg Exp $
#	$eterna: Makefile,v 1.14 2009/05/22 21:51:39 mrg Exp $

SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15 t16 t17 t18
CGITESTS=	t11
BIGFILETESTS=	partial4000 partial8000

BOZOHTTPD?=	../bozohttpd
BOZOHTTPD?=	../debug/bozohttpd-debug
WGET?=		wget
DATA?=		$(.CURDIR)/data 
VERBOSE?=	yes

.if ${VERBOSE} != "yes"
SILENT=		@@
.else
SILENT=
.endif

all:

clean:
	for a in $(SIMPLETESTS) $(BIGFILETESTS); do \
		rm -f tmp.$$a.out tmp.$$a.err; \
	done

check: check-simple check-cgi check-bigfile

check-simple:
.for a in $(SIMPLETESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
.endfor

check-cgi:
.for a in $(CGITESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
.endfor

check-bigfile:
.for a in $(BIGFILETESTS)
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
.endfor

.include <bsd.obj.mk>
@


1.13
log
@add $NetBSD$
@
text
@d1 1
a1 1
#	$NetBSD$
d4 1
a4 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15
@


1.13.2.1
log
@Pull up the following (all via patch), requested by mrg in ticket #1221:

	lib/lua/bozohttpd/Makefile			(apply patch)
	libexec/httpd/Makefile				1.30-1.31
	libexec/httpd/Makefile.boot			1.7-1.9
	libexec/httpd/auth-bozo.c			1.25-1.26
	libexec/httpd/bozohttpd.8			1.80-1.87
	libexec/httpd/bozohttpd.c			1.114-1.123,1.125-1.128
	libexec/httpd/bozohttpd.h			1.61-1.68
	libexec/httpd/cgi-bozo.c			1.49-1.53
	libexec/httpd/content-bozo.c			1.17-1.20
	libexec/httpd/daemon-bozo.c			1-.22
	libexec/httpd/dir-index-bozo.c			1.33-1.34
	libexec/httpd/main.c				1.23-1.27
	libexec/httpd/printenv.lua			1.4-1.5
	libexec/httpd/ssl-bozo.c			1.27-1.29
	libexec/httpd/libbozohttpd/libbozohttpd.3	1.5-1.6
	libexec/httpd/small/Makefile			1.4
	libexec/httpd/testsuite/Makefile		1.14
	libexec/httpd/testsuite/t16.in			1.1
	libexec/httpd/testsuite/t16.out			1.1
	libexec/httpd/testsuite/t17.in			1.1
	libexec/httpd/testsuite/t17.out			1.1
	libexec/httpd/testsuite/t18.in			1.1
	libexec/httpd/testsuite/t18.out			1.1


Update to bozohttpd 20210227.
Apply lua build fix (no blocklist support on this branch).

changes in bozohttpd 20210227:
	o  new support for content types: .tar.bz2, .tar.xz, .tar.lz,
	   .tar.zst, .tbz2, .txz, .tlz, .zipx, .xz, .zst, .sz, .lz, .lzma,
	   .lzo, .7z, .lzo, .cab, .dmg, .jar, and .rar.  should fix
	   netbsd PR#56026:
	   MIME type of .tar.xz file on ny{cdn,ftp}.NetBSD.org is invalid

changes in bozohttpd 20210211:
	o  fix various NULL derefs from malformed headers.  mostly from
	   <emily@@ingalls.rocks>.
	o  fix memory leaks in library interface: add bozo_cleanup().

changes in bozohttpd 20201014:
	o  also set -D_GNU_SOURCE in Makefile.boot.  from
	   hadrien.lacour@@posteo.net.
	o  fix array size botch (assertion, not exploitable.)  from
	   martin@@netbsd.org.
	o  also match %2F as well as %2f.  from leah@@vuxu.org.
	o  many manual and help fixes.  clean ups for higher lint levels,
	   consistency/style clean ups.  various option fixes including made
	   -f imply -b.  from <henrik@@gulbra.net> for freebsd.

changes in bozohttpd 20200912:
	o  add .m4a and .m4v file extensions.

changes in bozohttpd 20200820:
	o  make this work on sun2 by reducing mmap window there.
	o  fix SSL shutdown sequence.  from spz@@netbsd.org.
	o  add readme support to directory indexing.  from jmcneill@@netbsd.org
	o  add blocklist(8) support.  from jruoho@@netbsd.org.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.13 2019/03/27 04:50:30 mrg Exp $
d4 1
a4 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15 t16 t17 t18
@


1.12
log
@Don't pass ${HOST} to test scripts.
htnl_cmp compares against the output of `hostname`.

This makes the tests pass on my machine.
@
text
@d1 1
@


1.11
log
@- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.
@
text
@a11 1
HOST?=		test.eterna
d30 1
a30 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}"
d35 1
a35 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}" -c "${.CURDIR}/cgi-bin"
d40 1
a40 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}" "${HOST}"
@


1.10
log
@from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
   initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.


the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.


reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.


clean up option and usage handling some.
@
text
@d12 1
d31 1
a31 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
d36 1
a36 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
d41 1
a41 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.9
log
@fix a denial of service attack against header contents, which
is now bounded at 16KiB.  reported by JP.
@
text
@d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14
@


1.8
log
@Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@@
@
text
@d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13
@


1.7
log
@- fix a bug in cgi processing.  from Dennis Lindroos.
- add a testcase for this, and expand test-simple to handle additional
  args to bozohttpd for eg, cgi-bin setting.
- fix objdir bugs in the testsuite.
@
text
@d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
@


1.7.12.1
log
@Sync with HEAD
@
text
@a0 1
#	$NetBSD: Makefile,v 1.13 2019/03/27 04:50:30 mrg Exp $
d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15
@


1.7.4.1
log
@Sync to HEAD (requested by mrg in ticket #1104)

	libexec/httpd/testsuite/data/.bzremap           up to 1.1
	libexec/httpd/testsuite/t12.out                 up to 1.1
	libexec/httpd/testsuite/t12.in                  up to 1.1
	libexec/httpd/testsuite/t13.out                 up to 1.1
	libexec/httpd/testsuite/t13.in                  up to 1.1
	libexec/httpd/testsuite/t14.out                 up to 1.1
	libexec/httpd/testsuite/t14.in                  up to 1.1
	libexec/httpd/testsuite/t15.out                 up to 1.1
	libexec/httpd/testsuite/t15.in                  up to 1.1
	libexec/httpd/CHANGES                           up to 1.28
	libexec/httpd/auth-bozo.c                       up to 1.22
	libexec/httpd/bozohttpd.8                       up to 1.74
	libexec/httpd/bozohttpd.c                       up to 1.96
	libexec/httpd/bozohttpd.h                       up to 1.56
	libexec/httpd/cgi-bozo.c                        up to 1.44
	libexec/httpd/content-bozo.c                    up to 1.16
	libexec/httpd/daemon-bozo.c                     up to 1.19
	libexec/httpd/dir-index-bozo.c                  up to 1.28
	libexec/httpd/main.c                            up to 1.21
	libexec/httpd/ssl-bozo.c                        up to 1.25
	libexec/httpd/tilde-luzah-bozo.c                up to 1.16
	libexec/httpd/lua/bozo.lua                      up to 1.3
	libexec/httpd/lua/glue.c                        up to 1.5
	libexec/httpd/lua/optparse.lua                  up to 1.2
	libexec/httpd/testsuite/Makefile                up to 1.11
	libexec/httpd/testsuite/html_cmp                up to 1.6
	libexec/httpd/testsuite/t3.out                  up to 1.4
	libexec/httpd/testsuite/t5.out                  up to 1.4
	libexec/httpd/testsuite/t6.out                  up to 1.4
	libexec/httpd/testsuite/test-bigfile            up to 1.5
	libexec/httpd/testsuite/test-simple             up to 1.5


Cosmetic changes to Lua binding in bozohttpd.

- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
  doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
  manual. Those functions may throw (longjump) and leak data allocated
  by C function. In one case, I use luaL_Buffer, in the other case,
  I rearranged calls a bit.


fix ordering of a couple of words.  from Edgar Pettijohn in PR#52375.
thanks!


s/u_int/unsigned/.

from Jan Danielsson.  increases/fixes portability.


PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.


Document script handler issues with httpd(8).
From martin@@, addressing PR 52194.

While here, use American spelling consistently and upper-case some
abbreviations.

Bump date.


fix output since protocol agnostic change went in.

XXX: i thought someone hooked this into atf already, please do :)


Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@@


Bump date


Remove trailing whitespace.


use __func__ in debug().


fix a denial of service attack against header contents, which
is now bounded at 16KiB.  reported by JP.


avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.


note the changes present in bozohttpd 20181118:

o  add url remap support via .bzremap file, from martin%netbsd.org@@localhost
o  handle redirections for any protocol, not just http:
o  fix a denial of service attack against header contents, which
   is now bounded at 16KiB.  reported by JP.


from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
   initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.

the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.

reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.

clean up option and usage handling some.


move some #if support into bozohttpd.h.


fix previous: have_debug was reversed.


also fix have_dynamic_content from the previous previous.  re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.


- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.


two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate.  now 10000 byte files say 10kB not 9kB.


use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)


many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines


alpha sort the option switch.


add an assert() check on array bounds.


minor style fixes.  simplify bozo_match_content_map().
@
text
@d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15
a11 1
HOST?=		test.eterna
d30 1
a30 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}"
d35 1
a35 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}" -c "${.CURDIR}/cgi-bin"
d40 1
a40 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}" "${HOST}"
@


1.7.4.2
log
@Pull up the following revisions (via patch) requested by mrg in ticket #1281:

	libexec/httpd/CHANGES			1.31-1.40
	libexec/httpd/Makefile			1.28
	libexec/httpd/auth-bozo.c		1.23-1.24
	libexec/httpd/bozohttpd.8		1.75-1.79
	libexec/httpd/bozohttpd.c		1.100-1.113
	libexec/httpd/bozohttpd.h		1.58-1.60
	libexec/httpd/cgi-bozo.c		1.46-1.48
	libexec/httpd/daemon-bozo.c		1.20-1.21
	libexec/httpd/dir-index-bozo.c		1.29-1.32
	libexec/httpd/ssl-bozo.c		1.26
	libexec/httpd/testsuite/Makefile	1.12-1.13
	libexec/httpd/testsuite/t11.out		1.2
	libexec/httpd/testsuite/test-bigfile	1.6
	libexec/httpd/testsuite/test-simple	1.6


Don't display special files in the directory index.  They aren't
served, but links to them are generated.
---
All from "Rajeev V. Pillai" <rajeev_v_pillai@@yahoo.com>:
- use html tables for directory index.
- don't include "index.html" in html headers
- additional escaping of names
- re-add top/bottom borders
- adds an aquamarine table header
- Zebra-stripes table rows using CSS instead of code
- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().
- avoid sign extension in % handling
fix a few problems pointed out by clang static analyzer:
- bozostrnsep() may return with "in = NULL", so check for it.
- nul terminating in bozo_escape_rfc3986() can be simpler
- don't use uniinit variables in check_remap()
- don't use re-used freed data in check_virtual().
- fix bozoprefs->size setting when increasing the size (new total was
  being added to the prior total.)
  however, bozostrdup() may reference request->hr_file.
---
Add ssl specific timeout value (30s).  If SSL_accept() doesn't
work with in this timeout value, ssl setup now fails.
---
Fix handling of bozo_set_timeout() timeouts (and `-T' option parsing)
---
Avoid .htpasswd exposure to authenticated users when .htpasswd is
in the slashdir too.
---
Avoid possible NULL dereference when sending a big request that timeout.
---
Use strings.h for strcasecmp (on linux)
---
Account for cgihandler being set when counting the number of CGI environment
headers we are about to set. Avoids an assertion failure (and overruninng
the array) later.
@
text
@a0 1
#	$NetBSD$
d12 1
d31 1
a31 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
d36 1
a36 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
d41 1
a41 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.7.4.3
log
@Pull up the following via patch, requested by mrg in ticket #1668:

	Makefile			1.30-1.31
	Makefile.boot			1.7-1.9
	auth-bozo.c			1.25-1.26
	bozohttpd.8			1.80-1.87
	bozohttpd.c			1.114-1.123,1.125-1.128
	bozohttpd.h			1.61-1.68
	cgi-bozo.c			1.49-1.53
	content-bozo.c			1.17-1.20
	daemon-bozo.c			1-.22
	dir-index-bozo.c		1.33-1.34
	main.c				1.23-1.27
	printenv.lua			1.4-1.5
	ssl-bozo.c			1.27-1.29
	libbozohttpd/libbozohttpd.3	1.5-1.6
	small/Makefile			1.4
	testsuite/Makefile		1.14
	testsuite/t16.in		1.1
	testsuite/t16.out		1.1
	testsuite/t17.in		1.1
	testsuite/t17.out		1.1
	testsuite/t18.in		1.1
	testsuite/t18.out		1.1

Update to bozohttpd 20210227.


changes in bozohttpd 20210227:
	o  new support for content types: .tar.bz2, .tar.xz, .tar.lz,
	   .tar.zst, .tbz2, .txz, .tlz, .zipx, .xz, .zst, .sz, .lz, .lzma,
	   .lzo, .7z, .lzo, .cab, .dmg, .jar, and .rar.  should fix
	   netbsd PR#56026:
	   MIME type of .tar.xz file on ny{cdn,ftp}.NetBSD.org is invalid

changes in bozohttpd 20210211:
	o  fix various NULL derefs from malformed headers.  mostly from
	   <emily@@ingalls.rocks>.
	o  fix memory leaks in library interface: add bozo_cleanup().

changes in bozohttpd 20201014:
	o  also set -D_GNU_SOURCE in Makefile.boot.  from
	   hadrien.lacour@@posteo.net.
	o  fix array size botch (assertion, not exploitable.)  from
	   martin@@netbsd.org.
	o  also match %2F as well as %2f.  from leah@@vuxu.org.
	o  many manual and help fixes.  clean ups for higher lint levels,
	   consistency/style clean ups.  various option fixes including made
	   -f imply -b.  from <henrik@@gulbra.net> for freebsd.

changes in bozohttpd 20200912:
	o  add .m4a and .m4v file extensions.

changes in bozohttpd 20200820:
	o  make this work on sun2 by reducing mmap window there.
	o  fix SSL shutdown sequence.  from spz@@netbsd.org.
	o  add readme support to directory indexing.  from jmcneill@@netbsd.org
	o  add blocklist(8) support.  from jruoho@@netbsd.org.
@
text
@d1 1
a1 1
#	$NetBSD: Makefile,v 1.7.4.2 2019/06/12 10:32:00 martin Exp $
d4 1
a4 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15 t16 t17 t18
@


1.7.10.1
log
@Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
@
text
@d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13
@


1.7.10.2
log
@Sync with HEAD, resolve a couple of conflicts
@
text
@d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15
a11 1
HOST?=		test.eterna
d30 1
a30 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}"
d35 1
a35 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}" -c "${.CURDIR}/cgi-bin"
d40 1
a40 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}" "${HOST}"
@


1.7.10.3
log
@Sync with HEAD, resolve a few conflicts
@
text
@d12 1
d31 1
a31 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
d36 1
a36 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
d41 1
a41 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.6
log
@Add a VERBOSE knob to the testsuite ("yes" by default, producing
basically the same output as before). When turned off, tests run
silently except when there's a failure.

Reviewed by mrg@@.
@
text
@d4 1
d26 1
a26 1
check: check-simple check-bigfile
d30 6
a35 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${VERBOSE}"
@


1.6.2.1
log
@Sync with HEAD
@
text
@a3 1
CGITESTS=	t11
d25 1
a25 1
check: check-simple check-cgi check-bigfile
d29 1
a29 6
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
.endfor

check-cgi:
.for a in $(CGITESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
@


1.5
log
@fix running the testsuite from the build tree
@
text
@d10 8
d21 2
a22 2
	for a in $(SIMPLETESTS); do \
		rm -f tmp.$$a.out; \
d29 1
a29 3
	echo "Running test $a"
	$(BOZOHTTPD) "$(DATA)" < $(.CURDIR)/$a.in > tmp.$a.out || true
	$(.CURDIR)/html_cmp $(.CURDIR)/$a.out tmp.$a.out
d34 1
a34 2
	echo "Running test $a"
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "$(DATA)"
@


1.5.2.1
log
@Sync with HEAD
@
text
@a9 8
VERBOSE?=	yes

.if ${VERBOSE} != "yes"
SILENT=		@@
.else
SILENT=
.endif

d13 2
a14 2
	for a in $(SIMPLETESTS) $(BIGFILETESTS); do \
		rm -f tmp.$$a.out tmp.$$a.err; \
d21 3
a23 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${VERBOSE}"
d28 2
a29 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.5.2.2
log
@Sync with HEAD
@
text
@a3 1
CGITESTS=	t11
d25 1
a25 1
check: check-simple check-cgi check-bigfile
d29 1
a29 6
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
.endfor

check-cgi:
.for a in $(CGITESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
@


1.4
log
@merge bozohttpd 20090522
@
text
@d9 1
a9 1

d22 1
a22 1
	$(BOZOHTTPD) ./data < $(.CURDIR)/$a.in > tmp.$a.out || true
d29 1
a29 1
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "./data"
@


1.4.14.1
log
@Pull up following revision(s) (requested by mrg in ticket #1377):
	libexec/httpd/CHANGES: up to 1.22
	libexec/httpd/Makefile: up to 1.26 via patch
	libexec/httpd/auth-bozo.c: up to 1.18
	libexec/httpd/bozohttpd.8: up to 1.59
	libexec/httpd/bozohttpd.c: up to 1.80 via patch
	libexec/httpd/bozohttpd.h: up to 1.45
	libexec/httpd/cgi-bozo.c: up to 1.33
	libexec/httpd/content-bozo.c: up to 1.13
	libexec/httpd/daemon-bozo.c: up to 1.17
	libexec/httpd/dir-index-bozo.c: up to 1.25
	libexec/httpd/lua-bozo.c: up to 1.14
	libexec/httpd/lua/bozo.lua: up to 1.2
	libexec/httpd/lua/glue.c: up to 1.2
	libexec/httpd/main.c: up to 1.13
	libexec/httpd/printenv.lua: up to 1.3
	libexec/httpd/ssl-bozo.c: up to 1.22
	libexec/httpd/testsuite/Makefile: up to 1.5
	libexec/httpd/testsuite/t10.out: up to 1.2
	libexec/httpd/testsuite/test-bigfile: up to 1.2
	libexec/httpd/tilde-luzah-bozo.c: up to 1.14
Import bozohttpd 20151028:
o  add CGI support for ~user translation (-E switch)
o  add redirects to ~user translation
o  fix bugs around ~user translation
o  add schema detection for absolute redirects
o  fixed few memory leaks
o  bunch of minor tweaks
o  removed -r support
o  smarter redirects
--
Changes in 20150320:
o  fix redirection handling
o  support transport stream (.ts) and video object (.vob) files
o  directory listings show correct file sizes for large files
--
updates and bozohttpd 20160415:
o  add search-word support for CGI
o  fix a security issue in CGI suffix handler support which would
   allow remote code execution, from shm@@netbsd.org
o  -C option supports now CGI scripts only
@
text
@d9 1
a9 1
DATA?=		$(.CURDIR)/data 
d22 1
a22 1
	$(BOZOHTTPD) "$(DATA)" < $(.CURDIR)/$a.in > tmp.$a.out || true
d29 1
a29 1
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "$(DATA)"
@


1.4.14.2
log
@Pull up following revision(s) (requested by mrg in ticket #1437):
	libexec/httpd/CHANGES: up to 1.25
	libexec/httpd/bozohttpd.8: up to 1.65
	libexec/httpd/bozohttpd.c: up to 1.86
	libexec/httpd/bozohttpd.h: up to 1.47
	libexec/httpd/cgi-bozo.c: up to 1.37
	libexec/httpd/content-bozo.c: up to 1.14
	libexec/httpd/libbozohttpd/libbozohttpd.3: up to 1.4
	libexec/httpd/main.c: up to 1.16
	libexec/httpd/small/Makefile: up to 1.3
	libexec/httpd/testsuite/Makefile: up to 1.7
	libexec/httpd/testsuite/cgi-bin/empty: up to 1.1
	libexec/httpd/testsuite/html_cmp: up to 1.5
	libexec/httpd/testsuite/t11.in: up to 1.1
	libexec/httpd/testsuite/t11.out: up to 1.1
	libexec/httpd/testsuite/test-bigfile: up to 1.4
	libexec/httpd/testsuite/test-simple: up to 1.4
Update bozohttpd to 20170201.  Changes:
- fix an infinite loop in cgi processing
- fixes and clean up for the testsuite
- no longer sends encoding header for compressed formats
- add a bozo_get_version() function which returns the version number
@
text
@a3 1
CGITESTS=	t11
a9 8
VERBOSE?=	yes

.if ${VERBOSE} != "yes"
SILENT=		@@
.else
SILENT=
.endif

d13 2
a14 2
	for a in $(SIMPLETESTS) $(BIGFILETESTS); do \
		rm -f tmp.$$a.out tmp.$$a.err; \
d17 1
a17 1
check: check-simple check-cgi check-bigfile
d21 3
a23 6
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
.endfor

check-cgi:
.for a in $(CGITESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
d28 2
a29 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.4.20.1
log
@Pull up following revision(s) (requested by mrg in ticket #1377):
	libexec/httpd/CHANGES: up to 1.22
	libexec/httpd/Makefile: up to 1.26 via patch
	libexec/httpd/auth-bozo.c: up to 1.18
	libexec/httpd/bozohttpd.8: up to 1.59
	libexec/httpd/bozohttpd.c: up to 1.80 via patch
	libexec/httpd/bozohttpd.h: up to 1.45
	libexec/httpd/cgi-bozo.c: up to 1.33
	libexec/httpd/content-bozo.c: up to 1.13
	libexec/httpd/daemon-bozo.c: up to 1.17
	libexec/httpd/dir-index-bozo.c: up to 1.25
	libexec/httpd/lua-bozo.c: up to 1.14
	libexec/httpd/lua/bozo.lua: up to 1.2
	libexec/httpd/lua/glue.c: up to 1.2
	libexec/httpd/main.c: up to 1.13
	libexec/httpd/printenv.lua: up to 1.3
	libexec/httpd/ssl-bozo.c: up to 1.22
	libexec/httpd/testsuite/Makefile: up to 1.5
	libexec/httpd/testsuite/t10.out: up to 1.2
	libexec/httpd/testsuite/test-bigfile: up to 1.2
	libexec/httpd/tilde-luzah-bozo.c: up to 1.14
Import bozohttpd 20151028:
o  add CGI support for ~user translation (-E switch)
o  add redirects to ~user translation
o  fix bugs around ~user translation
o  add schema detection for absolute redirects
o  fixed few memory leaks
o  bunch of minor tweaks
o  removed -r support
o  smarter redirects
--
Changes in 20150320:
o  fix redirection handling
o  support transport stream (.ts) and video object (.vob) files
o  directory listings show correct file sizes for large files
--
updates and bozohttpd 20160415:
o  add search-word support for CGI
o  fix a security issue in CGI suffix handler support which would
   allow remote code execution, from shm@@netbsd.org
o  -C option supports now CGI scripts only
@
text
@d9 1
a9 1
DATA?=		$(.CURDIR)/data 
d22 1
a22 1
	$(BOZOHTTPD) "$(DATA)" < $(.CURDIR)/$a.in > tmp.$a.out || true
d29 1
a29 1
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "$(DATA)"
@


1.4.20.2
log
@Pull up following revision(s) (requested by mrg in ticket #1437:
	libexec/httpd/CHANGES: up to 1.25
	libexec/httpd/bozohttpd.8: up to 1.65
	libexec/httpd/bozohttpd.c: up to 1.86
	libexec/httpd/bozohttpd.h: up to 1.47
	libexec/httpd/cgi-bozo.c: up to 1.37
	libexec/httpd/content-bozo.c: up to 1.14
	libexec/httpd/libbozohttpd/libbozohttpd.3: up to 1.4
	libexec/httpd/main.c: up to 1.16
	libexec/httpd/small/Makefile: up to 1.3
	libexec/httpd/testsuite/Makefile: up to 1.7
	libexec/httpd/testsuite/cgi-bin/empty: up to 1.1
	libexec/httpd/testsuite/html_cmp: up to 1.5
	libexec/httpd/testsuite/t11.in: up to 1.1
	libexec/httpd/testsuite/t11.out: up to 1.1
	libexec/httpd/testsuite/test-bigfile: up to 1.4
	libexec/httpd/testsuite/test-simple: up to 1.4
Update bozohttpd to 20170201.  Changes:
- fix an infinite loop in cgi processing
- fixes and clean up for the testsuite
- no longer sends encoding header for compressed formats
- add a bozo_get_version() function which returns the version number
@
text
@a3 1
CGITESTS=	t11
a9 8
VERBOSE?=	yes

.if ${VERBOSE} != "yes"
SILENT=		@@
.else
SILENT=
.endif

d13 2
a14 2
	for a in $(SIMPLETESTS) $(BIGFILETESTS); do \
		rm -f tmp.$$a.out tmp.$$a.err; \
d17 1
a17 1
check: check-simple check-cgi check-bigfile
d21 3
a23 6
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
.endfor

check-cgi:
.for a in $(CGITESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
d28 2
a29 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.4.8.1
log
@Pull up following revision(s) (requested by mrg in ticket #1377):
	libexec/httpd/CHANGES: up to 1.22
	libexec/httpd/Makefile: up to 1.26 via patch
	libexec/httpd/auth-bozo.c: up to 1.18
	libexec/httpd/bozohttpd.8: up to 1.59
	libexec/httpd/bozohttpd.c: up to 1.80 via patch
	libexec/httpd/bozohttpd.h: up to 1.45
	libexec/httpd/cgi-bozo.c: up to 1.33
	libexec/httpd/content-bozo.c: up to 1.13
	libexec/httpd/daemon-bozo.c: up to 1.17
	libexec/httpd/dir-index-bozo.c: up to 1.25
	libexec/httpd/lua-bozo.c: up to 1.14
	libexec/httpd/lua/bozo.lua: up to 1.2
	libexec/httpd/lua/glue.c: up to 1.2
	libexec/httpd/main.c: up to 1.13
	libexec/httpd/printenv.lua: up to 1.3
	libexec/httpd/ssl-bozo.c: up to 1.22
	libexec/httpd/testsuite/Makefile: up to 1.5
	libexec/httpd/testsuite/t10.out: up to 1.2
	libexec/httpd/testsuite/test-bigfile: up to 1.2
	libexec/httpd/tilde-luzah-bozo.c: up to 1.14
Import bozohttpd 20151028:
o  add CGI support for ~user translation (-E switch)
o  add redirects to ~user translation
o  fix bugs around ~user translation
o  add schema detection for absolute redirects
o  fixed few memory leaks
o  bunch of minor tweaks
o  removed -r support
o  smarter redirects
--
Changes in 20150320:
o  fix redirection handling
o  support transport stream (.ts) and video object (.vob) files
o  directory listings show correct file sizes for large files
--
updates and bozohttpd 20160415:
o  add search-word support for CGI
o  fix a security issue in CGI suffix handler support which would
   allow remote code execution, from shm@@netbsd.org
o  -C option supports now CGI scripts only
@
text
@d9 1
a9 1
DATA?=		$(.CURDIR)/data 
d22 1
a22 1
	$(BOZOHTTPD) "$(DATA)" < $(.CURDIR)/$a.in > tmp.$a.out || true
d29 1
a29 1
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "$(DATA)"
@


1.4.8.2
log
@Pull up following revision(s) (requested by mrg in ticket #1437):
	libexec/httpd/CHANGES: up to 1.25
	libexec/httpd/bozohttpd.8: up to 1.65
	libexec/httpd/bozohttpd.c: up to 1.86
	libexec/httpd/bozohttpd.h: up to 1.47
	libexec/httpd/cgi-bozo.c: up to 1.37
	libexec/httpd/content-bozo.c: up to 1.14
	libexec/httpd/libbozohttpd/libbozohttpd.3: up to 1.4
	libexec/httpd/main.c: up to 1.16
	libexec/httpd/small/Makefile: up to 1.3
	libexec/httpd/testsuite/Makefile: up to 1.7
	libexec/httpd/testsuite/cgi-bin/empty: up to 1.1
	libexec/httpd/testsuite/html_cmp: up to 1.5
	libexec/httpd/testsuite/t11.in: up to 1.1
	libexec/httpd/testsuite/t11.out: up to 1.1
	libexec/httpd/testsuite/test-bigfile: up to 1.4
	libexec/httpd/testsuite/test-simple: up to 1.4
Update bozohttpd to 20170201.  Changes:
- fix an infinite loop in cgi processing
- fixes and clean up for the testsuite
- no longer sends encoding header for compressed formats
- add a bozo_get_version() function which returns the version number
@
text
@a3 1
CGITESTS=	t11
a9 8
VERBOSE?=	yes

.if ${VERBOSE} != "yes"
SILENT=		@@
.else
SILENT=
.endif

d13 2
a14 2
	for a in $(SIMPLETESTS) $(BIGFILETESTS); do \
		rm -f tmp.$$a.out tmp.$$a.err; \
d17 1
a17 1
check: check-simple check-cgi check-bigfile
d21 3
a23 6
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
.endfor

check-cgi:
.for a in $(CGITESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
d28 2
a29 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.4.26.1
log
@Pull up following revision(s) (requested by mrg in ticket #1141):
	libexec/httpd/CHANGES: up to 1.22
	libexec/httpd/Makefile: up to 1.26
	libexec/httpd/auth-bozo.c: up to 1.18
	libexec/httpd/bozohttpd.8: up to 1.59
	libexec/httpd/bozohttpd.c: up to 1.80
	libexec/httpd/bozohttpd.h: up to 1.45
	libexec/httpd/cgi-bozo.c: up to 1.33
	libexec/httpd/content-bozo.c: up to 1.13
	libexec/httpd/daemon-bozo.c: up to 1.17
	libexec/httpd/dir-index-bozo.c: up to 1.25
	libexec/httpd/lua-bozo.c: up to 1.14
	libexec/httpd/lua/bozo.lua: up to 1.2
	libexec/httpd/lua/glue.c: up to 1.2
	libexec/httpd/main.c: up to 1.13
	libexec/httpd/printenv.lua: up to 1.3
	libexec/httpd/ssl-bozo.c: up to 1.22
	libexec/httpd/testsuite/Makefile: up to 1.5
	libexec/httpd/testsuite/test-bigfile: up to 1.2
	libexec/httpd/tilde-luzah-bozo.c: up to 1.14
Import bozohttpd 20151028:
o  add CGI support for ~user translation (-E switch)
o  add redirects to ~user translation
o  fix bugs around ~user translation
o  add schema detection for absolute redirects
o  fixed few memory leaks
o  bunch of minor tweaks
o  removed -r support
o  smarter redirects
Changes in 20150320:
o  fix redirection handling
o  support transport stream (.ts) and video object (.vob) files
o  directory listings show correct file sizes for large files
--
updates and bozohttpd 20160415:
o  add search-word support for CGI
o  fix a security issue in CGI suffix handler support which would
   allow remote code execution, from shm@@netbsd.org
o  -C option supports now CGI scripts only
@
text
@d9 1
a9 1
DATA?=		$(.CURDIR)/data 
d22 1
a22 1
	$(BOZOHTTPD) "$(DATA)" < $(.CURDIR)/$a.in > tmp.$a.out || true
d29 1
a29 1
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "$(DATA)"
@


1.4.26.2
log
@Pull up following revision(s) (requested by mrg in ticket #1309):
	libexec/httpd/CHANGES: revisions 1.23, 1.24
	libexec/httpd/bozohttpd.8: revisions 1.60-1.62
	libexec/httpd/bozohttpd.c: revisions 1.81-1.84
	libexec/httpd/bozohttpd.h: revision 1.46
	libexec/httpd/cgi-bozo.c: revision 1.35
	libexec/httpd/content-bozo.c: revision 1.14
	libexec/httpd/main.c: revisions 1.14-1.16
	libexec/httpd/testsuite/Makefile: revision 1.6
	libexec/httpd/testsuite/test-bigfile: revision 1.3
	libexec/httpd/testsuite/test-simple: revisions 1.1, 1.2
update bozohttpd to 2016072:
- fix memory leak
- addd -G option to display version
- fix some content type issues
- fix issues in testsuite
@
text
@a9 8
VERBOSE?=	yes

.if ${VERBOSE} != "yes"
SILENT=		@@
.else
SILENT=
.endif

d13 2
a14 2
	for a in $(SIMPLETESTS) $(BIGFILETESTS); do \
		rm -f tmp.$$a.out tmp.$$a.err; \
d21 3
a23 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${VERBOSE}"
d28 2
a29 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.4.26.3
log
@Pull up following revision(s) (requested by mrg in ticket #1357):
	libexec/httpd/CHANGES: revision 1.25
	libexec/httpd/bozohttpd.8: revisions 1.63-1.65
	libexec/httpd/bozohttpd.c: revisions 1.85, 1.86
	libexec/httpd/bozohttpd.h: revision 1.47
	libexec/httpd/cgi-bozo.c: revisions 1.36, 1.37
	libexec/httpd/libbozohttpd/libbozohttpd.3: revision 1.4
	libexec/httpd/testsuite/Makefile: revision 1.7
	libexec/httpd/testsuite/html_cmp: revision 1.5
	libexec/httpd/testsuite/test-bigfile: revision 1.4
	libexec/httpd/testsuite/test-simple: revisions 1.3, 1.4
	libexec/httpd/testsuite/t11.in: revision 1.1
	libexec/httpd/testsuite/t11.out: revision 1.1
	libexec/httpd/testsuite/cgi-bin/empty: revision 1.1
Update bozohttpd to 20170201:
- fix an infinite loop in cgi processing
- fixes and clean up for the testsuite
- no longer sends encoding header for compressed formats
@
text
@a3 1
CGITESTS=	t11
d25 1
a25 1
check: check-simple check-cgi check-bigfile
d29 1
a29 6
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
.endfor

check-cgi:
.for a in $(CGITESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
@


1.4.26.4
log
@Sync to HEAD (requested by mrg in ticket #1655):

	libexec/httpd/testsuite/data/.bzremap           up to 1.1
	libexec/httpd/testsuite/t12.out                 up to 1.1
	libexec/httpd/testsuite/t12.in                  up to 1.1
	libexec/httpd/testsuite/t13.out                 up to 1.1
	libexec/httpd/testsuite/t13.in                  up to 1.1
	libexec/httpd/testsuite/t14.out                 up to 1.1
	libexec/httpd/testsuite/t14.in                  up to 1.1
	libexec/httpd/testsuite/t15.out                 up to 1.1
	libexec/httpd/testsuite/t15.in                  up to 1.1
	libexec/httpd/CHANGES                           up to 1.28
	libexec/httpd/Makefile                          up to 1.27
	libexec/httpd/auth-bozo.c                       up to 1.22
	libexec/httpd/bozohttpd.8                       up to 1.74
	libexec/httpd/bozohttpd.c                       up to 1.96
	libexec/httpd/bozohttpd.h                       up to 1.56
	libexec/httpd/cgi-bozo.c                        up to 1.44
	libexec/httpd/content-bozo.c                    up to 1.16
	libexec/httpd/daemon-bozo.c                     up to 1.19
	libexec/httpd/dir-index-bozo.c                  up to 1.28
	libexec/httpd/lua-bozo.c                        up to 1.15
	libexec/httpd/main.c                            up to 1.21
	libexec/httpd/ssl-bozo.c                        up to 1.25
	libexec/httpd/tilde-luzah-bozo.c                up to 1.16
	libexec/httpd/libbozohttpd/Makefile             up to 1.3
	libexec/httpd/lua/bozo.lua                      up to 1.3
	libexec/httpd/lua/glue.c                        up to 1.5
	libexec/httpd/lua/optparse.lua                  up to 1.2
	libexec/httpd/testsuite/Makefile                up to 1.11
	libexec/httpd/testsuite/html_cmp                up to 1.6
	libexec/httpd/testsuite/t3.out                  up to 1.4
	libexec/httpd/testsuite/t5.out                  up to 1.4
	libexec/httpd/testsuite/t6.out                  up to 1.4
	libexec/httpd/testsuite/test-bigfile            up to 1.5
	libexec/httpd/testsuite/test-simple             up to 1.5

Cosmetic changes to Lua binding in bozohttpd.

- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
  doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
  manual. Those functions may throw (longjump) and leak data allocated
  by C function. In one case, I use luaL_Buffer, in the other case,
  I rearranged calls a bit.


fix ordering of a couple of words.  from Edgar Pettijohn in PR#52375.
thanks!


s/u_int/unsigned/.

from Jan Danielsson.  increases/fixes portability.


PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.


Document script handler issues with httpd(8).
From martin@@, addressing PR 52194.

While here, use American spelling consistently and upper-case some
abbreviations.

Bump date.


fix output since protocol agnostic change went in.

XXX: i thought someone hooked this into atf already, please do :)


Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@@


Bump date


Remove trailing whitespace.


use __func__ in debug().


fix a denial of service attack against header contents, which
is now bounded at 16KiB.  reported by JP.


avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.


note the changes present in bozohttpd 20181118:

o  add url remap support via .bzremap file, from martin%netbsd.org@@localhost
o  handle redirections for any protocol, not just http:
o  fix a denial of service attack against header contents, which
   is now bounded at 16KiB.  reported by JP.


from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
   initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.

the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.

reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.

clean up option and usage handling some.


move some #if support into bozohttpd.h.


fix previous: have_debug was reversed.


also fix have_dynamic_content from the previous previous.  re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.


- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.


two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate.  now 10000 byte files say 10kB not 9kB.


use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)


many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines


alpha sort the option switch.


add an assert() check on array bounds.


minor style fixes.  simplify bozo_match_content_map().
@
text
@d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15
a11 1
HOST?=		test.eterna
d30 1
a30 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}"
d35 1
a35 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}" -c "${.CURDIR}/cgi-bin"
d40 1
a40 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}" "${HOST}"
@


1.4.26.5
log
@Pull up the following revisions (via patch) requested by mrg in ticket #1699:

	libexec/httpd/CHANGES			1.31-1.40
	libexec/httpd/Makefile			1.28
	libexec/httpd/auth-bozo.c		1.23-1.24
	libexec/httpd/bozohttpd.8		1.75-1.79
	libexec/httpd/bozohttpd.c		1.100-1.113
	libexec/httpd/bozohttpd.h		1.58-1.60
	libexec/httpd/cgi-bozo.c		1.46-1.48
	libexec/httpd/daemon-bozo.c		1.20-1.21
	libexec/httpd/dir-index-bozo.c		1.29-1.32
	libexec/httpd/ssl-bozo.c		1.26
	libexec/httpd/testsuite/Makefile	1.12-1.13
	libexec/httpd/testsuite/t11.out 	1.2
	libexec/httpd/testsuite/test-bigfile	1.6
	libexec/httpd/testsuite/test-simple	1.6

Don't display special files in the directory index.  They aren't
served, but links to them are generated.
---
All from "Rajeev V. Pillai" <rajeev_v_pillai@@yahoo.com>:
- use html tables for directory index.
- don't include "index.html" in html headers
- additional escaping of names
- re-add top/bottom borders
- adds an aquamarine table header
- Zebra-stripes table rows using CSS instead of code
- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().
- avoid sign extension in % handling
fix a few problems pointed out by clang static analyzer:
- bozostrnsep() may return with "in = NULL", so check for it.
- nul terminating in bozo_escape_rfc3986() can be simpler
- don't use uniinit variables in check_remap()
- don't use re-used freed data in check_virtual().
- fix bozoprefs->size setting when increasing the size (new total was
  being added to the prior total.)
  however, bozostrdup() may reference request->hr_file.
---
Add ssl specific timeout value (30s).  If SSL_accept() doesn't
work with in this timeout value, ssl setup now fails.
---
Fix handling of bozo_set_timeout() timeouts (and `-T' option parsing)
---
Avoid .htpasswd exposure to authenticated users when .htpasswd is
in the slashdir too.
---
Avoid possible NULL dereference when sending a big request that timeout.
---
Use strings.h for strcasecmp (on linux)
---
Account for cgihandler being set when counting the number of CGI environment
headers we are about to set. Avoids an assertion failure (and overruninng
the array) later.
@
text
@a0 1
#	$NetBSD$
d12 1
d31 1
a31 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
d36 1
a36 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
d41 1
a41 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.4.24.1
log
@Catch up to -current (via patch), requested by mspo in #1141:

	libexec/httpd/CHANGES                          	 up to 1.21
	libexec/httpd/Makefile                         	 up to 1.26
	libexec/httpd/auth-bozo.c                      	 up to 1.18
	libexec/httpd/bozohttpd.8                      	 up to 1.58
	libexec/httpd/bozohttpd.c                      	 up to 1.79
	libexec/httpd/bozohttpd.h                      	 up to 1.44
	libexec/httpd/cgi-bozo.c                       	 up to 1.32
	libexec/httpd/content-bozo.c                   	 up to 1.13
	libexec/httpd/daemon-bozo.c                    	 up to 1.17
	libexec/httpd/dir-index-bozo.c                 	 up to 1.25
	libexec/httpd/lua-bozo.c                       	 up to 1.14
	libexec/httpd/main.c                           	 up to 1.13
	libexec/httpd/netbsd_queue.h                   	 up to 1.1
	libexec/httpd/printenv.lua                     	 up to 1.3
	libexec/httpd/ssl-bozo.c                       	 up to 1.22
	libexec/httpd/tilde-luzah-bozo.c               	 up to 1.14
	libexec/httpd/testsuite/Makefile               	 up to 1.5
	libexec/httpd/testsuite/test-bigfile           	 up to 1.2

Import bozohttpd 20151028:
o  add CGI support for ~user translation (-E switch)
o  add redirects to ~user translation
o  fix bugs around ~user translation
o  add schema detection for absolute redirects
o  fixed few memory leaks
o  bunch of minor tweaks
o  removed -r support
o  smarter redirects
Changes in 20150320:
o  fix redirection handling
o  support transport stream (.ts) and video object (.vob) files
o  directory listings show correct file sizes for large files
@
text
@d9 1
a9 1
DATA?=		$(.CURDIR)/data 
d22 1
a22 1
	$(BOZOHTTPD) "$(DATA)" < $(.CURDIR)/$a.in > tmp.$a.out || true
d29 1
a29 1
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "$(DATA)"
@


1.4.24.1.2.1
log
@Sync with netbsd-5
@
text
@a9 8
VERBOSE?=	yes

.if ${VERBOSE} != "yes"
SILENT=		@@
.else
SILENT=
.endif

d13 2
a14 2
	for a in $(SIMPLETESTS) $(BIGFILETESTS); do \
		rm -f tmp.$$a.out tmp.$$a.err; \
d21 3
a23 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${VERBOSE}"
d28 2
a29 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.4.24.1.2.2
log
@Sync with netbsd-7-1-RELEASE
@
text
@a3 1
CGITESTS=	t11
d25 1
a25 1
check: check-simple check-cgi check-bigfile
d29 1
a29 6
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
.endfor

check-cgi:
.for a in $(CGITESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
@


1.4.24.2
log
@Pull up following revision(s) (requested by mrg in ticket #1309):
	libexec/httpd/CHANGES: revisions 1.23, 1.24
	libexec/httpd/bozohttpd.8: revisions 1.60-1.62
	libexec/httpd/bozohttpd.c: revisions 1.81-1.84
	libexec/httpd/bozohttpd.h: revision 1.46
	libexec/httpd/cgi-bozo.c: revision 1.35
	libexec/httpd/content-bozo.c: revision 1.14
	libexec/httpd/main.c: revisions 1.14-1.16
	libexec/httpd/testsuite/Makefile: revision 1.6
	libexec/httpd/testsuite/test-bigfile: revision 1.3
	libexec/httpd/testsuite/test-simple: revisions 1.1, 1.2
update bozohttpd to 2016072:
- fix memory leak
- addd -G option to display version
- fix some content type issues
- fix issues in testsuite
@
text
@a9 8
VERBOSE?=	yes

.if ${VERBOSE} != "yes"
SILENT=		@@
.else
SILENT=
.endif

d13 2
a14 2
	for a in $(SIMPLETESTS) $(BIGFILETESTS); do \
		rm -f tmp.$$a.out tmp.$$a.err; \
d21 3
a23 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${VERBOSE}"
d28 2
a29 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.4.24.3
log
@Pull up following revision(s) (requested by mrg in ticket #1357):
	libexec/httpd/CHANGES: revision 1.25
	libexec/httpd/bozohttpd.8: revisions 1.63-1.65
	libexec/httpd/bozohttpd.c: revisions 1.85, 1.86
	libexec/httpd/bozohttpd.h: revision 1.47
	libexec/httpd/cgi-bozo.c: revisions 1.36, 1.37
	libexec/httpd/libbozohttpd/libbozohttpd.3: revision 1.4
	libexec/httpd/testsuite/Makefile: revision 1.7
	libexec/httpd/testsuite/html_cmp: revision 1.5
	libexec/httpd/testsuite/test-bigfile: revision 1.4
	libexec/httpd/testsuite/test-simple: revisions 1.3, 1.4
	libexec/httpd/testsuite/t11.in: revision 1.1
	libexec/httpd/testsuite/t11.out: revision 1.1
	libexec/httpd/testsuite/cgi-bin/empty: revision 1.1
Update bozohttpd to 20170201:
- fix an infinite loop in cgi processing
- fixes and clean up for the testsuite
- no longer sends encoding header for compressed formats
@
text
@a3 1
CGITESTS=	t11
d25 1
a25 1
check: check-simple check-cgi check-bigfile
d29 1
a29 6
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
.endfor

check-cgi:
.for a in $(CGITESTS)
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
@


1.4.24.3.2.1
log
@Sync to HEAD (requested by mrg in ticket #1655):

	libexec/httpd/testsuite/data/.bzremap           up to 1.1
	libexec/httpd/testsuite/t12.out                 up to 1.1
	libexec/httpd/testsuite/t12.in                  up to 1.1
	libexec/httpd/testsuite/t13.out                 up to 1.1
	libexec/httpd/testsuite/t13.in                  up to 1.1
	libexec/httpd/testsuite/t14.out                 up to 1.1
	libexec/httpd/testsuite/t14.in                  up to 1.1
	libexec/httpd/testsuite/t15.out                 up to 1.1
	libexec/httpd/testsuite/t15.in                  up to 1.1
	libexec/httpd/CHANGES                           up to 1.28
	libexec/httpd/Makefile                          up to 1.27
	libexec/httpd/auth-bozo.c                       up to 1.22
	libexec/httpd/bozohttpd.8                       up to 1.74
	libexec/httpd/bozohttpd.c                       up to 1.96
	libexec/httpd/bozohttpd.h                       up to 1.56
	libexec/httpd/cgi-bozo.c                        up to 1.44
	libexec/httpd/content-bozo.c                    up to 1.16
	libexec/httpd/daemon-bozo.c                     up to 1.19
	libexec/httpd/dir-index-bozo.c                  up to 1.28
	libexec/httpd/lua-bozo.c                        up to 1.15
	libexec/httpd/main.c                            up to 1.21
	libexec/httpd/ssl-bozo.c                        up to 1.25
	libexec/httpd/tilde-luzah-bozo.c                up to 1.16
	libexec/httpd/libbozohttpd/Makefile             up to 1.3
	libexec/httpd/lua/bozo.lua                      up to 1.3
	libexec/httpd/lua/glue.c                        up to 1.5
	libexec/httpd/lua/optparse.lua                  up to 1.2
	libexec/httpd/testsuite/Makefile                up to 1.11
	libexec/httpd/testsuite/html_cmp                up to 1.6
	libexec/httpd/testsuite/t3.out                  up to 1.4
	libexec/httpd/testsuite/t5.out                  up to 1.4
	libexec/httpd/testsuite/t6.out                  up to 1.4
	libexec/httpd/testsuite/test-bigfile            up to 1.5
	libexec/httpd/testsuite/test-simple             up to 1.5

Cosmetic changes to Lua binding in bozohttpd.

- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
  doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
  manual. Those functions may throw (longjump) and leak data allocated
  by C function. In one case, I use luaL_Buffer, in the other case,
  I rearranged calls a bit.


fix ordering of a couple of words.  from Edgar Pettijohn in PR#52375.
thanks!


s/u_int/unsigned/.

from Jan Danielsson.  increases/fixes portability.


PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.


Document script handler issues with httpd(8).
From martin@@, addressing PR 52194.

While here, use American spelling consistently and upper-case some
abbreviations.

Bump date.


fix output since protocol agnostic change went in.

XXX: i thought someone hooked this into atf already, please do :)


Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@@


Bump date


Remove trailing whitespace.


use __func__ in debug().


fix a denial of service attack against header contents, which
is now bounded at 16KiB.  reported by JP.


avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.


note the changes present in bozohttpd 20181118:

o  add url remap support via .bzremap file, from martin%netbsd.org@@localhost
o  handle redirections for any protocol, not just http:
o  fix a denial of service attack against header contents, which
   is now bounded at 16KiB.  reported by JP.


from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
   initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.

the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.

reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.

clean up option and usage handling some.


move some #if support into bozohttpd.h.


fix previous: have_debug was reversed.


also fix have_dynamic_content from the previous previous.  re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.


- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.


two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate.  now 10000 byte files say 10kB not 9kB.


use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)


many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines


alpha sort the option switch.


add an assert() check on array bounds.


minor style fixes.  simplify bozo_match_content_map().
@
text
@d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15
a11 1
HOST?=		test.eterna
d30 1
a30 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}"
d35 1
a35 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}" -c "${.CURDIR}/cgi-bin"
d40 1
a40 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}" "${HOST}"
@


1.4.24.3.2.2
log
@Pull up the following revisions (via patch) requested by mrg in ticket #1699:

	libexec/httpd/CHANGES			1.31-1.40
	libexec/httpd/Makefile			1.28
	libexec/httpd/auth-bozo.c		1.23-1.24
	libexec/httpd/bozohttpd.8		1.75-1.79
	libexec/httpd/bozohttpd.c		1.100-1.113
	libexec/httpd/bozohttpd.h		1.58-1.60
	libexec/httpd/cgi-bozo.c		1.46-1.48
	libexec/httpd/daemon-bozo.c		1.20-1.21
	libexec/httpd/dir-index-bozo.c		1.29-1.32
	libexec/httpd/ssl-bozo.c		1.26
	libexec/httpd/testsuite/Makefile	1.12-1.13
	libexec/httpd/testsuite/t11.out 	1.2
	libexec/httpd/testsuite/test-bigfile	1.6
	libexec/httpd/testsuite/test-simple	1.6

Don't display special files in the directory index.  They aren't
served, but links to them are generated.
---
All from "Rajeev V. Pillai" <rajeev_v_pillai@@yahoo.com>:
- use html tables for directory index.
- don't include "index.html" in html headers
- additional escaping of names
- re-add top/bottom borders
- adds an aquamarine table header
- Zebra-stripes table rows using CSS instead of code
- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().
- avoid sign extension in % handling
fix a few problems pointed out by clang static analyzer:
- bozostrnsep() may return with "in = NULL", so check for it.
- nul terminating in bozo_escape_rfc3986() can be simpler
- don't use uniinit variables in check_remap()
- don't use re-used freed data in check_virtual().
- fix bozoprefs->size setting when increasing the size (new total was
  being added to the prior total.)
  however, bozostrdup() may reference request->hr_file.
---
Add ssl specific timeout value (30s).  If SSL_accept() doesn't
work with in this timeout value, ssl setup now fails.
---
Fix handling of bozo_set_timeout() timeouts (and `-T' option parsing)
---
Avoid .htpasswd exposure to authenticated users when .htpasswd is
in the slashdir too.
---
Avoid possible NULL dereference when sending a big request that timeout.
---
Use strings.h for strcasecmp (on linux)
---
Account for cgihandler being set when counting the number of CGI environment
headers we are about to set. Avoids an assertion failure (and overruninng
the array) later.
@
text
@a0 1
#	$NetBSD$
d12 1
d31 1
a31 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
d36 1
a36 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
d41 1
a41 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.4.24.4
log
@Sync to HEAD (requested by mrg in ticket #1655):

	libexec/httpd/testsuite/data/.bzremap           up to 1.1
	libexec/httpd/testsuite/t12.out                 up to 1.1
	libexec/httpd/testsuite/t12.in                  up to 1.1
	libexec/httpd/testsuite/t13.out                 up to 1.1
	libexec/httpd/testsuite/t13.in                  up to 1.1
	libexec/httpd/testsuite/t14.out                 up to 1.1
	libexec/httpd/testsuite/t14.in                  up to 1.1
	libexec/httpd/testsuite/t15.out                 up to 1.1
	libexec/httpd/testsuite/t15.in                  up to 1.1
	libexec/httpd/CHANGES                           up to 1.28
	libexec/httpd/Makefile                          up to 1.27
	libexec/httpd/auth-bozo.c                       up to 1.22
	libexec/httpd/bozohttpd.8                       up to 1.74
	libexec/httpd/bozohttpd.c                       up to 1.96
	libexec/httpd/bozohttpd.h                       up to 1.56
	libexec/httpd/cgi-bozo.c                        up to 1.44
	libexec/httpd/content-bozo.c                    up to 1.16
	libexec/httpd/daemon-bozo.c                     up to 1.19
	libexec/httpd/dir-index-bozo.c                  up to 1.28
	libexec/httpd/lua-bozo.c                        up to 1.15
	libexec/httpd/main.c                            up to 1.21
	libexec/httpd/ssl-bozo.c                        up to 1.25
	libexec/httpd/tilde-luzah-bozo.c                up to 1.16
	libexec/httpd/libbozohttpd/Makefile             up to 1.3
	libexec/httpd/lua/bozo.lua                      up to 1.3
	libexec/httpd/lua/glue.c                        up to 1.5
	libexec/httpd/lua/optparse.lua                  up to 1.2
	libexec/httpd/testsuite/Makefile                up to 1.11
	libexec/httpd/testsuite/html_cmp                up to 1.6
	libexec/httpd/testsuite/t3.out                  up to 1.4
	libexec/httpd/testsuite/t5.out                  up to 1.4
	libexec/httpd/testsuite/t6.out                  up to 1.4
	libexec/httpd/testsuite/test-bigfile            up to 1.5
	libexec/httpd/testsuite/test-simple             up to 1.5

Cosmetic changes to Lua binding in bozohttpd.

- Don't use negative indicies to read arguments of Lua functions.
- On error, return nil, "error string".
- Use ssize_t for return values from bozo_read() and bozo_write().
- Prefer lstring especially when if saves you from appending NUL and
  doing len + 1 which can potentially wraparound.
- Don't mix C allocations with Lua functions marked with "m" in the Lua
  manual. Those functions may throw (longjump) and leak data allocated
  by C function. In one case, I use luaL_Buffer, in the other case,
  I rearranged calls a bit.


fix ordering of a couple of words.  from Edgar Pettijohn in PR#52375.
thanks!


s/u_int/unsigned/.

from Jan Danielsson.  increases/fixes portability.


PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.


Document script handler issues with httpd(8).
From martin@@, addressing PR 52194.

While here, use American spelling consistently and upper-case some
abbreviations.

Bump date.


fix output since protocol agnostic change went in.

XXX: i thought someone hooked this into atf already, please do :)


Add support for remapping requested paths via a .bzredirect file.
Fixes PR 52772. Ok: mrg@@


Bump date


Remove trailing whitespace.


use __func__ in debug().


fix a denial of service attack against header contents, which
is now bounded at 16KiB.  reported by JP.


avoid memory leak in sending multiple auth headers.
mostly mitigated by previous patch to limit total header size,
but still a real problem here.


note the changes present in bozohttpd 20181118:

o  add url remap support via .bzremap file, from martin%netbsd.org@@localhost
o  handle redirections for any protocol, not just http:
o  fix a denial of service attack against header contents, which
   is now bounded at 16KiB.  reported by JP.


from CHANGES:

o  reduce default timeouts, and add expand timeouts to handle the
   initial line, each header, and the total time spent
o  add -T option to expose new timeout settings
o  minor RFC fixes related to timeout handling responses

old timeouts:
60 seconds for initial request like, 60 seconds per header line,
and no whole timeout (though the recent total header size changes
do introduce one that would be about 11 hours.)
new timeouts:
30 seconds for initial request like, 10 seconds per header line,
and a total request time of 600 seconds.

the new global timeout is implemented using CLOCK_MONOTONIC, with
a fallback to CLOCK_REALTIME if monotonic time is unavailable.

reject multiple Host: headers.  besides being protocol standard,
this closes one additional memory leak found by JP.  add a simple
test to check this.

clean up option and usage handling some.


move some #if support into bozohttpd.h.


fix previous: have_debug was reversed.


also fix have_dynamic_content from the previous previous.  re-order
the debug and dynamic content to match the same pattern as everything
else so similar problems are less likely in the future.


- move special files defines into bozohttpd.h, so we can ...
- consolidate all the special file checks into
  bozo_check_special_files() so that all builds check the same
  list of special files, regardless of build options.
- convert "(void)bozo_http_error(...); return -1;" into plain
  "return bozo_http_error(...);"
- fix the call to bozo_check_special_files() to be used on all
  input types.  part of the fixes for failure to reject access
  to /.htpasswd as reported by JP on tech-security.
- use warn_unused_result attribute on bozo_check_special_files(),
  and fix the failures to return failure.  second part of the
  htpasswd access fix.
- update testsuite to use a fixed fake hostname.

call this bozohttpd 20181121.


two fixes reported by mouse:
- don't check contents of 'st' if stat(2) failed.
- round up instead of truncate.  now 10000 byte files say 10kB not 9kB.


use MAP_SHARED for the bzremap file.  avoids netbsd kernel complaining:

WARNING: defaulted mmap() share type to MAP_PRIVATE (pid 15478 command bozohttpd)


many clean ups:
- keep a list of special files and their human names
- remove (void) casts on bozo_http_error()
- fix a few more misuses of bozo_http_error()
- rename check_mapping() to check_remap() and perform some CSE
- switch away from ``%s'' to '%s'
- remove a bunch of #ifdef using new have_feature defines


alpha sort the option switch.


add an assert() check on array bounds.


minor style fixes.  simplify bozo_match_content_map().
@
text
@d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t12 t13 t14 t15
a11 1
HOST?=		test.eterna
d30 1
a30 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}"
d35 1
a35 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" "${HOST}" -c "${.CURDIR}/cgi-bin"
d40 1
a40 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}" "${HOST}"
@


1.4.24.5
log
@Pull up the following revisions (via patch) requested by mrg in ticket #1699:

	libexec/httpd/CHANGES			1.31-1.40
	libexec/httpd/Makefile			1.28
	libexec/httpd/auth-bozo.c		1.23-1.24
	libexec/httpd/bozohttpd.8		1.75-1.79
	libexec/httpd/bozohttpd.c		1.100-1.113
	libexec/httpd/bozohttpd.h		1.58-1.60
	libexec/httpd/cgi-bozo.c		1.46-1.48
	libexec/httpd/daemon-bozo.c		1.20-1.21
	libexec/httpd/dir-index-bozo.c		1.29-1.32
	libexec/httpd/ssl-bozo.c		1.26
	libexec/httpd/testsuite/Makefile	1.12-1.13
	libexec/httpd/testsuite/t11.out 	1.2
	libexec/httpd/testsuite/test-bigfile	1.6
	libexec/httpd/testsuite/test-simple	1.6

Don't display special files in the directory index.  They aren't
served, but links to them are generated.
---
All from "Rajeev V. Pillai" <rajeev_v_pillai@@yahoo.com>:
- use html tables for directory index.
- don't include "index.html" in html headers
- additional escaping of names
- re-add top/bottom borders
- adds an aquamarine table header
- Zebra-stripes table rows using CSS instead of code
- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().
- avoid sign extension in % handling
fix a few problems pointed out by clang static analyzer:
- bozostrnsep() may return with "in = NULL", so check for it.
- nul terminating in bozo_escape_rfc3986() can be simpler
- don't use uniinit variables in check_remap()
- don't use re-used freed data in check_virtual().
- fix bozoprefs->size setting when increasing the size (new total was
  being added to the prior total.)
  however, bozostrdup() may reference request->hr_file.
---
Add ssl specific timeout value (30s).  If SSL_accept() doesn't
work with in this timeout value, ssl setup now fails.
---
Fix handling of bozo_set_timeout() timeouts (and `-T' option parsing)
---
Avoid .htpasswd exposure to authenticated users when .htpasswd is
in the slashdir too.
---
Avoid possible NULL dereference when sending a big request that timeout.
---
Use strings.h for strcasecmp (on linux)
---
Account for cgihandler being set when counting the number of CGI environment
headers we are about to set. Avoids an assertion failure (and overruninng
the array) later.
@
text
@a0 1
#	$NetBSD$
d12 1
d31 1
a31 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}"
d36 1
a36 1
	${SILENT}$(.CURDIR)/test-simple "$a" "${BOZOHTTPD}" "${DATA}" "${.CURDIR}" "${VERBOSE}" -c "${.CURDIR}/cgi-bin"
d41 1
a41 1
	${SILENT}$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "${DATA}" "${VERBOSE}"
@


1.3
log
@re-add a lot of the distribution files
@
text
@d1 1
a1 1
#	$eterna: Makefile,v 1.13 2008/03/04 04:46:38 mrg Exp $
d4 2
d7 2
d17 3
a19 1
check:
d26 6
@


1.2
log
@Get httpd ready for inclusion in build.
@
text
@d1 1
a1 1
#	$eterna: Makefile,v 1.11 2002/10/02 15:47:33 mrg Exp $
d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6
@


1.2.16.1
log
@Pull up following revision(s) (requested by mrg in ticket #1913):
libexec/httpd/CHANGES				1.3-1.18
libexec/httpd/Makefile				1.8-1.22 via patch
libexec/httpd/Makefile.boot			1.3-1.6
libexec/httpd/auth-bozo.c			1.5-1.13
libexec/httpd/bozohttpd.8			1.6-1.46
libexec/httpd/bozohttpd.c			1.8,1.12-1.54
libexec/httpd/bozohttpd.h			1.8-1.32
libexec/httpd/cgi-bozo.c			1.11-1.25
libexec/httpd/content-bozo.c			1.4-1.10
libexec/httpd/daemon-bozo.c			1.5-1.16
libexec/httpd/dir-index-bozo.c			1.6-1.19
libexec/httpd/ssl-bozo.c			1.5-1.16
libexec/httpd/tilde-luzah-bozo.c		1.5-1.10
libexec/httpd/lua-bozo.c			1.1-1.9
libexec/httpd/main.c				1.1-1.7
libexec/httpd/netbsd_queue.h			1.1
libexec/httpd/printenv.lua			1.1-1.2
libexec/httpd/debug/Makefile			1.1
libexec/httpd/libbozohttpd/Makefile		1.2
libexec/httpd/libbozohttpd/libbozohttpd.3	1.3
libexec/httpd/libbozohttpd/shlib_version	1.1
libexec/httpd/lua/Makefile			1.1
libexec/httpd/lua/bozo.lua			1.1
libexec/httpd/lua/glue.c			1.1
libexec/httpd/lua/optparse.lua			1.1
libexec/httpd/lua/shlib_version			1.1
libexec/httpd/small/Makefile			1.1-1.2
libexec/httpd/testsuite/Makefile		1.4
libexec/httpd/testsuite/html_cmp		1.4
libexec/httpd/testsuite/t1.in			1.3
libexec/httpd/testsuite/t1.out			1.3
libexec/httpd/testsuite/t10.in			1.1
libexec/httpd/testsuite/t10.out			1.1
libexec/httpd/testsuite/t2.in			1.3
libexec/httpd/testsuite/t2.out			1.3
libexec/httpd/testsuite/t3.in			1.3
libexec/httpd/testsuite/t3.out			1.3
libexec/httpd/testsuite/t4.in			1.3
libexec/httpd/testsuite/t4.out			1.3
libexec/httpd/testsuite/t5.in			1.3
libexec/httpd/testsuite/t5.out			1.3
libexec/httpd/testsuite/t6.in			1.3
libexec/httpd/testsuite/t6.out			1.3
libexec/httpd/testsuite/t7.in			1.3
libexec/httpd/testsuite/t7.out			1.3
libexec/httpd/testsuite/t8.in			1.3
libexec/httpd/testsuite/t8.out			1.3
libexec/httpd/testsuite/t9.in			1.3
libexec/httpd/testsuite/t9.out			1.3
libexec/httpd/testsuite/test-bigfile		1.1
libexec/httpd/testsuite/data/bigfile		1.1
libexec/httpd/testsuite/data/bigfile.partial4000 1.1
libexec/httpd/testsuite/data/bigfile.partial8000 1.1
libexec/httpd/testsuite/data/file		1.3
libexec/httpd/testsuite/data/index.html		1.3

	Update bozohttpd from 20080303+patches to 20140708.

changes in bozohttpd 20140708:
	o  fixes for virtual host support, from rajeev_v_pillai@@yahoo.com
	o  avoid printing double errors, from shm@@netbsd.org
	o  fix a security issue in basic HTTP authentication which would allow
	   authentication to be bypassed, from shm@@netbsd.org

changes in bozohttpd 20140201:
	o  support .svg files
	o  fix a core dump when requests timeout

changes in bozohttpd 20140102:
	o  update a few content types
	o  add support for directly calling lua scripts to handle
	   processes, from mbalmer@@netbsd.org
	o  properly escape generated HTML
	o  add authentication for redirections, from martin@@netbsd.org
	o  handle chained ssl certifications, from elric@@netbsd.org
	o  add basic support for gzipped files, from elric@@netbsd.org
	o  properly escape generated URIs

changes in bozohttpd 20111118:
	o  add -P <pidfile> option, from jmmv@@netbsd.org
	o  avoid crashes with http basic auth, from pooka@@netbsd.org
	o  add support for REDIRECT_STATUS variable, from tls@@netbsd.org
	o  support .mp4 files in the default map
	o  directory indexes with files with : are now displayed properly, from
	   reed@@netbsd.org
	o  allow -I option to be useful in non-inetd mode as well

changes in bozohttpd 20100920:
	o  properly fully disable multi-file mode for now
	o  fix the -t and -U options when used without the -e option, broken since
	   the library-ifcation
	o  be explicit that logs go to the FTP facility in syslog
	o  use scandir() with alphasort() for sorted directory lists, from moof
	o  fix a serious error in vhost handling; "Host:.." would allow access to
	   the next level directory from the virtual root directory, from seanb
	o  fix some various non standard compile time errors, from rudolf
	o  fix dynamic CGI content maps, from rudolf

changes in bozohttpd 20100617:
	o  fix some compile issues
	o  fix SSL mode.  from rtr
	o  fix some cgi-bin issues, as seen with cvsweb
	o  disable multi-file daemon mode for now, it breaks
	o  return 404's instead of 403's when chdir of ~user dirs fail
	o  remove "noreturn" attribute from bozo_http_error() that was
	   causing incorrect runtime behaviour

changes in bozohttpd 20100509:
	o  major rework and clean up of internal interfaces.  move the main
	   program into main.c, the remaining parts are useable as library.
	   add bindings for lua.  by Alistair G. Crooks <agc@@netbsd.org>
	o  fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566325

changes in bozohttpd 20090522:
	o  avoid dying in daemon mode for some uncommon, but recoverable, errors
	o  close leaking file descriptors for CGI and daemon mode
	o  handle poll errors properly
	o  don't try to handle more than one request per process yet
	o  add subdirs for build "debug" and "small" versions
	o  clean up a bad merge / duplicate code
	o  make mmap() usage portable, fixes linux & ranges: support
	o  document the -f option
	o  daemon mode now serves 6 files per child

changes in bozohttpd 20090417:
	o  make bozohttpd internally more modular, preparing the way
	   to handle more than one request per process
	o  fix http-auth, set $REMOTE_USER not $REMOTEUSER.  also fix
	   cgi-bin with cvsweb, from Holger Weiss <holger@@CIS.FU-Berlin.DE>
	o  fix an uninitialised variable use in daemon mode
	o  fix ssl mode with newer OpenSSL
	o  mmap large files in manageable sizes so we can serve any size file
	o  refactor url processing to handle query strings correctly for CGI
	   from Sergey Katsev at Coyote Point
	o  add If-Modified-Since support, from Joerg Sonnenberger
	   <joerg@@netbsd.org>
	o  many more manual fixes, from NetBSD
@
text
@d1 1
a1 4
#	$eterna: Makefile,v 1.14 2009/05/22 21:51:39 mrg Exp $

SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
BIGFILETESTS=	partial4000 partial8000
d3 1
a4 2
BOZOHTTPD?=	../debug/bozohttpd-debug
WGET?=		wget
d13 1
a13 3
check: check-simple check-bigfile

check-simple:
a19 6
check-bigfile:
.for a in $(BIGFILETESTS)
	echo "Running test $a"
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "./data"
.endfor

@


1.2.20.1
log
@Pull up following revision(s) (requested by mrg in ticket #1913):
libexec/httpd/CHANGES				1.3-1.18
libexec/httpd/Makefile				1.8-1.22 via patch
libexec/httpd/Makefile.boot			1.3-1.6
libexec/httpd/auth-bozo.c			1.5-1.13
libexec/httpd/bozohttpd.8			1.6-1.46
libexec/httpd/bozohttpd.c			1.8,1.12-1.54
libexec/httpd/bozohttpd.h			1.8-1.32
libexec/httpd/cgi-bozo.c			1.11-1.25
libexec/httpd/content-bozo.c			1.4-1.10
libexec/httpd/daemon-bozo.c			1.5-1.16
libexec/httpd/dir-index-bozo.c			1.6-1.19
libexec/httpd/ssl-bozo.c			1.5-1.16
libexec/httpd/tilde-luzah-bozo.c		1.5-1.10
libexec/httpd/lua-bozo.c			1.1-1.9
libexec/httpd/main.c				1.1-1.7
libexec/httpd/netbsd_queue.h			1.1
libexec/httpd/printenv.lua			1.1-1.2
libexec/httpd/debug/Makefile			1.1
libexec/httpd/libbozohttpd/Makefile		1.2
libexec/httpd/libbozohttpd/libbozohttpd.3	1.3
libexec/httpd/libbozohttpd/shlib_version	1.1
libexec/httpd/lua/Makefile			1.1
libexec/httpd/lua/bozo.lua			1.1
libexec/httpd/lua/glue.c			1.1
libexec/httpd/lua/optparse.lua			1.1
libexec/httpd/lua/shlib_version			1.1
libexec/httpd/small/Makefile			1.1-1.2
libexec/httpd/testsuite/Makefile		1.4
libexec/httpd/testsuite/html_cmp		1.4
libexec/httpd/testsuite/t1.in			1.3
libexec/httpd/testsuite/t1.out			1.3
libexec/httpd/testsuite/t10.in			1.1
libexec/httpd/testsuite/t10.out			1.1
libexec/httpd/testsuite/t2.in			1.3
libexec/httpd/testsuite/t2.out			1.3
libexec/httpd/testsuite/t3.in			1.3
libexec/httpd/testsuite/t3.out			1.3
libexec/httpd/testsuite/t4.in			1.3
libexec/httpd/testsuite/t4.out			1.3
libexec/httpd/testsuite/t5.in			1.3
libexec/httpd/testsuite/t5.out			1.3
libexec/httpd/testsuite/t6.in			1.3
libexec/httpd/testsuite/t6.out			1.3
libexec/httpd/testsuite/t7.in			1.3
libexec/httpd/testsuite/t7.out			1.3
libexec/httpd/testsuite/t8.in			1.3
libexec/httpd/testsuite/t8.out			1.3
libexec/httpd/testsuite/t9.in			1.3
libexec/httpd/testsuite/t9.out			1.3
libexec/httpd/testsuite/test-bigfile		1.1
libexec/httpd/testsuite/data/bigfile		1.1
libexec/httpd/testsuite/data/bigfile.partial4000 1.1
libexec/httpd/testsuite/data/bigfile.partial8000 1.1
libexec/httpd/testsuite/data/file		1.3
libexec/httpd/testsuite/data/index.html		1.3

	Update bozohttpd from 20080303+patches to 20140708.

changes in bozohttpd 20140708:
	o  fixes for virtual host support, from rajeev_v_pillai@@yahoo.com
	o  avoid printing double errors, from shm@@netbsd.org
	o  fix a security issue in basic HTTP authentication which would allow
	   authentication to be bypassed, from shm@@netbsd.org

changes in bozohttpd 20140201:
	o  support .svg files
	o  fix a core dump when requests timeout

changes in bozohttpd 20140102:
	o  update a few content types
	o  add support for directly calling lua scripts to handle
	   processes, from mbalmer@@netbsd.org
	o  properly escape generated HTML
	o  add authentication for redirections, from martin@@netbsd.org
	o  handle chained ssl certifications, from elric@@netbsd.org
	o  add basic support for gzipped files, from elric@@netbsd.org
	o  properly escape generated URIs

changes in bozohttpd 20111118:
	o  add -P <pidfile> option, from jmmv@@netbsd.org
	o  avoid crashes with http basic auth, from pooka@@netbsd.org
	o  add support for REDIRECT_STATUS variable, from tls@@netbsd.org
	o  support .mp4 files in the default map
	o  directory indexes with files with : are now displayed properly, from
	   reed@@netbsd.org
	o  allow -I option to be useful in non-inetd mode as well

changes in bozohttpd 20100920:
	o  properly fully disable multi-file mode for now
	o  fix the -t and -U options when used without the -e option, broken since
	   the library-ifcation
	o  be explicit that logs go to the FTP facility in syslog
	o  use scandir() with alphasort() for sorted directory lists, from moof
	o  fix a serious error in vhost handling; "Host:.." would allow access to
	   the next level directory from the virtual root directory, from seanb
	o  fix some various non standard compile time errors, from rudolf
	o  fix dynamic CGI content maps, from rudolf

changes in bozohttpd 20100617:
	o  fix some compile issues
	o  fix SSL mode.  from rtr
	o  fix some cgi-bin issues, as seen with cvsweb
	o  disable multi-file daemon mode for now, it breaks
	o  return 404's instead of 403's when chdir of ~user dirs fail
	o  remove "noreturn" attribute from bozo_http_error() that was
	   causing incorrect runtime behaviour

changes in bozohttpd 20100509:
	o  major rework and clean up of internal interfaces.  move the main
	   program into main.c, the remaining parts are useable as library.
	   add bindings for lua.  by Alistair G. Crooks <agc@@netbsd.org>
	o  fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566325

changes in bozohttpd 20090522:
	o  avoid dying in daemon mode for some uncommon, but recoverable, errors
	o  close leaking file descriptors for CGI and daemon mode
	o  handle poll errors properly
	o  don't try to handle more than one request per process yet
	o  add subdirs for build "debug" and "small" versions
	o  clean up a bad merge / duplicate code
	o  make mmap() usage portable, fixes linux & ranges: support
	o  document the -f option
	o  daemon mode now serves 6 files per child

changes in bozohttpd 20090417:
	o  make bozohttpd internally more modular, preparing the way
	   to handle more than one request per process
	o  fix http-auth, set $REMOTE_USER not $REMOTEUSER.  also fix
	   cgi-bin with cvsweb, from Holger Weiss <holger@@CIS.FU-Berlin.DE>
	o  fix an uninitialised variable use in daemon mode
	o  fix ssl mode with newer OpenSSL
	o  mmap large files in manageable sizes so we can serve any size file
	o  refactor url processing to handle query strings correctly for CGI
	   from Sergey Katsev at Coyote Point
	o  add If-Modified-Since support, from Joerg Sonnenberger
	   <joerg@@netbsd.org>
	o  many more manual fixes, from NetBSD
@
text
@d1 1
a1 4
#	$eterna: Makefile,v 1.14 2009/05/22 21:51:39 mrg Exp $

SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
BIGFILETESTS=	partial4000 partial8000
d3 1
a4 2
BOZOHTTPD?=	../debug/bozohttpd-debug
WGET?=		wget
d13 1
a13 3
check: check-simple check-bigfile

check-simple:
a19 6
check-bigfile:
.for a in $(BIGFILETESTS)
	echo "Running test $a"
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "./data"
.endfor

@


1.2.10.1
log
@Pull up following revision(s) (requested by mrg in ticket #1913):
libexec/httpd/CHANGES				1.3-1.18
libexec/httpd/Makefile				1.8-1.22 via patch
libexec/httpd/Makefile.boot			1.3-1.6
libexec/httpd/auth-bozo.c			1.5-1.13
libexec/httpd/bozohttpd.8			1.6-1.46
libexec/httpd/bozohttpd.c			1.8,1.12-1.54
libexec/httpd/bozohttpd.h			1.8-1.32
libexec/httpd/cgi-bozo.c			1.11-1.25
libexec/httpd/content-bozo.c			1.4-1.10
libexec/httpd/daemon-bozo.c			1.5-1.16
libexec/httpd/dir-index-bozo.c			1.6-1.19
libexec/httpd/ssl-bozo.c			1.5-1.16
libexec/httpd/tilde-luzah-bozo.c		1.5-1.10
libexec/httpd/lua-bozo.c			1.1-1.9
libexec/httpd/main.c				1.1-1.7
libexec/httpd/netbsd_queue.h			1.1
libexec/httpd/printenv.lua			1.1-1.2
libexec/httpd/debug/Makefile			1.1
libexec/httpd/libbozohttpd/Makefile		1.2
libexec/httpd/libbozohttpd/libbozohttpd.3	1.3
libexec/httpd/libbozohttpd/shlib_version	1.1
libexec/httpd/lua/Makefile			1.1
libexec/httpd/lua/bozo.lua			1.1
libexec/httpd/lua/glue.c			1.1
libexec/httpd/lua/optparse.lua			1.1
libexec/httpd/lua/shlib_version			1.1
libexec/httpd/small/Makefile			1.1-1.2
libexec/httpd/testsuite/Makefile		1.4
libexec/httpd/testsuite/html_cmp		1.4
libexec/httpd/testsuite/t1.in			1.3
libexec/httpd/testsuite/t1.out			1.3
libexec/httpd/testsuite/t10.in			1.1
libexec/httpd/testsuite/t10.out			1.1
libexec/httpd/testsuite/t2.in			1.3
libexec/httpd/testsuite/t2.out			1.3
libexec/httpd/testsuite/t3.in			1.3
libexec/httpd/testsuite/t3.out			1.3
libexec/httpd/testsuite/t4.in			1.3
libexec/httpd/testsuite/t4.out			1.3
libexec/httpd/testsuite/t5.in			1.3
libexec/httpd/testsuite/t5.out			1.3
libexec/httpd/testsuite/t6.in			1.3
libexec/httpd/testsuite/t6.out			1.3
libexec/httpd/testsuite/t7.in			1.3
libexec/httpd/testsuite/t7.out			1.3
libexec/httpd/testsuite/t8.in			1.3
libexec/httpd/testsuite/t8.out			1.3
libexec/httpd/testsuite/t9.in			1.3
libexec/httpd/testsuite/t9.out			1.3
libexec/httpd/testsuite/test-bigfile		1.1
libexec/httpd/testsuite/data/bigfile		1.1
libexec/httpd/testsuite/data/bigfile.partial4000 1.1
libexec/httpd/testsuite/data/bigfile.partial8000 1.1
libexec/httpd/testsuite/data/file		1.3
libexec/httpd/testsuite/data/index.html		1.3

	Update bozohttpd from 20080303+patches to 20140708.

changes in bozohttpd 20140708:
	o  fixes for virtual host support, from rajeev_v_pillai@@yahoo.com
	o  avoid printing double errors, from shm@@netbsd.org
	o  fix a security issue in basic HTTP authentication which would allow
	   authentication to be bypassed, from shm@@netbsd.org

changes in bozohttpd 20140201:
	o  support .svg files
	o  fix a core dump when requests timeout

changes in bozohttpd 20140102:
	o  update a few content types
	o  add support for directly calling lua scripts to handle
	   processes, from mbalmer@@netbsd.org
	o  properly escape generated HTML
	o  add authentication for redirections, from martin@@netbsd.org
	o  handle chained ssl certifications, from elric@@netbsd.org
	o  add basic support for gzipped files, from elric@@netbsd.org
	o  properly escape generated URIs

changes in bozohttpd 20111118:
	o  add -P <pidfile> option, from jmmv@@netbsd.org
	o  avoid crashes with http basic auth, from pooka@@netbsd.org
	o  add support for REDIRECT_STATUS variable, from tls@@netbsd.org
	o  support .mp4 files in the default map
	o  directory indexes with files with : are now displayed properly, from
	   reed@@netbsd.org
	o  allow -I option to be useful in non-inetd mode as well

changes in bozohttpd 20100920:
	o  properly fully disable multi-file mode for now
	o  fix the -t and -U options when used without the -e option, broken since
	   the library-ifcation
	o  be explicit that logs go to the FTP facility in syslog
	o  use scandir() with alphasort() for sorted directory lists, from moof
	o  fix a serious error in vhost handling; "Host:.." would allow access to
	   the next level directory from the virtual root directory, from seanb
	o  fix some various non standard compile time errors, from rudolf
	o  fix dynamic CGI content maps, from rudolf

changes in bozohttpd 20100617:
	o  fix some compile issues
	o  fix SSL mode.  from rtr
	o  fix some cgi-bin issues, as seen with cvsweb
	o  disable multi-file daemon mode for now, it breaks
	o  return 404's instead of 403's when chdir of ~user dirs fail
	o  remove "noreturn" attribute from bozo_http_error() that was
	   causing incorrect runtime behaviour

changes in bozohttpd 20100509:
	o  major rework and clean up of internal interfaces.  move the main
	   program into main.c, the remaining parts are useable as library.
	   add bindings for lua.  by Alistair G. Crooks <agc@@netbsd.org>
	o  fix http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=566325

changes in bozohttpd 20090522:
	o  avoid dying in daemon mode for some uncommon, but recoverable, errors
	o  close leaking file descriptors for CGI and daemon mode
	o  handle poll errors properly
	o  don't try to handle more than one request per process yet
	o  add subdirs for build "debug" and "small" versions
	o  clean up a bad merge / duplicate code
	o  make mmap() usage portable, fixes linux & ranges: support
	o  document the -f option
	o  daemon mode now serves 6 files per child

changes in bozohttpd 20090417:
	o  make bozohttpd internally more modular, preparing the way
	   to handle more than one request per process
	o  fix http-auth, set $REMOTE_USER not $REMOTEUSER.  also fix
	   cgi-bin with cvsweb, from Holger Weiss <holger@@CIS.FU-Berlin.DE>
	o  fix an uninitialised variable use in daemon mode
	o  fix ssl mode with newer OpenSSL
	o  mmap large files in manageable sizes so we can serve any size file
	o  refactor url processing to handle query strings correctly for CGI
	   from Sergey Katsev at Coyote Point
	o  add If-Modified-Since support, from Joerg Sonnenberger
	   <joerg@@netbsd.org>
	o  many more manual fixes, from NetBSD
@
text
@d1 1
a1 4
#	$eterna: Makefile,v 1.14 2009/05/22 21:51:39 mrg Exp $

SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
BIGFILETESTS=	partial4000 partial8000
d3 1
a4 2
BOZOHTTPD?=	../debug/bozohttpd-debug
WGET?=		wget
d13 1
a13 3
check: check-simple check-bigfile

check-simple:
a19 6
check-bigfile:
.for a in $(BIGFILETESTS)
	echo "Running test $a"
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "./data"
.endfor

@


1.2.12.1
log
@Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
@
text
@d1 1
a1 1
#	$eterna: Makefile,v 1.13 2008/03/04 04:46:38 mrg Exp $
d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import of bozohttpd for its originally intended purpose: a small (~30k)
simple run-from-inetd httpd suitable for small systems (and some large
ones).
@
text
@@


1.1.1.2
log
@import latest bozohttpd.  changes include:

	o  fix some cgi header processing, from <thelsdj@@gmail.com>
	o  add simple Range: header processing, from <bad@@bsd.de>
	o  man page fixes, from NetBSD
	o  clean up various parts, from NetBSD
	o  prefix some function names with "bozo"
	o  align directory indexing <hr> markers
	o  clean up some code GCC4 grumbled about
@
text
@d1 1
a1 1
#	$eterna: Makefile,v 1.12 2008/03/02 09:26:01 mrg Exp $
d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9
@


1.1.1.3
log
@import latest bozohttpd sources.  changes include:

        o  make bozohttpd internally more modular, preparing the way
           to handle more than one request per process
        o  fix http-auth, set $REMOTE_USER not $REMOTEUSER.  also fix
           cgi-bin with cvsweb, from Holger Weiss <holger@@CIS.FU-Berlin.DE>
        o  fix an uninitialised variable use in daemon mode
        o  fix ssl mode with newer OpenSSL
        o  mmap large files in manageable sizes so we can serve any size file
        o  refactor url processing to handle query strings correctly for CGI
           from Sergey Katsev at Coyote Point
        o  add If-Modified-Since support, from Joerg Sonnenberger
           <joerg@@netbsd.org>
        o  many more manual fixes, from NetBSD
@
text
@d1 1
a1 1
#	$eterna: Makefile,v 1.13 2008/03/04 04:46:38 mrg Exp $
d3 1
a3 1
SIMPLETESTS=	t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
@


1.1.1.4
log
@import bozohttpd 20090522, which has these changes:
	o  close more leaking file descriptors for CGI and daemon mode
	o  add subdirs for build "debug" and "small" versions
	o  clean up a bad merge / duplicate code
	o  make mmap() usage portable, fixes linux & ranges: support
	o  document the -f option
	o  daemon mode now serves 6 files per child
@
text
@d1 1
a1 1
#	$eterna: Makefile,v 1.14 2009/05/22 21:51:39 mrg Exp $
a3 2
BIGFILETESTS=	partial4000 partial8000

a4 2
BOZOHTTPD?=	../debug/bozohttpd-debug
WGET?=		wget
d13 1
a13 3
check: check-simple check-bigfile

check-simple:
a19 6
check-bigfile:
.for a in $(BIGFILETESTS)
	echo "Running test $a"
	$(.CURDIR)/test-bigfile "$a" "${BOZOHTTPD}" "${WGET}" "./data"
.endfor

@


