History log of /netbsd-current/libexec/httpd/CHANGES
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.56 28-Apr-2024 maya

Bump bozohttpd version to today for mobile-friendly directory listing


Revision tags: bozohttpd-20240126
# 1.55 26-Jan-2024 mrg

add some missing changes and bump the version.


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.54 02-Nov-2022 andvar

fix various typos in comments and messages.


Revision tags: bozohttpd-20220517
# 1.53 04-Jan-2022 kim

bozohttpd: remove obsolete .bzdirect handling

OK mrg@


# 1.52 03-Sep-2021 andvar

fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/


# 1.51 24-Aug-2021 mrg

extend the list of available ciphers to include most of the
openssl "HIGH" with some additional disables. retain the current
list of bad options. should deal with PR#51278.


# 1.50 24-Aug-2021 mrg

implement tls minimum version setting.

mostly from sunil@nimmagadda.net in PR#55830, though i moved the
member into the main http structure, so that it doesn't trigger
sslinfo being allocated via command line without the rest of the
ssl being setup (which then leads to crashes.)


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.49 05-May-2021 mrg

don't assume host BUFSIZ is sufficent. small BUFSIZ leads to
always happens errors in the testsuite. switch all these buffers
to be 4KiB sized. reported by embr <git@liclac.eu>


# 1.48 04-Apr-2021 mrg

avoid DoS in initial request size, which is now bounded at 16KiB.
reported by Justin Parrott in PR#56085.


Revision tags: bozohttpd-20210227
# 1.47 27-Feb-2021 mrg

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


# 1.46 27-Feb-2021 mrg

belated call version 20210211 after previous memory leak fix.


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

branches: 1.40.2;
call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.55 26-Jan-2024 mrg

add some missing changes and bump the version.


Revision tags: netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.54 02-Nov-2022 andvar

fix various typos in comments and messages.


Revision tags: bozohttpd-20220517
# 1.53 04-Jan-2022 kim

bozohttpd: remove obsolete .bzdirect handling

OK mrg@


# 1.52 03-Sep-2021 andvar

fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/


# 1.51 24-Aug-2021 mrg

extend the list of available ciphers to include most of the
openssl "HIGH" with some additional disables. retain the current
list of bad options. should deal with PR#51278.


# 1.50 24-Aug-2021 mrg

implement tls minimum version setting.

mostly from sunil@nimmagadda.net in PR#55830, though i moved the
member into the main http structure, so that it doesn't trigger
sslinfo being allocated via command line without the rest of the
ssl being setup (which then leads to crashes.)


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.49 05-May-2021 mrg

don't assume host BUFSIZ is sufficent. small BUFSIZ leads to
always happens errors in the testsuite. switch all these buffers
to be 4KiB sized. reported by embr <git@liclac.eu>


# 1.48 04-Apr-2021 mrg

avoid DoS in initial request size, which is now bounded at 16KiB.
reported by Justin Parrott in PR#56085.


Revision tags: bozohttpd-20210227
# 1.47 27-Feb-2021 mrg

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


# 1.46 27-Feb-2021 mrg

belated call version 20210211 after previous memory leak fix.


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

branches: 1.40.2;
call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.54 02-Nov-2022 andvar

fix various typos in comments and messages.


Revision tags: bozohttpd-20220517
# 1.53 04-Jan-2022 kim

bozohttpd: remove obsolete .bzdirect handling

OK mrg@


# 1.52 03-Sep-2021 andvar

fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/


# 1.51 24-Aug-2021 mrg

extend the list of available ciphers to include most of the
openssl "HIGH" with some additional disables. retain the current
list of bad options. should deal with PR#51278.


# 1.50 24-Aug-2021 mrg

implement tls minimum version setting.

mostly from sunil@nimmagadda.net in PR#55830, though i moved the
member into the main http structure, so that it doesn't trigger
sslinfo being allocated via command line without the rest of the
ssl being setup (which then leads to crashes.)


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.49 05-May-2021 mrg

don't assume host BUFSIZ is sufficent. small BUFSIZ leads to
always happens errors in the testsuite. switch all these buffers
to be 4KiB sized. reported by embr <git@liclac.eu>


# 1.48 04-Apr-2021 mrg

avoid DoS in initial request size, which is now bounded at 16KiB.
reported by Justin Parrott in PR#56085.


Revision tags: bozohttpd-20210227
# 1.47 27-Feb-2021 mrg

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


# 1.46 27-Feb-2021 mrg

belated call version 20210211 after previous memory leak fix.


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

branches: 1.40.2;
call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.53 04-Jan-2022 kim

bozohttpd: remove obsolete .bzdirect handling

OK mrg@


# 1.52 03-Sep-2021 andvar

fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/


# 1.51 24-Aug-2021 mrg

extend the list of available ciphers to include most of the
openssl "HIGH" with some additional disables. retain the current
list of bad options. should deal with PR#51278.


# 1.50 24-Aug-2021 mrg

implement tls minimum version setting.

mostly from sunil@nimmagadda.net in PR#55830, though i moved the
member into the main http structure, so that it doesn't trigger
sslinfo being allocated via command line without the rest of the
ssl being setup (which then leads to crashes.)


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.49 05-May-2021 mrg

don't assume host BUFSIZ is sufficent. small BUFSIZ leads to
always happens errors in the testsuite. switch all these buffers
to be 4KiB sized. reported by embr <git@liclac.eu>


# 1.48 04-Apr-2021 mrg

avoid DoS in initial request size, which is now bounded at 16KiB.
reported by Justin Parrott in PR#56085.


Revision tags: bozohttpd-20210227
# 1.47 27-Feb-2021 mrg

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


# 1.46 27-Feb-2021 mrg

belated call version 20210211 after previous memory leak fix.


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

branches: 1.40.2;
call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.52 03-Sep-2021 andvar

fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/


# 1.51 24-Aug-2021 mrg

extend the list of available ciphers to include most of the
openssl "HIGH" with some additional disables. retain the current
list of bad options. should deal with PR#51278.


# 1.50 24-Aug-2021 mrg

implement tls minimum version setting.

mostly from sunil@nimmagadda.net in PR#55830, though i moved the
member into the main http structure, so that it doesn't trigger
sslinfo being allocated via command line without the rest of the
ssl being setup (which then leads to crashes.)


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.49 05-May-2021 mrg

don't assume host BUFSIZ is sufficent. small BUFSIZ leads to
always happens errors in the testsuite. switch all these buffers
to be 4KiB sized. reported by embr <git@liclac.eu>


# 1.48 04-Apr-2021 mrg

avoid DoS in initial request size, which is now bounded at 16KiB.
reported by Justin Parrott in PR#56085.


Revision tags: bozohttpd-20210227
# 1.47 27-Feb-2021 mrg

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


# 1.46 27-Feb-2021 mrg

belated call version 20210211 after previous memory leak fix.


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

branches: 1.40.2;
call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.51 24-Aug-2021 mrg

extend the list of available ciphers to include most of the
openssl "HIGH" with some additional disables. retain the current
list of bad options. should deal with PR#51278.


# 1.50 24-Aug-2021 mrg

implement tls minimum version setting.

mostly from sunil@nimmagadda.net in PR#55830, though i moved the
member into the main http structure, so that it doesn't trigger
sslinfo being allocated via command line without the rest of the
ssl being setup (which then leads to crashes.)


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.49 05-May-2021 mrg

don't assume host BUFSIZ is sufficent. small BUFSIZ leads to
always happens errors in the testsuite. switch all these buffers
to be 4KiB sized. reported by embr <git@liclac.eu>


# 1.48 04-Apr-2021 mrg

avoid DoS in initial request size, which is now bounded at 16KiB.
reported by Justin Parrott in PR#56085.


Revision tags: bozohttpd-20210227
# 1.47 27-Feb-2021 mrg

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


# 1.46 27-Feb-2021 mrg

belated call version 20210211 after previous memory leak fix.


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

branches: 1.40.2;
call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.49 05-May-2021 mrg

don't assume host BUFSIZ is sufficent. small BUFSIZ leads to
always happens errors in the testsuite. switch all these buffers
to be 4KiB sized. reported by embr <git@liclac.eu>


# 1.48 04-Apr-2021 mrg

avoid DoS in initial request size, which is now bounded at 16KiB.
reported by Justin Parrott in PR#56085.


Revision tags: bozohttpd-20210227
# 1.47 27-Feb-2021 mrg

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


# 1.46 27-Feb-2021 mrg

belated call version 20210211 after previous memory leak fix.


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

branches: 1.40.2;
call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.48 04-Apr-2021 mrg

avoid DoS in initial request size, which is now bounded at 16KiB.
reported by Justin Parrott in PR#56085.


Revision tags: bozohttpd-20210227
# 1.47 27-Feb-2021 mrg

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


# 1.46 27-Feb-2021 mrg

belated call version 20210211 after previous memory leak fix.


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

branches: 1.40.2;
call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


Revision tags: bozohttpd-20210227
# 1.47 27-Feb-2021 mrg

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


# 1.46 27-Feb-2021 mrg

belated call version 20210211 after previous memory leak fix.


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.45 11-Feb-2021 mrg

changes in bozohttpd 20210210:
o fix various NULL derefs from malformed headers. mostly from
<emily@ingalls.rocks>.


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


Revision tags: bozohttpd-20201014
# 1.44 15-Oct-2020 mrg

various updates from <henrik@gulbra.net> / freebsd. the list from Henrik:

bozohttpd.8:
o Added -d flag to the man page
o Moved -E flag in man page to keep alphabetic order
o Grammar fix for description of -E flag in man page
o Moved a word in the man description for the -f flag
o Made -f imply -b as a backwards-compatible shortcut
o Updated man description of -n to mention Lua scripts
o Moved -z below -Z to keep the uppercase options first

bozohttpd.c:
o Removed obsolete comment about ~user missing cgi-bin support
o Removed "/* ARGSUSED */" lines; was that a macro or a reminder?
o Added USE_ARG macro call for sig, which was otherwise not used
o Added USE_ARG macro call for msg (only used if debug is enabled)

bozohttpd.h:
o Fixed typo in the include guard (BOZOHTTOPD_H_ -> BOZOHTTPD_H_)
o Renamed have_all to have_core; it didn't mean "all" options

content-bozo.c:
o Added USE_ARG macro call for signo, which was otherwise not used
o Made -f imply -b as a backwards-compatible shortcut

main.c:
o Simplified -b text to be symmetric with that for the -f option
o Updated -C text to make "suffix" explicit; it's better than "arg"
o Changed to only show the -E description if have_user is true
o Always show the -e option, which incorrectly used the -E logic
o Renamed have_all to have_core; it didn't mean "all" options
o Added three missing tabs for the description of the -G option
o Updated -L text to make "prefix" explicit; it's better than "arg"
o Updated -M text to make "suffix" explicit; it's slightly better
o Added a previously missing description for the -n option
o Documented the otherwise obscure valid types for the -T option
o Shortened "username" to "user" to match the actual help text
o Moved handling of -c below that for -C to standardize the order
o Broke the enabling test for -C into two lines for consistency
o Inverted the enabling test for -E; this is what was meant, right?
o Removed the enabling test for -e, which should always be enabled

ssl-bozo.c:
o Added USE_ARG for httpd, which is not used if SSL has been excluded


# 1.43 15-Oct-2020 mrg

set -D_GNU_SOURCE in Makefile.boot. from hadrien.lacour@posteo.net.
also match %2F as well as %2f. from leah@vuxu.org.
introduce defines for "80" and "443". copyright maint.


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.42 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


Revision tags: bozohttpd-20200820
# 1.41 20-Aug-2020 mrg

update for recent changes.


Revision tags: bozohttpd-20190228 phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
# 1.40 28-Feb-2019 mrg

call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10; 1.25.12;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.40 28-Feb-2019 mrg

call this bozohttpd 20190228, and merge the CHANGES entries from the
previous release.


# 1.39 27-Jan-2019 dholland

fix duplicated chunk from merge


# 1.38 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127
# 1.37 22-Jan-2019 mrg

o don't display special files in the directory index. they aren't
served, but links to them are generated.


Revision tags: pgoyette-compat-20190118
# 1.36 17-Jan-2019 mrg

- call this 20190116
- adjust the directory indexing again:
- 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
all from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


# 1.35 17-Jan-2019 mrg

- fix CGI '+' param and error handling.
- remove unused parameter to daemon_poll_err().

both from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>


Revision tags: pgoyette-compat-1226
# 1.34 19-Dec-2018 mrg

minor rewording. fix alphabeta ordering of contributors.


# 1.33 18-Dec-2018 mrg

fix an old spell-o and a new format-o.


# 1.32 15-Dec-2018 leot

Document last changes and bump version to 20181215

Suggested by <mrg>, thanks! (Possible mistakes are mine though!)


# 1.31 04-Dec-2018 mrg

use html tables for directory index.
from "Rajeev V. Pillai" <rajeev_v_pillai@yahoo.com>

call this bozohttpd 20181204.


# 1.30 25-Nov-2018 mrg

normalise some messages.


Revision tags: pgoyette-compat-1126 bozohttpd-20181125
# 1.29 25-Nov-2018 mrg

add option fixes here.


Revision tags: bozohttpd-20181123 bozohttpd-20181121
# 1.28 21-Nov-2018 mrg

- 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.


# 1.27 20-Nov-2018 mrg

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.


Revision tags: bozohttpd-20181118
# 1.26 19-Nov-2018 mrg

note the changes present in bozohttpd 20181118:

o add url remap support via .bzremap file, from martin@netbsd.org
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.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320
# 1.25 31-Jan-2017 mrg

branches: 1.25.4; 1.25.10;
- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

branches: 1.24.2;
use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

branches: 1.23.2;
As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.25 31-Jan-2017 mrg

- 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.


Revision tags: bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


Revision tags: pgoyette-localcount-20161104 localcount-20160914
# 1.24 20-Aug-2016 mrg

use netbsd rcsid


Revision tags: pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.23 24-May-2016 agc

As proposed in:

http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
bozohttpd version bozohttpd/20160415
%


# 1.22 15-Apr-2016 mrg

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


# 1.21 28-Oct-2015 shm

* add CGI support for ~user translation (-E switch)
* add redirects to ~user translation
* fix bugs around ~user translation
* add schema detection for absolute redirects
* fixed few memory leaks
* bunch of minor tweaks
* removed -r support
* smarter redirects

OK mrg@


Revision tags: bozohttpd-20150320
# 1.20 20-Mar-2015 mrg

copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes. call this 20150320.


Revision tags: bozohttpd-20141225 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.19 17-Jul-2014 mrg

branches: 1.19.2;
call this 20140717.


# 1.18 08-Jul-2014 mrg

call this bozohttpd 20140708, and add/fix a couple of CHANGES entries.


# 1.17 08-Jul-2014 mrg

avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.


# 1.16 17-May-2014 mrg

bump version, note .svg support.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.15 02-Feb-2014 mrg

branches: 1.15.2;
update for 2014-02-01.


Revision tags: bozohttpd-20140102
# 1.14 02-Jan-2014 mrg

- update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base bozohttpd-20130711
# 1.13 11-Jul-2013 mrg

- update CHANGES with recent changes
- export esacpe_html() and use it in directory indexing
- update manual to include recent contributors


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.12 19-Jul-2012 mrg

branches: 1.12.2;
when generating URIs escape various characters as specified in RFC 3986.
this makes, among other things, files/dirs with "?" work with dir indexing.


Revision tags: netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
# 1.11 18-Nov-2011 mrg

branches: 1.11.2; 1.11.6; 1.11.8;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.10 20-Sep-2010 mrg

branches: 1.10.6;
merge bozohttpd 20100920


# 1.9 22-Jun-2010 mrg

merge bozohttpd 20100621


# 1.8 17-Jun-2010 mrg

merge bozohttpd 20100617.


# 1.7 15-May-2010 mrg

merge bozohttpd 20100512


# 1.6 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211
# 1.5 23-May-2009 mrg

merge bozohttpd 20090522


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090418. remove a couple of minor do-nothing local
changes that don't need to cause conflicts.


Revision tags: mrg-merged-to-bozohttpd-20090417-post
# 1.3 18-Apr-2009 mrg

re-add a lot of the distribution files


Revision tags: netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base mjf-devfs2-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base cube-autoconf-base hpcarm-cleanup-base
# 1.2 16-Oct-2007 tls

branches: 1.2.10; 1.2.12; 1.2.16; 1.2.20;
Get httpd ready for inclusion in build.


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision