Glenn Strauss
1dd58c5ad8
[multiple] con->proto_default_port
2 years ago
Glenn Strauss
0ff60d8218
[multiple] rename r to rc rv rd wr to be different
...
variable rename
2 years ago
Glenn Strauss
68d8d4c532
[multiple] stat_cache singleton
2 years ago
Glenn Strauss
b5775b9951
[multiple] reduce direct use of srv->errh
2 years ago
Glenn Strauss
c8cd7cf49b
[multiple] extern log_epoch_secs
...
replace srv->cur_ts
2 years ago
Glenn Strauss
409bba80b1
[multiple] reduce direct use of srv->cur_ts
2 years ago
Glenn Strauss
de73b190a4
[core] read up-to fixed size chunk before fionread
2 years ago
Glenn Strauss
50bdb55de8
[multiple] connection hooks no longer get (srv *)
...
(explicit (server *) not passed; available in con->srv)
2 years ago
Glenn Strauss
010c28949c
[multiple] prefer (connection *) to (srv *)
...
convert all log_error_write() to log_error() and pass (log_error_st *)
use con->errh in preference to srv->errh (even though currently same)
avoid passing (server *) when previously used only for logging (errh)
2 years ago
Glenn Strauss
644725127f
[core] connection_handle_errdoc() separate func
2 years ago
Glenn Strauss
c193da3404
[core] split cond cache from cond matches
2 years ago
Glenn Strauss
5977ce2b4a
[core] isolate use of data_config, configfile.h
2 years ago
Glenn Strauss
ed62e354ff
[core] use config_plugin_values_init()
2 years ago
Glenn Strauss
20450fd652
[core] mv config_setup_connection to connections.c
...
rename config_setup_connection() to connection_reset_config()
2 years ago
Glenn Strauss
b2b41e36e3
[core] struct plugin_data_base
2 years ago
Glenn Strauss
c022269547
[core] srv->plugin_slots as compact list
2 years ago
Glenn Strauss
e2de4e581e
[core] const char *name in struct plugin
...
put void *data (always used) as first member of struct plugin
add int nconfig member to PLUGIN_DATA
calloc() inits p->data to NULL
2 years ago
Glenn Strauss
feb21b3da2
[core] inline header and env arrays into con
2 years ago
Glenn Strauss
6eb34ef5ab
[core] add const to callers of http_header_*_get()
...
(The few places where value is modified in-place were not made const)
2 years ago
Glenn Strauss
a7a721ab43
[core] treat con->conditional_is_valid as bitfield
2 years ago
Glenn Strauss
e01f995ce3
[core] run config_setup_connection() fewer times
...
config_setup_connection() is run when con struct is init'd and in
connection_reset(), after each request is processed. It also must be
called upon HANDLER_COMEBACK when the request needs to be re-parsed,
but it need not be run twice in common scenario without HANDLER_COMEBACK
2 years ago
Glenn Strauss
0ce30f8c22
[core] (const buffer *) for con->server_name
...
use con->server_name_buf when modules set server_name (e.g from db)
2 years ago
Glenn Strauss
db5ff222e4
[core] short-circuit path to clear request.headers
...
short-circuit path to clear con->request.headers if entire size of
all request headers is <= BUFFER_MAX_REUSE_SIZE
clear (reset) data_string key and value upon reuse
2 years ago
Glenn Strauss
10d71279ae
[core] uint32_t for struct buffer sizes
2 years ago
Glenn Strauss
62e97967ca
[core] prefer uint32_t to size_t in base.h
...
even 2 billion is way larger than even extreme operating values
expected for the members in base.h
include some structs directly in struct server, rather than by ptr
2 years ago
Glenn Strauss
36f3206a4c
[core] pass ptr to http_request_parse()
2 years ago
Glenn Strauss
8223903e50
[core] inline connection_read_header()
...
inline connection_read_header() into connection_handle_read_state()
(The large stack usage prevents the compiler from inlining the routine,
but if we enter connection_handle_read_state(), then we are going to
be running connection_read_header(), so put them together)
2 years ago
Glenn Strauss
11f3dd896b
[core] perf: connection_read_header_hoff() hot
2 years ago
Glenn Strauss
ec2ff2c6ae
[core] perf: connection_read_header_more()
...
additional header parsing optimization
collect request headers into single buffer for parsing
2 years ago
Glenn Strauss
46d7e9c2ed
[core] no need to pass srv to connection_set_state
2 years ago
Glenn Strauss
63e32e8100
[core] perf: HTTP header parsing using \n offsets
2 years ago
Glenn Strauss
fcd1f57511
[core] connection_chunkqueue_compact()
2 years ago
Glenn Strauss
c22ec74770
[core] do not pass srv to http header parsing func
...
srv is retrieved from con->srv in the few cases where needed
2 years ago
Glenn Strauss
80d12919d1
[core] replace connection_set_state w/ assignment
...
replace connection_set_state() with simple assignment
(only connections.c and connections-glue.c should change con state)
2 years ago
Glenn Strauss
be6964f415
[core] use func rc to indicate done reading header
2 years ago
Glenn Strauss
1334436394
[core] store struct server * in struct connection
2 years ago
Glenn Strauss
670b2086f8
[core] move con state handling to connections*.c
...
move maint code from server.c to connections.c
3 years ago
Glenn Strauss
6572976e06
[core] chunkqueue perf: code reuse
...
code reuse, simplification, and inlining
remove excess calls to chunkqueue_remove_finished_chunks()
(it may still be possible for there to be an empty chunk in chunkqueue
if nothing were written to a temporary file (need to verify this), so
preserve some calls to chunkqueue_remove_finished_chunks() for now)
3 years ago
Glenn Strauss
003fd0f8c3
[core] store log_state_handling flag on stack
3 years ago
Glenn Strauss
cbad7517c8
[core] struct log_error_st for error logging
3 years ago
Glenn Strauss
5440f04e8a
[core] fix assertion with server.error-handler ( fixes #2941 )
...
(thx andpr)
x-ref:
"failed assertion on incoming bad request when server.error-handler option is used"
https://redmine.lighttpd.net/issues/2941
3 years ago
Glenn Strauss
9113011d5b
[core] pass (fdnode *) for registered fdevent fd
...
inline fdevent_fdnode_interest()
avoid array lookup for (fdnode *) for various ops
3 years ago
Glenn Strauss
4e6e787a0d
[core] remove redundant check for allow_http11
...
(conf.allow_http11 is handled in http_response_prepare())
3 years ago
Glenn Strauss
800e9b7349
[core] remove fde_ndx member outside fdevents
...
(isolated to fdevent framework internals)
3 years ago
Glenn Strauss
1542e44bb7
[core] use openssl to read,discard request body
...
use openssl to read,discard request body after response has been sent
on a TLS connection, at least until SSL close notify has been sent
x-ref:
"HTTPS POST upload hangs when i reach maximum supported request size"
https://redmine.lighttpd.net/boards/2/topics/8491
3 years ago
Glenn Strauss
fca9e5a0b1
[core] prefer memchr() over strchr()
3 years ago
Glenn Strauss
b1a9f335c6
[core] connection_handle_write() updates con state
...
(return value was always 0, so remove checks for other values)
3 years ago
Glenn Strauss
4713b6a61c
[core] con->is_ssl_sock
...
flag to indicate if socket protocol is TLS
(future use: will be needed with connection upgrade to https; not impl)
3 years ago
Glenn Strauss
74b18c385c
[core] no keep-alive if POLLRDHUP,empty read queue
...
send Connection: close if POLLRDHUP received and read queue is empty
3 years ago
Glenn Strauss
daa5f7c576
[mod_accesslog] attempt to reconstruct req line
...
cease http_request_parse_reqline() unconditionally copying request line,
as request line is currently used only by mod_accesslog 'r' format
3 years ago