| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(e.g. support for HTTP/2 module mod_h2)
|
| |
|
| |
|
| |
|
|
|
|
| |
wrap mbedtls_debug_set_threshold() in #ifdef for MBEDTLS_DEBUG_C
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
always decr fd count in connection_close()
always decr fd count in fdevent_sched_run()
Error return value from close() should be used for diagnostics and
recovery, but the state of the file descriptor is unspecified by POSIX.
On most systems, it is invalid to redo close(). (Linux 'man 2 close'
suggests that HP-UX is an outlier, and that a future POSIX standard
update will specify the behavior for the file descriptor to be closed)
EBADF should not happen in those funcs for lighttpd since those should
be the only locations in lighttpd where those fds are closed.
|
|
|
|
|
| |
collect error handling code for cgi_create_env()
(for code reuse and consistency; also reduces code size)
|
|
|
|
| |
It is not necessarily an error for CGI to close its input early
|
|
|
|
|
|
|
| |
.text segment was slightly over (2) 4k pages;
tweak code to be slightly less than (2) 4k pages
(when compiled optimized -O2)
(likely smaller when compiled -Os)
|
| |
|
|
|
|
|
| |
rename http_kv funcs for consistency ("http_" prefix)
reorder http_versions[]
|
| |
|
|
|
|
|
|
|
| |
match "map-host-response" with authority provided in (request) Host
for "-" in response map and when no other "map-host-request" mapped
request to a different authority. This is a bit friendlier for use
with bidirectional https-remap.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$SERVER["socket"] inherits ssl.engine = "enable" from global scope
fixes issue of TLS-enabled socket, but missing config,
if ssl.engine = "enable" in global scope
and $SERVER["socket"] does not contain ssl.engine = "enable"
e.g. default TLS-enabled, and explicitly disabled on specific sockets
server.port = 443
ssl.engine = "enable"
ssl.pemfile = ...
ssl.privkey = ...
$SERVER["socket"] == ":80" { ssl.engine = "disable" }
$SERVER["socket"] == "[::]:80" { ssl.engine = "disable" }
$SERVER["socket"] == " :443" { }
$SERVER["socket"] == "[::]:443" { }
|
|
|
|
|
| |
slightly reduces code size for less-hot code
better collects shutdown process for r->http_version > HTTP_VERSION_1_1
|
| |
|
|
|
|
| |
warn if auth.require path never matches due to an earlier, shorter path
|
|
|
|
|
|
|
| |
check FORCE_WOLFSSL_CRYPTO and FORCE_MBEDTLS_CRYPTO when choosing
cryptolib
todo: should also apply to lighttpd autoconf, CMake, SCONS builds
|
|
|
|
|
|
|
| |
comment code about caching target dirname using stat_cache
In simple performance tests, using stat_cache here makes little
difference, as the overhead of process creation is orders of
magnitude larger.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use posix_spawn() where available
use posix_spawn_file_actions_addfchdir_np() where available
Using posix_spawn() reduces initial execution overhead of CGI programs;
posix_spawn() is often faster than application code wrapping and calling
traditional fork(),execve().
(history: fdevent.c posix_spawn code based on fdio.c:fdio_ipc_spawn()
from 2015 on one of my unpublished branches. The inability to chdir()
delayed inclusion in lighttpd, as the CGI specification says:
"The current working directory for the script SHOULD be set
to the directory containing the script."
e.g. chdir() to target program directory before CGI execution)
posix_spawn_file_actions_addfchdir_np() is a new(er) extension supported
in glibc 2.29+, musl libc, FreeBSD ≥ 13.1, macOS ≥ 10.15 according to
https://cygwin.com/pipermail/cygwin/2023-April/253505.html
https://cygwin.com/pipermail/cygwin/2023-April/253526.html
https://sourceware.org/bugzilla/show_bug.cgi?id=17405
POSIX Issue 8 plans to include posix_spawn_file_actions_addfchdir():
https://www.austingroupbugs.net/view.php?id=1208
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are likely better and cleaner ways to do this; patches welcome.
_WIN32 symbol imports and exports
MS Visual Studio (_MSC_VER) does not appear to export global data
symbols even when exporting all functions.
Annotating any symbols with __declspec(dllexport) in any translation
unit appears to change default dll symbol implict export behavior.
Currently, src/Makefile.am and CMakeLists.txt take different approaches
(implib versus linking against executable which has exported symbols)
x-ref:
(improved solutions might possibly be constructed using these docs)
https://sourceware.org/binutils/docs/ld/WIN32.html
https://cmake.org/cmake/help/latest/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html
https://stackoverflow.com/questions/225432/export-all-symbols-when-creating-a-dll
|
|
|
|
| |
_WIN32 __declspec(dllexport) on mod_*_plugin_init()
|
|
|
|
|
|
| |
- static build option under cygwin
- _WIN32 build more modules with BUILD_STATIC
- _WIN32 remove older build config
|
|
|
|
| |
https://learn.microsoft.com/en-us/windows/win32/winsock/scatter-gather-i-o-2
|
|
|
|
| |
(e.g. LI_DECLARE_EXPORTS is not currently used)
|
| |
|
|
|
|
|
| |
alas, does not seem to make a difference;
across many core interfaces, MS handles non-ASCII UTF-8 poorly
|
|
|
|
|
|
|
|
|
|
|
| |
open(), stat(), mkdir() on UTF-8 paths
lighttpd provides large file support and 64-bit time,
so provide override to use _stati64() (and _wstati64())
Additionally, provide custom function to support stat on UTF-8 path,
which must first be converted to wide-char and _wstati64(),
since _stati64() is naive and does not properly support UTF-8.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: TCP half-close is reported by WSAPoll() as POLLHUP event.
(e.g. TCP half-close from shutdown(fd, SHUT_WR))
TODO: If performance tests of select() vs WSAPoll() do not show a
a measurable difference, select() may be preferred over WSAPoll().
For now, make both "poll" and "select" available options in _WIN32.
(On other platforms, lighttpd build does not built code to use select()
when poll() is available on the platform.)
|
| |
|
|
|
|
| |
Also, adjust mod_ssi to remove assumption that "/tmp" is temp directory
|
| |
|
|
|
|
|
|
|
|
| |
_WIN32 disable deflate.cache-dir due to NTFS filesystem limitations
deflate.cache-dir renames files into place and this fails if the
files are open (source or destination). deflate.cache-dir would
have to be reworked to fail gracefully and continue serving request
if the final rename fails.
|
| |
|
|
|
|
| |
The adjustments are minimal; not intended to be complete.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
mingw does not support strftime() "%F %T"
|
|
|
|
| |
use -lws2_32 instead of -lwsock32
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_WIN32 SOCKET (long long unsigned) handles are assigned differently
from how POSIX allocates file descriptors (lowest number available).
On _WIN32, the SOCKET descriptor should not be used to index an array
of (fdnode *), so this commit provides an alternative method to store
(fdnode *) for use by select() and by WSAPoll().
select(): commonly used unix select() idioms may be incorrect on _WIN32
https://devblogs.microsoft.com/oldnewthing/20221102-00/?p=107343
https://devblogs.microsoft.com/oldnewthing/20161221-00/?p=94985
WSAPoll():
https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsapoll
As of Windows 10 version 2004, when a TCP socket fails to connect,
(POLLHUP | POLLERR | POLLWRNORM) is indicated.
(note: this was broken in WSAPoll() in all earlier Windows versions)
|