History log of /lighttpd1.4/src/mod_cgi.c (Results 1 – 25 of 247)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: lighttpd-1.4.69
# 7967fdf5 02-Feb-2023 Glenn Strauss <[email protected]>

[mod_cgi] cygwin supports CGI file I/O redirection

remove the special-case which disabled this for issue in older cygwin


# f0786a75 22-Jan-2023 Glenn Strauss <[email protected]>

[core] pass fdn to fdevent_sched_close,_unregister

remove issock flag; on _WIN32, select(), WSAPoll() work only on sockets


Revision tags: lighttpd-1.4.68
# 5e14db43 10-Dec-2022 Glenn Strauss <[email protected]>

[multiple] employ ck_calloc, ck_malloc shared code

employ ck_calloc(), ck_malloc() shared code to slightly reduce code size
(centralize the ck_assert() to check that memory allocation succeeded)


# b82d7b8a 06-Dec-2022 Glenn Strauss <[email protected]>

[multiple] mark mod_*_plugin_init() funcs cold


# cda9b716 23-Oct-2022 Shulyaka <[email protected]>

[mod_proxy,mod_cgi] fix dummy Sec-WebSocket-Key

fix dummy Sec-WebSocket-Key value to remove excess '\n'

x-ref:
"Fix websocket HTTP/2 to HTTP/1.1 proxy"
https://github.com/lighttpd/lighttpd1.4/p

[mod_proxy,mod_cgi] fix dummy Sec-WebSocket-Key

fix dummy Sec-WebSocket-Key value to remove excess '\n'

x-ref:
"Fix websocket HTTP/2 to HTTP/1.1 proxy"
https://github.com/lighttpd/lighttpd1.4/pull/123

github: closes #123

show more ...


Revision tags: lighttpd-1.4.67
# 73df7b64 14-Sep-2022 Glenn Strauss <[email protected]>

[core] manually calculate off_t max (fixes #3171)

manually calculate off_t max for broken cross-compilation systems which
fail to enable large file support (so sizeof(off_t) != sizeof(int64_t))

If

[core] manually calculate off_t max (fixes #3171)

manually calculate off_t max for broken cross-compilation systems which
fail to enable large file support (so sizeof(off_t) != sizeof(int64_t))

If sizeof(off_t) != sizeof(int64_t), a negative number could end up in
cq->upload_temp_file_size when it was assigned INTMAX_MAX, leading to
excessive new temporary file creation occurring on each and every write.

x-ref:
"File upload regression with --disable-lfs"
https://redmine.lighttpd.net/issues/3171

show more ...


Revision tags: lighttpd-1.4.66, lighttpd-1.4.65
# 467fb2bf 17-May-2022 Glenn Strauss <[email protected]>

[mod_cgi] fix detection of failing error handler (fixes #3157)

(thx sparlane)

failing error handler produced no output and POLLRDHUP received with
POLLIN.

commit dd23fcb2 changed return value from

[mod_cgi] fix detection of failing error handler (fixes #3157)

(thx sparlane)

failing error handler produced no output and POLLRDHUP received with
POLLIN.

commit dd23fcb2 changed return value from HANDER_FINISHED to
HANDLER_GO_ON when introducing cgi_process_rd_revents(), and POLLRDHUP
case which previously fell through needed to continue to return
HANDLER_FINISHED after calling cgi_connection_close()

x-ref:
"fall-back with cgi error handler no longer works"
https://redmine.lighttpd.net/issues/3157

show more ...


# 317b4ba1 26-Mar-2022 Glenn Strauss <[email protected]>

[mod_cgi] immed start CGI if Upgrade


# ce9e0dfc 26-Mar-2022 Glenn Strauss <[email protected]>

[mod_cgi] disable input optim if might Upgrade

(thx pegasus)

disable CGI stdin input optimizations if CGI might Upgrade connection,
since if we upgrade protocols, the original Content-Length -- exp

[mod_cgi] disable input optim if might Upgrade

(thx pegasus)

disable CGI stdin input optimizations if CGI might Upgrade connection,
since if we upgrade protocols, the original Content-Length -- expected
to be 0 for Upgrade -- does not represent the end of the input.

show more ...


# fa5e9b53 25-Mar-2022 Glenn Strauss <[email protected]>

[multiple] immed connect to backend for streaming

connect to backend (mod_cgi, mod_proxy, mod_sockproxy, mod_wstunnel)
for streaming request body without waiting for initial data in request
body. U

[multiple] immed connect to backend for streaming

connect to backend (mod_cgi, mod_proxy, mod_sockproxy, mod_wstunnel)
for streaming request body without waiting for initial data in request
body. Useful for things like websockets when data starts on server-side

show more ...


# 5d1aa5d0 24-Mar-2022 Glenn Strauss <[email protected]>

[multiple] WebSockets over HTTP/2 (fixes #3151)

Add support for WebSockets over HTTP/2 to lighttpd core and to
mod_cgi w/ config: cgi.upgrade = "enable"
mod_proxy w/ config: proxy.head

[multiple] WebSockets over HTTP/2 (fixes #3151)

Add support for WebSockets over HTTP/2 to lighttpd core and to
mod_cgi w/ config: cgi.upgrade = "enable"
mod_proxy w/ config: proxy.header += ("upgrade" => "enable")
mod_wstunnel

HTTP/2 CONNECT extension defined in RFC8441 is translated to HTTP/1.1
'Upgrade: websocket' requests to mod_cgi or mod_proxy, and is handled
directly in mod_wstunnel.

x-ref:
WebSockets over HTTP/2
https://redmine.lighttpd.net/issues/3151
Bootstrapping WebSockets with HTTP/2
https://datatracker.ietf.org/doc/html/rfc8441

show more ...


# cc65a21e 18-Feb-2022 Glenn Strauss <[email protected]>

[mod_cgi] cgi.local-redir request_reset thru fnptr

cgi.local-redir call plugins_request_reset through fn ptr

(isolate plugins_* funcs to server;
should not be called directly from plugins/modules)


Revision tags: lighttpd-1.4.64
# bade1c03 07-Jan-2022 Glenn Strauss <[email protected]>

[multiple] remove buffer_init_string()

remove (minor) convenience func; easy to replace


Revision tags: lighttpd-1.4.63, lighttpd-1.4.62
# ec50657e 04-Nov-2021 Glenn Strauss <[email protected]>

[mod_cgi] check fd-to-cgi not -1 before close

sanity check


Revision tags: lighttpd-1.4.61
# e8a6ed6e 18-Oct-2021 Glenn Strauss <[email protected]>

[core] thwart h2c smuggling when Upgrade enabled

Existing behavior: mod_proxy *does not* forward Upgrade header
unless explicitly enabled in lighttpd.conf (default: not enabled)
(proxy.header += (

[core] thwart h2c smuggling when Upgrade enabled

Existing behavior: mod_proxy *does not* forward Upgrade header
unless explicitly enabled in lighttpd.conf (default: not enabled)
(proxy.header += ("upgrade" => "enable"))

mod_cgi previously used to forward Upgrade request header, but would
remove Upgrade response header if cgi.upgrade was not explicitly enabled
(cgi.upgrade = "enable")

This patch thwarts h2c smuggling when lighttpd.conf has also been
explicitly configured to pass "Upgrade" request header

x-ref:
"h2c Smuggling: Request Smuggling Via HTTP/2 Cleartext (h2c)"
https://labs.bishopfox.com/tech-blog/h2c-smuggling-request-smuggling-via-http/2-cleartext-h2c

show more ...


Revision tags: lighttpd-1.4.60
# dd23fcb2 25-Sep-2021 Glenn Strauss <[email protected]>

[mod_cgi] improve chunk buffer reuse from backends

mark and temporarily defer event handling of backend events in order
to handle at same time as the associated front-end connection events


# 4d99d9b7 22-Sep-2021 Glenn Strauss <[email protected]>

[multiple] check feature flags funcs; code reuse

config_feature_bool()
config_feature_int()


Revision tags: lighttpd-1.4.59, lighttpd-1.4.58, lighttpd-1.4.57, lighttpd-1.4.56
# cc2fcd3e 24-Nov-2020 Glenn Strauss <[email protected]>

[multiple] _WIN32 fdevent_pipe_cloexec()

Note: Under _WIN32, serious limitation in Windows APIs:
select() and WSAPoll() operate only on sockets (not pipes)
(directly affects mod_cgi; not current

[multiple] _WIN32 fdevent_pipe_cloexec()

Note: Under _WIN32, serious limitation in Windows APIs:
select() and WSAPoll() operate only on sockets (not pipes)
(directly affects mod_cgi; not currently handled)

show more ...


# f19f7162 17-Sep-2021 Glenn Strauss <[email protected]>

[multiple] internal control for backend read bytes

separate internal control for backend max_per_read

When not streaming, large reads will be flushed to temp files on disk.
When streaming, use a sm

[multiple] internal control for backend read bytes

separate internal control for backend max_per_read

When not streaming, large reads will be flushed to temp files on disk.
When streaming, use a smaller buffer to help reduce memory usage.

When not streaming, attempt to read and empty kernel socket bufs.
(e.g. MAX_READ_LIMIT 256k)

When writing to sockets (or pipes) attempt to fill kernel socket bufs.
(e.g. MAX_WRITE_LIMIT 256k)

show more ...


# 7b615d5d 12-Sep-2021 Glenn Strauss <[email protected]>

[multiple] de-dup file and piped loggers (fixes #3101)

de-dup file and piped loggers for error logs and access logs

x-ref:
"RFE: de-dup file and piped loggers"
https://redmine.lighttpd.net/issu

[multiple] de-dup file and piped loggers (fixes #3101)

de-dup file and piped loggers for error logs and access logs

x-ref:
"RFE: de-dup file and piped loggers"
https://redmine.lighttpd.net/issues/3101

show more ...


# a3e9faa4 09-Sep-2021 Glenn Strauss <[email protected]>

[multiple] quiet coverity warnings


# 33ffec35 30-Aug-2021 Glenn Strauss <[email protected]>

[mod_cgi] cgi.limits "tcp-fin-propagate" => "SIG"

cgi.limits += ("tcp-fin-propagate" => "<signal>") (e.g. "SIGTERM")

send specified signal to CGI if TCP FIN is received from client
(default: do no

[mod_cgi] cgi.limits "tcp-fin-propagate" => "SIG"

cgi.limits += ("tcp-fin-propagate" => "<signal>") (e.g. "SIGTERM")

send specified signal to CGI if TCP FIN is received from client
(default: do not send signal to CGI)

show more ...


# bd72d192 29-Aug-2021 Glenn Strauss <[email protected]>

[core] remove server.upload-temp-file-size limit

previously undocumented server.upload-temp-file-size in lighttpd 1.4.38
preceded introduction of lighttpd streaming options in lighttpd 1.4.40
(serve

[core] remove server.upload-temp-file-size limit

previously undocumented server.upload-temp-file-size in lighttpd 1.4.38
preceded introduction of lighttpd streaming options in lighttpd 1.4.40
(server.stream-request-body and server.stream-response-body)

show more ...


# 70195d06 24-Aug-2021 Glenn Strauss <[email protected]>

[mod_cgi] improve CGI offloading

improve CGI offloading when not streaming request body

If not streaming request body, collect request body into single tempfile
and use fd to tempfile as stdin to C

[mod_cgi] improve CGI offloading

improve CGI offloading when not streaming request body

If not streaming request body, collect request body into single tempfile
and use fd to tempfile as stdin to CGI (in lieu of input pipe()).
For prior behavior, set the following config option, enabled by default:
server.feature-flags += ("cgi.tempfile-accum" => "disable")

If there is no request body, open /dev/null instead of creating pipe().

show more ...


# 7e000de0 01-Aug-2021 Glenn Strauss <[email protected]>

[mod_cgi] use linked list for process list

(avoids persistent memory allocation for list struct)
(reduce possibility of long-term memory fragmentation due to mod_cgi)


12345678910