Commit Graph

175 Commits

Author SHA1 Message Date
shm 51b65afab5 Fix handling path with multiple slashes at the beginning
Fix redirections escaping for user support

OK mrg@
2015-07-16 12:19:23 +00:00
shm 5f066e934a Remove d_namelen as it's an BSD extension. Fix building bozohttpd on SunOS.
OK mrg@
2015-07-09 12:32:16 +00:00
christos a6e4c202c0 fix memory leaks on error; found by brainy. 2015-07-04 22:39:23 +00:00
mrg 56ba1ad0cf 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".
2015-05-02 11:35:48 +00:00
christos 46b8188b2d Fix deref "command" after "free(file)", from KIYOHARA Takashi 2015-04-19 19:05:19 +00:00
mrg 1d0520b606 install as bozohttpd/bozohttpd.8 as well as httpd. 2015-04-16 02:32:33 +00:00
mrg 4135f5d46d copyright maintenance, note shm@ in the manual and update the CHANGES
for recent changes.  call this 20150320.
2015-03-20 19:54:53 +00:00
mrg bcc73e9553 don't quote /. it doesn't work. this should fix PR#49765. 2015-03-20 18:54:18 +00:00
snj 411a393d8d spit out a 403 not just when an open() fails with EPERM, but with
EACCES as well.
2015-01-27 04:20:23 +00:00
mrg 9e53ba939e more for the previous: make sure [i - 1] can never go negative. 2014-12-26 19:52:00 +00:00
mrg 7ce92dc944 properly handle ilen = 0 case, which could lead to array underflow.
pointed out by Maxime Villard.
2014-12-26 19:48:52 +00:00
wiz c1a74a82ca Bring this man page back to this decade. 2014-12-25 18:56:28 +00:00
mrg 2b5d1d7deb call this 20141225. 2014-12-25 18:53:06 +00:00
mrg d0483d05da add .ts and .vob suffixes. 2014-12-13 19:30:04 +00:00
shm 60a0878843 Fixed memory leak in case of multiple authentication headers sent by the
client.

OK mrg@
2014-11-21 08:58:28 +00:00
shm b8c713d1a2 Fixed off-by-one in virtualhost processing. Previous code was checking if
Host header is a prefix of any existing vhost. This behaviour might be used to
uncover existing vitual hosts from the remote.

OK @mrg
2014-11-21 08:54:12 +00:00
mrg 6ec24a2914 don't truncate file sizes to 32 bits for directory indexes. 2014-10-10 05:10:59 +00:00
mbalmer fe91fb6abb NUL terminate a string. 2014-08-15 19:35:28 +00:00
lneto 4ab4902eb2 lua: updated from 5.1 to 5.3 work3
* lua(1):
  - changed lua_Integer to intmax_t
  - updated distrib/sets/lists and etc/mtree
  - updated bsd.lua.mk
  - fixed bozohttpd (lua-bozo.c)
  - compatibilized bindings: gpio, sqlite
* lua(4):
  - removed floating-point and libc dependencies using '#ifndef _KERNEL'
  - fixed division by zero and exponentiation
  - libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct()
  - acpica: removed isprint() from acnetbsd.h
  - libc: moved strcspn.c, strpbrk.c and strspn.c to common
  - removed stub headers
  - compatibilized bindings: luapmf, luasystm
* reorganized luaconf.h
* updated doc/CHANGES and doc/RESPONSIBLE
2014-07-19 18:38:33 +00:00
mrg e8a778f4c0 call this 20140717. 2014-07-17 10:21:51 +00:00
mrg 71b444f24e rewrite much of the SSL code:
- handle errors in many places they weren't properly
- make SSL_accept() an error the main code notices
- expand bozo_ssl_err() to include bozo_ssl_warn(), bozo_clear_ssl_queue()
- remove empty bozo_ssl_flush()
2014-07-17 06:27:52 +00:00
mrg cce952fc91 link against main.c and ssl-bozo.c (which provides the IO backend.) 2014-07-17 06:24:57 +00:00
mrg 002519bfa2 use const and remove unnecessary braces. 2014-07-17 06:14:46 +00:00
mrg f3239b26ff make a minor output change match again. 2014-07-16 14:47:59 +00:00
mrg dfbb0220fc make -t chroot option available always again. 2014-07-16 07:41:43 +00:00
mrg 8c06d93b7b call this bozohttpd 20140708, and add/fix a couple of CHANGES entries. 2014-07-08 14:06:17 +00:00
mrg a212be1ee8 avoid truncating a directory path when using snprintf(), but instead
detect and return an error.

found and fixed by shm@netbsd.
2014-07-08 14:01:21 +00:00
mrg 681e9c9b00 make export-distfile target slightly more stable. 2014-07-08 13:59:39 +00:00
shm d1ed37e48d Handle ENAMETOOLONG to return 404 error instead of 500.
OK mrg@
2014-07-02 13:58:09 +00:00
shm ca5b33a5e8 * bozo_clean_request free(3) clean up (removed needless checks)
* HEAD method no longer returns response body on error
* fixed bug with multiple bozo_http_error calls caused by fix_url_percent

OK @mrg
2014-07-01 13:41:21 +00:00
shm 55b8853aa5 PR/48810 use cgi handler for index files
OK mrg@ martin@
2014-06-24 07:23:59 +00:00
mrg 5893f1db8f bump version, note .svg support. 2014-05-17 05:50:46 +00:00
mrg f434e335cc enable .svg. as prompted by agc@. 2014-05-17 05:50:01 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
mrg 7db440fedd - bump man page date
- strip :80 off virtual host names as they're the default
2014-02-09 12:32:32 +00:00
mrg ca768e99f0 some fixes for virtual hosting support from Rajeev V. Pillai:
- memory leaks in virtual host plugged
- ensure hr_host is only the host/port part when the request
  contains the hostname in the URI not Host: header.


also update the references to the old http/1.1 draft rev 06
to RFC 2616 (fortunately, most sections hadn't moved.)
2014-02-09 01:46:10 +00:00
mrg ee81b5bfee display the tempdir for exported files as well. 2014-02-02 03:20:57 +00:00
mrg 7f3f4479d2 call gzip directly for distfile export target; it's usually run outside
of the normal build.
2014-02-02 03:20:10 +00:00
mrg 4d12e4bc49 add lua-bozo.c. 2014-02-02 03:14:58 +00:00
mrg 496aca988c update for 2014-02-01. 2014-02-02 03:13:31 +00:00
mrg 95e8de7784 move a variable into the scope of its use, where the assignment
has already validated the pointers used.  fixes a bug reported
in private email from dogcow@.
2014-01-30 02:51:41 +00:00
apb a452d8c9e2 Pass the -n flag to gzip invocations.
This prevents it from embedding a timestamp in the output.  We pass
"-n" unconditionally, not conditional on MKREPRO, because many other
invocations of gzip already passed the -n flag unconditionally.
2014-01-27 21:37:17 +00:00
apb 36ef98548b Use ${TOOL_GZIP} instead of just gzip in all Makefiles
outside */dist/* subdirectories.

When USE_PIGZGZIP=yes, bsd.own.mk sets TOOL_GZIP=${TOOL_PIGZ},
so there's no need to test USE_PIGZGZIP in these Makefiles.
2014-01-27 08:18:07 +00:00
mrg 8af74a22fc sort the contributor list, and update the defines list to include lua. 2014-01-02 08:47:38 +00:00
mrg 6810043c20 update for 20140102. 2014-01-02 08:30:22 +00:00
mrg 44293cacb5 update version, date and copyright. 2014-01-02 08:22:59 +00:00
mrg d1b43391bd - update CHANGES with recent changes
- update version to 20140102
- update copyrights
- use getcwd() over getwd()
- fix lean build (don't include lua)
2014-01-02 08:21:38 +00:00
mbalmer 8bbb1276fe fix bad free 2013-11-19 07:51:56 +00:00
christos 1f8b65e5d5 CID 1107545, 1107546: fix memory leak 2013-11-13 21:46:22 +00:00
christos 04c9845e3b CID 1107546: Fix memory leak 2013-11-13 21:44:29 +00:00