Commit Graph

5089 Commits

Author SHA1 Message Date
Glenn Strauss 1b886b9de1 [CI] ci-build.sh: adjust meson; add pam, maxminddb 2023-07-28 00:02:33 -04:00
Glenn Strauss b4b9429b39 [mod_nss] nspr include prefix portability(attempt) 2023-07-27 23:30:47 -04:00
Glenn Strauss 2f9aa55bc5 [CI] remove mbedtls from autobuild; let rest build 2023-07-26 22:57:12 -04:00
Glenn Strauss 477d4495e5 [CI] remove NSS from autobuild; let rest build 2023-07-26 22:55:29 -04:00
Glenn Strauss 9428c480bb [CI] remove wolfssl from autobuild; let rest build 2023-07-26 22:17:01 -04:00
Glenn Strauss c2d155b1e6 [CI] scripts/ci-build.sh arg consistency;add meson 2023-07-26 19:32:28 -04:00
Glenn Strauss 31a1f29c17 [mod_nss] nspr include prefix portability(attempt) 2023-07-26 18:53:56 -04:00
Glenn Strauss f93e6247bd [core] hide unused var on _WIN32 compiler warning 2023-07-26 15:46:50 -04:00
Glenn Strauss c166657615 [core] treat upload_temp_file_size=0 as default sz
treat cq->upload_temp_file_size = 0 as default temp file size
since a value of zero is not a useful value if taken literally
2023-07-26 15:46:34 -04:00
Glenn Strauss 848f65e42d [core] remove tempdirs ptr from struct chunkqueue 2023-07-26 03:05:23 -04:00
Glenn Strauss 1dc8223b83 [core] store cq->tempdirs in stack var
(minor code transformation step)
2023-07-26 03:05:23 -04:00
Glenn Strauss 2b39990229 [core] skip pwrite() to temp file if 0 len write
skip pwrite() to temp file if 0 len write in
chunkqueue_append_mem_to_tempfile()
2023-07-26 03:05:23 -04:00
Glenn Strauss d72b0a2487 [mod_deflate] code reuse to create temp file
reuse chunkqueue_append_mem_to_tempfile() to create temp file in
temporary chunkqueue instead of reaching into cq tempdir members
2023-07-26 03:05:23 -04:00
Stefan Bühler e9480dfa8e [tests] use current perl interpreter path for env.PERL in lighttpd.conf 2023-07-26 03:05:23 -04:00
Glenn Strauss 0552e54276 [core] config_set_defaults() reduce code size 2023-07-26 03:05:23 -04:00
Glenn Strauss 567f225032 [core] chunkqueue_env_tmpdir()
centralize tempdir logic: initialize env_tmpdir at startup using
TMPDIR, then TEMP (on _WIN32), and finally falling back to "/var/tmp"
2023-07-26 03:05:23 -04:00
Glenn Strauss 9abba32fcf [tests] initialize request_st cqs in tests
initialize request_st cqs in tests in order to inherit tempdirs
2023-07-26 03:05:23 -04:00
Glenn Strauss bbd0a7d6e6 [mod_ssi] init hctx->wq to init alt cq tempdirs 2023-07-26 03:05:23 -04:00
Glenn Strauss 825ddb9849 [tests] move %ENV modifications into forked child
move LightyTest.pm start_proc() %ENV modifications into forked child
2023-07-26 03:05:23 -04:00
Glenn Strauss c027a9de8c [core] import xxHash v0.8.2
import xxhash.[ch] as algo_xxhash.[ch]

https://github.com/Cyan4973/xxHash
tag: v0.8.2 bbb27a5efb85b92a0486cf361a8635715a53f6ba

preserve lighttpd customizations:

--- xxhash.c
+++ algo_xxhash.c
@@ -1,3 +1,8 @@
+#include "first.h"
+typedef int innocuous_typedef_to_quiet_empty_translation_unit_compiler_warning;
+
+#ifndef HAVE_XXHASH_H
+
 /*
  * xxHash - Extremely Fast Hash algorithm
  * Copyright (C) 2012-2021 Yann Collet
@@ -40,4 +45,6 @@
 #define XXH_STATIC_LINKING_ONLY   /* access advanced declarations */
 #define XXH_IMPLEMENTATION   /* access definitions */

-#include "xxhash.h"
+#include "algo_xxhash.h"
+
+#endif /* ! HAVE_XXHASH_H */
--- xxhash.h
+++ algo_xxhash.h
@@ -1,3 +1,20 @@
+#ifndef INCLUDED_ALGO_XXHASH_H
+#define INCLUDED_ALGO_XXHASH_H
+#include "first.h"
+
+/*(lighttpd customization)*/
+/*#define XXH_NO_INLINE_HINTS 1*/
+/*#define XXH_REROLL 1*/
+#define XXH_NO_LONG_LONG
+#define XXH_NO_STREAM
+
+
+#ifdef HAVE_XXHASH_H
+
+#include <xxhash.h>
+
+#else  /* ! HAVE_XXHASH_H */
+
 /*
  * xxHash - Extremely Fast Hash algorithm
  * Header File
@@ -6771,3 +6788,7 @@
 #if defined (__cplusplus)
 } /* extern "C" */
 #endif
+
+#endif /* ! HAVE_XXHASH_H */
+
+#endif
2023-07-26 03:05:23 -04:00
Glenn Strauss 3e28ab5f78 [mod_dirlisting] include ETag with cached result
include ETag with initial result cached, including with json output
2023-07-26 03:05:23 -04:00
Glenn Strauss c233dfc09d [mod_dirlisting] json output for /<path>/?json
admin should (separately) enable server.stream-response-body=1 or =2
in lighttpd.conf to enable streaming of the response.  Alternatively,
leave the defaults and use mod_deflate to compress the response for
clients which send Accept-Encoding.
2023-07-26 03:05:23 -04:00
Glenn Strauss 075bef1c41 [mod_dirlisting] send 103 w/ external css or js
send 103 Early Hints with external css or js, if auto_layout enabled
and if directory is large enough to result in mod_dirlisting yielding.
2023-07-26 03:05:23 -04:00
Glenn Strauss 049515daf7 [mod_dirlisting] http_dirlist_auto_layout_early_hints()
reduce code duplication
2023-07-26 03:05:23 -04:00
Glenn Strauss 60a802ca87 [core] fdevent_sh_exec()
consolidate most productions of "/bin/sh" "-c" "<cmdstring>"

avoid /bin/sh hanging around as parent for long-running processes
started by lighttpd, such as piped loggers, if the command to run the
piped logger does not require shell expansion.
2023-07-26 03:05:23 -04:00
Glenn Strauss 48181ee1c4 [core] code size: xxhash XXH_NO_STREAM
(slightly reduce code size once xxHash v0.8.2 is released)
2023-07-15 17:39:17 -04:00
Stefan Bühler 0b5a11a2f1 [tests] drop des-crypt and crypt-md5 auth tests - deprecated/not available on various platforms 2023-07-12 18:05:32 +02:00
Stefan Bühler b0c270dec1 [tests] use sha crypt for fastcgi auth environment tests 2023-07-12 18:05:05 +02:00
Stefan Bühler 28c905629a [doc] update stbuehler address 2023-07-12 01:59:43 +02:00
Glenn Strauss 9a46d67ccd [core] get body from cq at offset in chunk
(thx spillkiss)

If the request or response body is already in a single chunk in the
chunkqueue, but not starting at the beginning of cq->first, the body
must be retrieved at the offset in the chunk buffer.

x-ref:
  "reading completed POST req_body in mod_magnet context"
  https://redmine.lighttpd.net/boards/2/topics/11064
2023-07-07 03:08:16 -04:00
Glenn Strauss 849fdd188a [core] chunkqueue_read_squash() returns cq->first
chunkqueue_read_squash() now returns cq->first

x-ref:
  "reading completed POST req_body in mod_magnet context"
  https://redmine.lighttpd.net/boards/2/topics/11064
2023-07-07 03:06:57 -04:00
Glenn Strauss 4a499883cd [core] set CON_STATE_READ_POST for HTTP/2 reqbody
(thx spillkiss)

set CON_STATE_READ_POST for HTTP/2 requests containing request body
which has not yet been received.

regression in lighttpd 1.4.70 - 1.4.71
Affects HTTP/2 requests containing request body and handled by
mod_webdav or by mod_magnet with lua using lighty.r.req_body.collect

x-ref:
  "reading completed POST req_body in mod_magnet context"
  https://redmine.lighttpd.net/boards/2/topics/11064
2023-07-04 23:13:53 -04:00
Glenn Strauss e0cd9ae5b0 [mod_authn_ldap] fix config auth.require group=... (fixes #3216)
(thx raunz)

regression in lighttpd 1.4.65 - 1.4.71
(introduced in commit:8b296531)

x-ref:
  "auth.require "require" => "group=CN=... doesn't work with 1.4.69 on debian12 anymore"
  https://redmine.lighttpd.net/issues/3216
2023-07-04 10:49:53 -04:00
Glenn Strauss b11e6594bb [mod_extforward] fix extforward.params config opt
regression: extforward.params ignored from lighttpd 1.4.56 - 1.4.71

x-ref:
  "mod_extforward doesn't set mod_magnet lighty.r.req_env['REMOTE_USER']"
  https://redmine.lighttpd.net/boards/2/topics/11086
2023-07-04 10:21:52 -04:00
Glenn Strauss 9673dab01f [mod_webdav] extend symlink support (non-standard)
extend symlink support (non-standard) when the top level of the
PROPFIND is a symlink and when the non-standard extension is enabled
in lighttpd.conf:
  webdav.opts += ("unsafe-propfind-follow-symlink" => "enable")
  webdav.is-readonly = "enable"

x-ref:
  "lighttpd 1.4.71 Web_dav with symlinks support"
  https://redmine.lighttpd.net/boards/2/topics/11067
2023-07-04 08:10:22 -04:00
Glenn Strauss d4a2b5fbee [core] enable config conditions on HTTP/2 PRI
x-ref:
  "How to exclude "PRI * HTTP/2.0" lines from the access.log"
  https://redmine.lighttpd.net/boards/2/topics/11082
2023-07-04 07:56:30 -04:00
Glenn Strauss 6c6c619fac Revert "[core] h2 http_request_parse_header() tweak"
This reverts commit 4b9581ad0c.

(thx HenrikHolst)

x-ref:
  "A 400 error introduced in v1.4.70 from Chrome(?)"
     (Chromium Embedded Framework)
  https://redmine.lighttpd.net/boards/2/topics/11045
2023-06-18 00:19:32 -04:00
Glenn Strauss b902cb27d2 [core] request.c:request_pool_{push,pop}
small static funcs; inlined when optimized
2023-06-16 00:38:00 -04:00
Glenn Strauss 2df2aaa329 [core] request_init_data() minor optim
(slightly reduced number of assembly instructions when optimized)
2023-06-16 00:36:52 -04:00
Glenn Strauss f0d223a505 [core] reqpool.c:request_set_con()
single func which associates (request_st *) members with (connection *)
2023-06-16 00:34:43 -04:00
Glenn Strauss b1a96a974e [core] ignore coverity warning 2023-06-12 21:01:40 -04:00
Glenn Strauss 38904c0ae9 [core] ignore coverity warning 2023-06-12 20:52:29 -04:00
Glenn Strauss edf5a871f4 [mod_dirlisting] fix missing header/readme (fixes #3211)
(thx laf0rge)

regression present in lighttpd 1.4.60 - lighttpd 1.4.71

fix (sometimes) missing header or readme from dirlisting when
  dir-listing.show-header = "enable" (default: disable)
  dir-listing.show-readme = "enable" (default: disable)
and when
  dir-listing.encode-header = "enable" (default: enable)
  dir-listing.encode-readme = "enable" (default: enable)
due to reuse of open fd from stat cache, but read()ing fd without
first rewinding fd file position to beginning of file, resulting
in the file being returned on first request only, until the fd
expires from the stat cache.

x-ref:
  "mod_dirlisting includes readme / footer only sporadically"
  https://redmine.lighttpd.net/issues/3211
2023-06-12 20:04:07 -04:00
Glenn Strauss 2af27d5ee1 [mod_dirlisting] send Link w/ external css or js
send Link response header(s) if configured with either or both of
  dir-listing.external-css
  dir-listing.external-js
2023-06-12 20:04:07 -04:00
Glenn Strauss b1743fd012 [core] warn if daemonize w/o absolute config path
warn if daemonize w/o absolute path to config file (e.g. lighttpd.conf)
2023-05-31 19:42:48 -04:00
Glenn Strauss fe5f0cf87d [core] save config read from stdin across restart
Preserving config read from stdin across graceful restart allows
triggering re-read of config files such as TLS certificates.
2023-05-31 19:42:46 -04:00
Glenn Strauss 9f38b63cae - next is 1.4.72 2023-05-27 16:22:21 -04:00
Glenn Strauss a45bc54d18 [doc] NEWS 2023-05-27 15:50:58 -04:00
Glenn Strauss ec097cb8f9 [core] clarify comment 2023-05-27 12:14:09 -04:00
Glenn Strauss 94595bf483 [mod_vhostdb_mysql] MySQL missing mysql_get_socket (fixes #3208)
MySQL does not have mysql_get_socket(); MariaDB has mysql_get_socket()

x-ref:
  "Lighttpd 1.4.70's `src/mod_vhostdb_mysql.c` change is incompatible with MySQL 8"
  https://redmine.lighttpd.net/issues/3208
2023-05-23 22:36:57 -04:00