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.
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
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.)
_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.
_WIN32 is sufficiently different -- *different*; not better -- that
isolating _WIN32 code is clearer than #ifdef _WIN32 in almost every
func in fdevent.c
_WIN32-specific fdevent_socket_* funcs
_WIN32 SOCKET fds must be closed with closesocket(), not close()
_WIN32 HANDLE_FLAG_INHERIT for FD_CLOEXEC
_WIN32 use _sopen_s() without _O_TEMPORARY
Use _sopen_s() without _O_TEMPORARY in fdevent_mkostemp().
_O_TEMPORARY would remove file once last handle to file is closed.
Temporary files in chunkqueue may be closed for large request/response
_WIN32 fdevent_rename() using MoveFileExA
_WIN32 rename() fails if the target file already exists.
Alternatives are MoveFileExA() or ReplaceFileA().
Both of the above fail if either oldfile or newfile are open, so
- not atomic
- may fail sporadically