Commit Graph

4055 Commits (f47261159720e90dc4444082b2a28bd1491634d4)

Author SHA1 Message Date
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
Glenn Strauss f8cc9fb915 [core] http_date.[ch] encapsulate HTTP-date parse
http_date.[ch] encapsulate HTTP-date parse/compare

(import from one of my development branches from 2015)
2020-12-24 16:13:20 -05:00
Glenn Strauss f928f6d827 [core] sys-time.h - localtime_r,gmtime_r macros
sys-time.h - localtime_r,gmtime_r macros if needed

provide rudimentary localtime_r() and gmtime_r() if not present
(wraps localtime() and gmtime() funtions, but are not thread-safe since
 they do not take a lock around access to localtime() and gmtime())

(import from one of my development branches from 2015)
2020-12-24 16:13:20 -05:00
Glenn Strauss 29f50bdeb0 [multiple] fdevent_waitpid() wrapper 2020-12-24 16:13:17 -05:00
Glenn Strauss 2ecbe5948d [mod_proxy] fix sending of initial reqbody chunked
fix sending of initial reqbody chunked to backend
2020-12-24 01:15:55 -05:00
Glenn Strauss ceab1e700d [core] add comment for FastCGI mem use in hctx->rb (#3033)
  "Memory Growth with PUT and full buffered streams"
2020-12-24 01:02:36 -05:00
Glenn Strauss 7ba521ffb4 [core] reuse large mem chunks (fix mem usage) (fixes #3033)
(thx flynn)

fix large memory usage for large file downloads from dynamic backends

reuse or release large memory chunks

  "Memory Growth with PUT and full buffered streams"
2020-12-24 00:20:27 -05:00
Glenn Strauss b598bb53f9 [tests] remove FastCGI test dependency on PHP 2020-12-23 03:50:13 -05:00
Glenn Strauss 89a3987ce7 [core] prefer IPv6+IPv4 func vs IPv4-specific func 2020-12-23 03:50:13 -05:00
Glenn Strauss fc01b820ec [tests] remove FastCGI test dependency on libfcgi
- rewrite fcgi-responder as standalone app
  fcgi-responder is now a minimal, standalone FastCGI server for tests
- remove dependency on fcgi-devel package
- merge fcgi-auth into fcgi-responder
2020-12-23 03:49:43 -05:00
Glenn Strauss c68a7b4552 [tests] collect code for "die-at-end" tests 2020-12-18 20:36:30 -05:00
Glenn Strauss 0bff6d58bc [mod_wolfssl] compile with earlier wolfSSL vers
compatibility to compile with earlier wolfSSL versions

compile-tested back to wolfSSL tag v3.14.0-stable
configured with (possibly extra flags)
  ./configure --enable-opensslextra --enable-opensslall --enable-sni \
    --enable-lighty --enable-stunnel --enable-nginx --enable-haproxy

Functionality has not been tested!
Please consider using the latest stable release of wolfSSL.
2020-12-18 20:36:25 -05:00
Glenn Strauss 6cf92dffe3 [mod_wolfssl] use wolfSSL TLS version defines
now that mod_wolfssl is a standalone module, use wolfSSL TLS ver defines

(Increase compatibility of mod_wolfssl with wolfSSL versions prior to
 wolfSSL v4.2.0)
2020-12-17 21:09:59 -05:00
Glenn Strauss ae77d8ae6e - next is 1.4.58 2020-12-17 04:31:59 -05:00
Glenn Strauss 91250ee0bd [doc] NEWS 2020-12-17 04:03:25 -05:00