Commit Graph

1845 Commits (d7638b9b104864aac48162a42f05f79794697cdb)

Author SHA1 Message Date
Stefan Bühler 107f40545c cleanup dead keyvalue code
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3073 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-01-30 13:59:10 +00:00
Stefan Bühler 566cf8decb add force_assert for more allocation results
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3072 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-01-30 13:59:07 +00:00
Stefan Bühler f3b577ddee use libmemcached instead of deprecated libmemcache
Differential Revision: https://review.lighttpd.net/D5

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3071 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-01-03 14:48:11 +00:00
Stefan Bühler c354229f42 add handling for lua 5.2 and 5.3 (fixes #2674)
Reviewers: stbuehler

Differential Revision: https://review.lighttpd.net/D4

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3070 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-01-03 14:48:09 +00:00
fbrosson d8e028e069 [mod_ssi] enhance support for ssi vars
Try ssi_vars if ssi_cgi_env does not have a matching var name.
Allow var names to also include digits after the initial letter or underscore.

From: fbrosson <fbrosson@users.noreply.github.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3069 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-01-03 14:48:07 +00:00
Stefan Bühler 3dd2f66d13 - next is 1.4.40
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3068 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-01-03 14:48:04 +00:00
Stefan Bühler c27e27a51b [scons] fix fullstatic build
- scons searches the dynamic libs to find all dependencies to link
  against in the static link:
  - now use the system search path (ld --verbose) instead of some
    hardcoded list
  - remove duplicates from the list (all but the last) to avoid linker
    errors
  - use custom WhereIsFile function instead of env.WhereIs to find
    not-executable files too
- only write 'plugin-static.h' if it actually changes

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3066 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-19 08:28:42 +00:00
Stefan Bühler 6ef3b709db [chunk] fix use after free / double free (fixes #2700)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3065 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-19 08:28:39 +00:00
Stefan Bühler 737d4f0f20 [core] fix memset_s call (fixes #2698)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3064 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-18 21:56:59 +00:00
Stefan Bühler 53c4ab8438 - next ist 1.4.39
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3063 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-05 14:18:38 +00:00
Kyle J. McKay b37dd77491 [core] show correct crypt support result (fixes #2690)
If the crypt function is available as part of the standard
system library, then HAVE_LIBCRYPT will not be set, but
HAVE_CRYPT or HAVE_CRYPT_R will.

Make server.c test HAVE_CRYPT, HAVE_CRYPT_R  and HAVE_LIBCRYPT
to determine the correct value of crypt support.

Signed-off-by: Kyle J. McKay

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3061 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-04 20:53:51 +00:00
Kyle J. McKay 159ca0c15d [network] add darwin-sendfile backend (fixes #2687)
The FreeBSD version of sendfile is already supported.  Starting
with OS X 10.5, Darwin also supports sendfile, but using a
slightly different argument list even though much of the
implementation is likely taken from FreeBSD just like the man
page is.

Add support for darwin's sendfile by introducing a new
network_darwin_sendfile.c file that's just a copy of the
network_freebsd_sendfile.c file except with the arguments
adjusted to compensate for the minor API difference (FreeBSD
has separate in and out byte count arguments whereas Darwin
has a combined in/out byte count argument).

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3060 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-04 20:48:21 +00:00
Kyle J. McKay b0ecb4d44b [mod_fastcgi/mod_scgi] zero sockaddr structs before use (fixes #2691)
When a sockaddr_un, sockaddr_in or sockaddr_in6 structure
is allocated on the stack or heap, it may contain random
byte values.

The "unused" and "reserved" parts must be zerod otherwise
unexpected failures may occur.  The simplest way to do
this and be compatible with various platforms' struct
layouts is just to memset them to 0.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3059 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-04 20:22:42 +00:00
Stefan Bühler ab05eb7cec [tests] do not half-close socket before having received the response (fixes #2688)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3058 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-04 20:22:38 +00:00
Stefan Bühler 1566748b1a [tests] test apr-md5 in mod-auth.t
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3057 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-04 20:11:35 +00:00
Kyle J. McKay 2bcb73cdb8 mod-auth.t: no crypt md5 for darwin
Darwin's crypt does not support the '$...' extensions.

Signed-off-by: Kyle J. McKay

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3056 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-04 20:11:33 +00:00
Stefan Bühler b9c14b24dd [autobuild] fix missing header in tar ball
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3055 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-11-22 22:37:19 +00:00
Stefan Bühler bfaa48260a [mod_secdownload] add required algorithm option; old behaviour available as "md5", new options "hmac-sha1" and "hmac-sha256"
Differential Revision: https://review.lighttpd.net/D7

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3054 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-11-22 22:22:22 +00:00
Stefan Bühler b0a4421272 [core] refactor base64 functions into separate file
Differential Revision: https://review.lighttpd.net/D6

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3053 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-11-22 22:22:20 +00:00
Stefan Bühler 85d8a17575 [core] encode path with ENCODING_REL_URI in redirect to directory (fixes #2661, thx gstrauss)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3052 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-11-07 15:00:18 +00:00
Stefan Bühler 3943de280e [core] add '~' to safe characters in ENCODING_REL_URI/ENCODING_REL_URI_PART encoding
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3051 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-11-07 15:00:15 +00:00
Stefan Bühler a069548370 [core] revert increase of temp file size back to 1MB, provide a configure option "server.upload-temp-file-size" instead (fixes #2680)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3050 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-11-07 12:51:14 +00:00
Stefan Bühler c512345fa2 [config] check config option scope; warn if server option is given in conditional
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3049 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-11-07 12:51:11 +00:00
Stefan Bühler 39add4476f [mod_secdownload] use a hopefully constant time comparison to check hash (fixes #2679)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3048 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-10-27 20:50:53 +00:00
Gaurav 5c5f67a5c7 add force_assert for many allocations and function results
From: Gaurav <g.gupta@samsung.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3047 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-10-16 19:44:06 +00:00
Stefan Bühler f19128086c [core] don't buffer request bodies smaller than 64k on disk
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3046 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-10-13 19:46:04 +00:00
Loganaden Velvindron d7be04beb5 [mod_auth] implement and use safe_memclear, using memset_s or explicit_bzero if available
From: Loganaden Velvindron <logan@elandsys.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3045 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-09-26 10:11:24 +00:00
Gaurav 37bdb250a4 [core] check configparserAlloc() result with force_assert
From: Gaurav <g.gupta@samsung.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3044 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-09-26 10:11:22 +00:00
Stefan Bühler a93be99441 [core] fix search for header end if split across chunks (fixes #2670)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3043 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-09-24 06:03:40 +00:00
Stefan Bühler 3512b5cb77 [core] allocate at least 4k buffer for incoming data
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3042 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-09-24 06:03:38 +00:00
Stefan Bühler 69f890e2c5 [stat-cache] fix handling of collisions, might have returned wrong data (fixes #2669)
- don't remember splay_tree nodes for long (dir_node, file_node) after
  cache lookup; only remember the data they pointed to (sce for file
  entries, fam_node for dir entries)
- unset sce / fam_node when a collision (not matching path) is detected
- check again for collision before splaytree_insert; the entry in
  question is already at the top because it was splayed before. simply
  replace the data on collisions (and release the old data).
- check fam_node for collisions too
- splaytree_size handles NULL nodes too
- enable some force_assert lines (were in #ifdef DEBUG_STAT_CACHE before)

Differential Revision: https://review.lighttpd.net/D1

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3039 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-09-16 00:18:11 +00:00
Stefan Bühler 90a9322121 fix packdist.sh output links
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3038 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-09-15 11:52:38 +00:00
Stefan Bühler d8b5492f5a -next is 1.4.38
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3037 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-09-15 11:52:35 +00:00
Stefan Bühler 5307fd5d33 packdist.sh: use fakeroot for make dist to have root owned files in tar
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3035 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-30 11:42:36 +00:00
Stefan Bühler dd4fe73c47 fix some warnings found by coverity ("leak" in setup phase, not catching too long unix socket paths in mod_proxy)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3034 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-30 10:16:28 +00:00
Stefan Bühler b9c160ec88 [scons] fix build
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3033 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-29 12:37:16 +00:00
Stefan Bühler 52d72fe8fc [scons] fix crypt() detection, other improvements
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3032 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-29 12:23:45 +00:00
Stefan Bühler 0b02cd2690 [mmap] handle SIGBUS in network; those get triggered if the file gets smaller during reading
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3031 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-29 12:23:42 +00:00
Stefan Bühler 68284bd7f1 [scons] various improvements
- don't generate files in src/
- move all build stuff to sconsbuild/
- have different output directories for static/ and fullstatic/,
  so we can use that directory for the test suite
- each build type (dynamic, static, fullstatic) has its own check target
- read CFLAGS, LDFLAGS and LIBS from environment
  (LIBS are appended after all other dependencies)

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3030 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-29 09:28:04 +00:00
Stefan Bühler b66fa2cb68 [plugins] when modules are linked statically still only load the modules given in the config
- previously it would load all modules in some fixed order
- also warn when mod_magnet or mod_trigger_b4_dl are compiled without
  needed dependencies
- mod_trigger_b4_dl fails in plugin_init when dependencies are missing

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3029 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-29 09:28:01 +00:00
Stefan Bühler 912533cd68 [mmap] fix mmap alignment
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3028 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-23 12:59:07 +00:00
Stefan Bühler 6d6dbadb14 [mod_cgi] rewrite mmap and generic (post body) send error handling
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3027 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-23 11:53:48 +00:00
Stefan Bühler 2b9be8f072 [build] put --as-needed into linker flags instead of cflags
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3026 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-23 08:07:47 +00:00
Stefan Bühler d572be6a6d small README for FreeBSD build setup
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3025 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-23 07:41:11 +00:00
Stefan Bühler 27ab3f76db [mod_dirlisting] remove sys/syslimits.h; base.h already includes limits.h
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3024 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-23 07:41:09 +00:00
Stefan Bühler 9257d7df4f [bsd xattr] fix compile break with BSD extended attributes in stat_cache
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3023 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-22 23:27:17 +00:00
Stefan Bühler d7cd5b087a [autoconf] define HAVE_CRYPT when crypt() is present
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3022 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-22 21:39:24 +00:00
Stefan Bühler 9290e923d9 [tests] fix warning about newline in filename
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3021 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-22 21:39:22 +00:00
Stefan Bühler e57a70174b [kqueue] fix kevent call
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3020 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-22 21:39:19 +00:00
Stefan Bühler 87c5ec9651 [tests] search for perl in PATH instead of /usr/bin; whitespace + test config cleanups
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3019 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-22 20:51:08 +00:00