History log of /netbsd-current/libexec/httpd/content-bozo.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.22 07-Jun-2023 mrg

serve .iso as "application/octet-stream". bump version & copyright.


Revision tags: netbsd-10-base
# 1.21 31-May-2022 mrg

add .mobi / application/x-mobipocket-ebook.


Revision tags: bozohttpd-20220517 cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base bozohttpd-20210227
# 1.20 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


Revision tags: bozohttpd-20201014
# 1.19 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.18 12-Sep-2020 rhialto

bozohttpd: correct .m4a to audio/mp4.


# 1.17 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20200820 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 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 bozohttpd-20181125 bozohttpd-20181123
# 1.16 23-Nov-2018 mrg

branches: 1.16.2;
minor style fixes. simplify bozo_match_content_map().


Revision tags: bozohttpd-20181121
# 1.15 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 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.14 19-Jul-2016 shm

branches: 1.14.6; 1.14.12; 1.14.14;
Do not send encoding header for compressed formats.


Revision tags: pgoyette-localcount-base
# 1.13 28-Dec-2015 mrg

branches: 1.13.2;
rename bozo_err/bozo_warn/bozo_asprintf to bozoerr/etc.
new rule is that function that mirror libc-style functions get no underscore.


# 1.12 02-May-2015 mrg

fix content type handling to not hard code (wrong) values for length,
but just call strlen() as needed. call this 20150501.

reported by Jan Danielsson for ".svg".


Revision tags: bozohttpd-20150320 bozohttpd-20141225
# 1.11 13-Dec-2014 mrg

add .ts and .vob suffixes.


Revision tags: netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.10 17-May-2014 mrg

branches: 1.10.2;
enable .svg. as prompted by agc@.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 bozohttpd-20140102
# 1.9 02-Jan-2014 mrg

branches: 1.9.2;
- 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.8 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: 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 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 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.7 18-Nov-2011 mrg

branches: 1.7.2; 1.7.6; 1.7.8; 1.7.14;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.6 31-Mar-2011 mrg

branches: 1.6.4;
add .mp4 as video/mp4.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.5 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase mrg-merged-to-bozohttpd-20090417-post jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090417


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-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 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 matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase
# 1.3 03-Mar-2008 mrg

branches: 1.3.6; 1.3.8; 1.3.10; 1.3.16;
merge bozohttpd 20080303


Revision tags: mrg-merged-to-bozohttpd-20080303 cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.2 17-Oct-2007 tls

branches: 1.2.2; 1.2.6;
RCS IDs


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.21 31-May-2022 mrg

add .mobi / application/x-mobipocket-ebook.


Revision tags: bozohttpd-20220517 cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base bozohttpd-20210227
# 1.20 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


Revision tags: bozohttpd-20201014
# 1.19 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.18 12-Sep-2020 rhialto

bozohttpd: correct .m4a to audio/mp4.


# 1.17 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20200820 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 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 bozohttpd-20181125 bozohttpd-20181123
# 1.16 23-Nov-2018 mrg

branches: 1.16.2;
minor style fixes. simplify bozo_match_content_map().


Revision tags: bozohttpd-20181121
# 1.15 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 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.14 19-Jul-2016 shm

branches: 1.14.6; 1.14.12; 1.14.14;
Do not send encoding header for compressed formats.


Revision tags: pgoyette-localcount-base
# 1.13 28-Dec-2015 mrg

branches: 1.13.2;
rename bozo_err/bozo_warn/bozo_asprintf to bozoerr/etc.
new rule is that function that mirror libc-style functions get no underscore.


# 1.12 02-May-2015 mrg

fix content type handling to not hard code (wrong) values for length,
but just call strlen() as needed. call this 20150501.

reported by Jan Danielsson for ".svg".


Revision tags: bozohttpd-20150320 bozohttpd-20141225
# 1.11 13-Dec-2014 mrg

add .ts and .vob suffixes.


Revision tags: netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.10 17-May-2014 mrg

branches: 1.10.2;
enable .svg. as prompted by agc@.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 bozohttpd-20140102
# 1.9 02-Jan-2014 mrg

branches: 1.9.2;
- 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.8 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: 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 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 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.7 18-Nov-2011 mrg

branches: 1.7.2; 1.7.6; 1.7.8; 1.7.14;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.6 31-Mar-2011 mrg

branches: 1.6.4;
add .mp4 as video/mp4.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.5 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase mrg-merged-to-bozohttpd-20090417-post jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090417


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-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 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 matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase
# 1.3 03-Mar-2008 mrg

branches: 1.3.6; 1.3.8; 1.3.10; 1.3.16;
merge bozohttpd 20080303


Revision tags: mrg-merged-to-bozohttpd-20080303 cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.2 17-Oct-2007 tls

branches: 1.2.2; 1.2.6;
RCS IDs


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


Revision tags: bozohttpd-20210227
# 1.20 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


Revision tags: bozohttpd-20201014
# 1.19 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.18 12-Sep-2020 rhialto

bozohttpd: correct .m4a to audio/mp4.


# 1.17 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20200820 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 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 bozohttpd-20181125 bozohttpd-20181123
# 1.16 23-Nov-2018 mrg

minor style fixes. simplify bozo_match_content_map().


Revision tags: bozohttpd-20181121
# 1.15 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 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.14 19-Jul-2016 shm

branches: 1.14.6; 1.14.12; 1.14.14;
Do not send encoding header for compressed formats.


Revision tags: pgoyette-localcount-base
# 1.13 28-Dec-2015 mrg

branches: 1.13.2;
rename bozo_err/bozo_warn/bozo_asprintf to bozoerr/etc.
new rule is that function that mirror libc-style functions get no underscore.


# 1.12 02-May-2015 mrg

fix content type handling to not hard code (wrong) values for length,
but just call strlen() as needed. call this 20150501.

reported by Jan Danielsson for ".svg".


Revision tags: bozohttpd-20150320 bozohttpd-20141225
# 1.11 13-Dec-2014 mrg

add .ts and .vob suffixes.


Revision tags: netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.10 17-May-2014 mrg

branches: 1.10.2;
enable .svg. as prompted by agc@.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 bozohttpd-20140102
# 1.9 02-Jan-2014 mrg

branches: 1.9.2;
- 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.8 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: 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 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 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.7 18-Nov-2011 mrg

branches: 1.7.2; 1.7.6; 1.7.8; 1.7.14;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.6 31-Mar-2011 mrg

branches: 1.6.4;
add .mp4 as video/mp4.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.5 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase mrg-merged-to-bozohttpd-20090417-post jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090417


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-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 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 matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase
# 1.3 03-Mar-2008 mrg

branches: 1.3.6; 1.3.8; 1.3.10; 1.3.16;
merge bozohttpd 20080303


Revision tags: mrg-merged-to-bozohttpd-20080303 cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.2 17-Oct-2007 tls

branches: 1.2.2; 1.2.6;
RCS IDs


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


Revision tags: bozohttpd-20201014
# 1.19 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.18 12-Sep-2020 rhialto

bozohttpd: correct .m4a to audio/mp4.


# 1.17 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: netbsd-9-1-RELEASE bozohttpd-20200820 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 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 bozohttpd-20181125 bozohttpd-20181123
# 1.16 23-Nov-2018 mrg

minor style fixes. simplify bozo_match_content_map().


Revision tags: bozohttpd-20181121
# 1.15 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 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.14 19-Jul-2016 shm

branches: 1.14.6; 1.14.12; 1.14.14;
Do not send encoding header for compressed formats.


Revision tags: pgoyette-localcount-base
# 1.13 28-Dec-2015 mrg

branches: 1.13.2;
rename bozo_err/bozo_warn/bozo_asprintf to bozoerr/etc.
new rule is that function that mirror libc-style functions get no underscore.


# 1.12 02-May-2015 mrg

fix content type handling to not hard code (wrong) values for length,
but just call strlen() as needed. call this 20150501.

reported by Jan Danielsson for ".svg".


Revision tags: bozohttpd-20150320 bozohttpd-20141225
# 1.11 13-Dec-2014 mrg

add .ts and .vob suffixes.


Revision tags: netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.10 17-May-2014 mrg

branches: 1.10.2;
enable .svg. as prompted by agc@.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 bozohttpd-20140102
# 1.9 02-Jan-2014 mrg

branches: 1.9.2;
- 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.8 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: 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 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 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.7 18-Nov-2011 mrg

branches: 1.7.2; 1.7.6; 1.7.8; 1.7.14;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.6 31-Mar-2011 mrg

branches: 1.6.4;
add .mp4 as video/mp4.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.5 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase mrg-merged-to-bozohttpd-20090417-post jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090417


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-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 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 matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase
# 1.3 03-Mar-2008 mrg

branches: 1.3.6; 1.3.8; 1.3.10; 1.3.16;
merge bozohttpd 20080303


Revision tags: mrg-merged-to-bozohttpd-20080303 cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.2 17-Oct-2007 tls

branches: 1.2.2; 1.2.6;
RCS IDs


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


# 1.18 12-Sep-2020 rhialto

bozohttpd: correct .m4a to audio/mp4.


# 1.17 12-Sep-2020 rhialto

bozohttpd: add .m4a and .m4v file extensions.


Revision tags: bozohttpd-20200820 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 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 bozohttpd-20181125 bozohttpd-20181123
# 1.16 23-Nov-2018 mrg

minor style fixes. simplify bozo_match_content_map().


Revision tags: bozohttpd-20181121
# 1.15 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 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.14 19-Jul-2016 shm

branches: 1.14.6; 1.14.12; 1.14.14;
Do not send encoding header for compressed formats.


Revision tags: pgoyette-localcount-base
# 1.13 28-Dec-2015 mrg

branches: 1.13.2;
rename bozo_err/bozo_warn/bozo_asprintf to bozoerr/etc.
new rule is that function that mirror libc-style functions get no underscore.


# 1.12 02-May-2015 mrg

fix content type handling to not hard code (wrong) values for length,
but just call strlen() as needed. call this 20150501.

reported by Jan Danielsson for ".svg".


Revision tags: bozohttpd-20150320 bozohttpd-20141225
# 1.11 13-Dec-2014 mrg

add .ts and .vob suffixes.


Revision tags: netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.10 17-May-2014 mrg

branches: 1.10.2;
enable .svg. as prompted by agc@.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 bozohttpd-20140102
# 1.9 02-Jan-2014 mrg

branches: 1.9.2;
- 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.8 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: 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 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 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.7 18-Nov-2011 mrg

branches: 1.7.2; 1.7.6; 1.7.8; 1.7.14;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.6 31-Mar-2011 mrg

branches: 1.6.4;
add .mp4 as video/mp4.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.5 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase mrg-merged-to-bozohttpd-20090417-post jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090417


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-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 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 matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase
# 1.3 03-Mar-2008 mrg

branches: 1.3.6; 1.3.8; 1.3.10; 1.3.16;
merge bozohttpd 20080303


Revision tags: mrg-merged-to-bozohttpd-20080303 cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.2 17-Oct-2007 tls

branches: 1.2.2; 1.2.6;
RCS IDs


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 bozohttpd-20181125 bozohttpd-20181123
# 1.16 23-Nov-2018 mrg

minor style fixes. simplify bozo_match_content_map().


Revision tags: bozohttpd-20181121
# 1.15 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 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 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.14 19-Jul-2016 shm

branches: 1.14.6; 1.14.12;
Do not send encoding header for compressed formats.


Revision tags: pgoyette-localcount-base
# 1.13 28-Dec-2015 mrg

branches: 1.13.2;
rename bozo_err/bozo_warn/bozo_asprintf to bozoerr/etc.
new rule is that function that mirror libc-style functions get no underscore.


# 1.12 02-May-2015 mrg

fix content type handling to not hard code (wrong) values for length,
but just call strlen() as needed. call this 20150501.

reported by Jan Danielsson for ".svg".


Revision tags: bozohttpd-20150320 bozohttpd-20141225
# 1.11 13-Dec-2014 mrg

add .ts and .vob suffixes.


Revision tags: netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.10 17-May-2014 mrg

branches: 1.10.2;
enable .svg. as prompted by agc@.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 bozohttpd-20140102
# 1.9 02-Jan-2014 mrg

branches: 1.9.2;
- 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.8 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: 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 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 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.7 18-Nov-2011 mrg

branches: 1.7.2; 1.7.6; 1.7.8; 1.7.14;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.6 31-Mar-2011 mrg

branches: 1.6.4;
add .mp4 as video/mp4.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.5 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase mrg-merged-to-bozohttpd-20090417-post jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090417


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-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 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 matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase
# 1.3 03-Mar-2008 mrg

branches: 1.3.6; 1.3.8; 1.3.10; 1.3.16;
merge bozohttpd 20080303


Revision tags: mrg-merged-to-bozohttpd-20080303 cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.2 17-Oct-2007 tls

branches: 1.2.2; 1.2.6;
RCS IDs


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726
# 1.14 19-Jul-2016 shm

Do not send encoding header for compressed formats.


Revision tags: pgoyette-localcount-base
# 1.13 28-Dec-2015 mrg

branches: 1.13.2;
rename bozo_err/bozo_warn/bozo_asprintf to bozoerr/etc.
new rule is that function that mirror libc-style functions get no underscore.


# 1.12 02-May-2015 mrg

fix content type handling to not hard code (wrong) values for length,
but just call strlen() as needed. call this 20150501.

reported by Jan Danielsson for ".svg".


Revision tags: bozohttpd-20150320 bozohttpd-20141225
# 1.11 13-Dec-2014 mrg

add .ts and .vob suffixes.


Revision tags: netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.10 17-May-2014 mrg

branches: 1.10.2;
enable .svg. as prompted by agc@.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 bozohttpd-20140102
# 1.9 02-Jan-2014 mrg

branches: 1.9.2;
- 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.8 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: 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 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 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.7 18-Nov-2011 mrg

branches: 1.7.2; 1.7.6; 1.7.8; 1.7.14;
merge bozohttpd 20111118


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
# 1.6 31-Mar-2011 mrg

branches: 1.6.4;
add .mp4 as video/mp4.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.5 10-May-2010 mrg

merge bozohttpd 20100509.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase mrg-merged-to-bozohttpd-20090417-post jym-xensuspend-base
# 1.4 18-Apr-2009 mrg

merge bozohttpd 20090417


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-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 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 matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase
# 1.3 03-Mar-2008 mrg

branches: 1.3.6; 1.3.8; 1.3.10; 1.3.16;
merge bozohttpd 20080303


Revision tags: mrg-merged-to-bozohttpd-20080303 cube-autoconf-base matt-armv6-base hpcarm-cleanup-base
# 1.2 17-Oct-2007 tls

branches: 1.2.2; 1.2.6;
RCS IDs


# 1.1 16-Oct-2007 tls

branches: 1.1.1;
Initial revision