Commit Graph

3719 Commits (f0074a7ded08d52b39f3ccc3829a3a830cd16261)

Author SHA1 Message Date
Glenn Strauss f0074a7ded [mod_access] mark mod_access_check attribute pure 2021-01-13 16:10:16 -05:00
Glenn Strauss 947d36941d [doc] add --with-zstd to INSTALL 2021-01-13 14:39:01 -05:00
Glenn Strauss c0e73fd1d8 [mod_dirlisting] hide unused variable on MacOS
(quiet compiler warning)
2021-01-12 23:01:26 -05:00
Glenn Strauss 8ae6807654 [mod_deflate] use zstd streaming API 2021-01-12 22:39:28 -05:00
Glenn Strauss 9211fb3d86 [mod_deflate] support Accept-Encoding: zstd 2021-01-12 18:29:20 -05:00
Glenn Strauss ef28cce5e5 [mod_dirlisting] use fdopendir(), fstatat()
use fdopendir(), fstatat(), if available
2021-01-11 16:55:23 -05:00
Glenn Strauss 14f8f9b21c [mod_openssl] set Ciphersuites once API available
set Ciphersuites once API is available (SSL_CTX_set_ciphersuites())
in LibreSSL.

  "Add support for TLS 1.3"
2021-01-11 14:37:00 -05:00
Glenn Strauss cb24e1c70b [multiple] fix: honor CipherString for alt TLS lib
fix typo: honor user-defined CipherString for alternative TLS libraries
(LibreSSL, BoringSSL, wolfSSL)
2021-01-11 14:36:41 -05:00
Glenn Strauss 3adbb3e3fa [mod_openssl] update LIBRESSL_VERSION_NUMBER check 2021-01-11 12:40:41 -05:00
Glenn Strauss 0b4733f244 [doc] -v silent for mult vnd
Do not issue trace if multiple */vnd.* register the same extension

(silently mark mime-type for extension as application/octet-stream)
2021-01-09 12:39:45 -05:00
Glenn Strauss 8faa456fc8 [core] fix crash in error trace if backend is down (fixes #3052)
(thx hamelg)

  "segfault with mod_scgi on backend server with unix socket domain"
2021-01-08 17:43:52 -05:00
Glenn Strauss be8909833b [doc] -v for warnings
Do not issue warnings about duplicated entries unless called with -v

/etc/mime.types is not typically edited by the end user,
so the warning trace is noise to most end users.
2021-01-08 07:10:31 -05:00
Glenn Strauss a89e94e0bf [autoconf] fix LT_INIT syntax 2021-01-08 01:27:19 -05:00
Glenn Strauss 35675284a2 [doc] improve case handling
make more resilient to questionable edits
to /etc/mime.types

non-vnd.* subtype takes precedence over vnd.* subtype
  (type/subtype, e.g. text/plain)

  "lighttpd: does not start with media-types 1.1.0"
2021-01-07 10:45:24 -05:00
Glenn Strauss 65521537a8 [mod_dirlisting] quiet coverity false positive 2021-01-07 10:22:14 -05:00
Glenn Strauss 21f0dabef4 [multiple] replace buffer_is_equal_caseless_string
buffer_is_equal_caseless_string() -> buffer_eq_icase_slen()
2021-01-07 09:08:53 -05:00
Glenn Strauss 891007fb6a [multiple] use HTTP_HEADER_* enum before strcmp
When known, use HTTP_HEADER_* enum before string comparisons
2021-01-07 08:58:30 -05:00
Glenn Strauss b6892fb242 [mod_extforward] fix extforward.headers defaults (fixes #3051)
(thx glen)

Regression in lighttpd 1.4.56 - 1.4.58 when extforward.headers is
not set in lighttpd.conf.

Workaround: extforward.headers = ("X-Forwarded-For")
  (or appropriate value depending on header sent by upstream proxy)

  "mod_extforward regression 1.4.56"
2021-01-07 08:51:42 -05:00
Glenn Strauss a99550d76c [mod_extforward] config warning for module order
expand config warning for module load order to include other TLS modules
2021-01-06 07:52:20 -05:00
Glenn Strauss bdb58c245a [mod_openssl] extend ssl.openssl.ssl-conf-cmd
extend ssl.openssl.ssl-conf-cmd to accept "SecurityLevel"
(lighttpd extension) and use the (string) value to call the
openssl-specific SSL_CTX_set_security_level()
2021-01-05 15:03:22 -05:00
Glenn Strauss a282a57148 [doc] improve case handling
make more resilient to questionable edits
to /etc/mime.types

  "lighttpd: does not start with media-types 1.1.0"
2021-01-05 12:52:14 -05:00
Glenn Strauss 6a28bd79b3 [mod_wolfssl] minor updates for wolfSSL v4.6.0 2021-01-05 12:52:14 -05:00
Glenn Strauss 5b1b9f7824 [tests] use ephemeral ports in tests
avoid spurious test failures due to conflicts with ports in use by
other processes, which might occur when tests use hard-coded ports
2021-01-05 12:52:11 -05:00
Glenn Strauss 048af4c506 [core] fix crash at shutdown w/ certain config
If server.systemd-socket-activation = "enable" and one or more of the
sockets is not listed in lighttpd.conf, then when the server is shutting
down, a buffer from the config file is free()d twice.
2021-01-01 13:03:55 -05:00
Glenn Strauss 8f3395976d [autoconf] update ax_prog_cc_for_build.m4
update scripts/m4/ax_prog_cc_for_build.m4 from serial 8 to serial 18;a=blob_plain;f=m4/ax_prog_cc_for_build.m4
2021-01-01 01:08:40 -05:00
Glenn Strauss acca2a3f73 [autotools] autoupdate; subst deprecated/obsolete
autoupdate; subst deprecated/obsolete macros
- others
2020-12-31 23:33:56 -05:00
Glenn Strauss dfe471b77c [mod_dirlisting] place vars closer to where used
allocate memory for PATH_MAX to avoid pathconf() for _PC_NAME_MAX
2020-12-30 06:41:16 -05:00
Glenn Strauss 2f303d8205 [mod_gnutls] use local strncmp_const()
On some older gcc, strncmp is a macro and expects three arguments,
but does not see expansion of lighttpd CONST_STR_LEN() macro before
warning/error about incorrect number of arguments
2020-12-28 09:14:48 -05:00
Glenn Strauss 3088c76c8c [mod_mbedtls] use local strncmp_const()
On some older gcc, strncmp is a macro and expects three arguments,
but does not see expansion of lighttpd CONST_STR_LEN() macro before
warning/error about incorrect number of arguments
2020-12-28 09:13:21 -05:00
Glenn Strauss 171a064036 [mod_mbedtls] include mbedtls/platform_util.h
include mbedtls/platform_util.h for mbedtls_platform_zeroize()
(instead of relying on an indirect include)

(fixes build with (very old) mbedtls-2.14.0)
2020-12-28 08:54:50 -05:00
Glenn Strauss 693a29fe91 - next is 1.4.59 2020-12-27 23:36:23 -05:00
Glenn Strauss 0cb6466541 [mod_webdav] hide unused funcs depending on build
hide unused funcs depending on build flags
2020-12-27 22:51:40 -05:00
Glenn Strauss 992ba517ab [doc] NEWS 2020-12-27 22:42:56 -05:00
Glenn Strauss 37ae942346 [core] fix bug in read retry found by coverity
read retry loop needs separate var for result and data size to read

rename 'toSend' variable to 'len' (of chunk)
2020-12-27 22:35:48 -05:00
Glenn Strauss 5ec5e124c1 [tests] consolidate some tests/ content 2020-12-27 21:39:04 -05:00
Glenn Strauss db0cd76618 [build] add GNUMAKEFLAGS=--no-print-directory
quiet some automake noise during build
(can use 'make -s' to quiet more)

In doc/ and tests/docroot/, add GNUMAKEFLAGS=--no-print-directory -s
2020-12-27 21:37:28 -05:00
Glenn Strauss 2639e5ae43 [multiple] chunkqueue_write_chunk()
create API in chunk.[ch] for writing a chunk to an fd

(pull similar code from mod_cgi and mod_webdav)

This new API is intended for use on request body input, which is
written to size-limited temporary files controlled by lighttpd and
written to files or pipes.

(network_backend_write() is for writing chunkqueues to sockets)
2020-12-27 09:17:33 -05:00
Glenn Strauss 15bfe5ef0e [mod_webdav] typedef off_t loff_t for FreeBSD
FreeBSD provides an API similar to Linux copy_file_range()
but uses off_t instead of loff_t in the syscall.

off_t is equivalent to off64_t when lighttpd is built with LFS
(and lighttpd is built with LFS enabled by default)
2020-12-27 04:19:11 -05:00
Glenn Strauss 72b9bb5ba3 [core] http_response_match_if_range()
separate func to check "If-Range"
2020-12-26 20:00:42 -05:00
Glenn Strauss 0c6a6d06c6 [tests] OpenBSD crypt() support limited to bcrypt
OpenBSD crypt() does not support (insecure) crypt-des or crypt-md5

(The password used in the tests and lighttpd.htpasswd is crypt-des.
 Something else could be used so that the tests can execute,
 though that something might be different on different platforms.)
2020-12-26 03:47:41 -05:00
Glenn Strauss e16b4503e2 [core] fix bug in FastCGI uploads (#3033)
(thx zoon01 and ms49434)

  "Memory Growth with PUT and full buffered streams"
2020-12-26 02:56:39 -05:00
Glenn Strauss 5309ec8c95 [core] fix crash after specific err in config file 2020-12-25 17:47:16 -05:00
Glenn Strauss b700a8ca09 [multiple] etag.[ch] -> http_etag.[ch]; better imp
more efficient implementation of HTTP ETag generation and comparison

modify dekhash() to take hash value to allow for incremental hashing
2020-12-25 14:41:16 -05:00
Glenn Strauss 91e94f4875 [tests] load required modules in alt .conf tests
load only required modules in alt .conf tests
2020-12-24 23:39:52 -05:00
Glenn Strauss d228b06655 [tests] slight speed up checking for server ready
make connection attempt every 10ms instead of every 20ms
2020-12-24 23:09:23 -05:00
Glenn Strauss 655453a195 [core] inet_ntop_cache -> sock_addr_cache
* rename inet_ntop_cache.[ch] to sock_addr_cache.[ch]
* reimplement as separate caches for IPv4 and IPv6
2020-12-24 20:05:01 -05:00
Glenn Strauss 1212f60991 buffer_append_path_len() to join paths
use buffer_append_path_len() to join path segments
2020-12-24 16:13:20 -05:00
Glenn Strauss a0b615acd9 [core] http_date_timegm() (portable timegm())
move from mod_openssl.c
2020-12-24 16:13:20 -05:00
Glenn Strauss 122094e3e3 [multiple] employ http_date.h, sys-time.h
- replace use of strptime() w/ implementation specialized for HTTP dates
- use thread-safe gmtime_r(), localtime_r() (replace localtime, gmtime)
2020-12-24 16:13:20 -05:00
Glenn Strauss 48a8e893a7 [core] specialized strptime() for HTTP date fmts 2020-12-24 16:13:20 -05:00