Glenn Strauss
476fd9569c
[mod_flv_streaming] use config_plugin_values_init()
2020-05-23 17:59:29 -04:00
Glenn Strauss
32c42074ec
[mod_expire] use config_plugin_values_init()
2020-05-23 17:59:29 -04:00
Glenn Strauss
362ccedc41
[mod_indexfile] use config_plugin_values_init()
2020-05-23 17:59:29 -04:00
Glenn Strauss
d5782eba65
[mod_alias] use config_plugin_values_init()
2020-05-23 17:59:29 -04:00
Glenn Strauss
3fabcc3653
[mod_setenv] use config_plugin_values_init()
2020-05-23 17:59:29 -04:00
Glenn Strauss
a377b159ec
[mod_skeleton] use config_plugin_values_init()
2020-05-23 17:59:29 -04:00
Glenn Strauss
49140fe308
[mod_staticfile] use config_plugin_values_init()
2020-05-23 17:59:29 -04:00
Glenn Strauss
4b9ee09857
[core] use (const char *) in config file parsing
2020-05-23 17:59:29 -04:00
Glenn Strauss
20450fd652
[core] mv config_setup_connection to connections.c
...
rename config_setup_connection() to connection_reset_config()
2020-05-23 17:59:29 -04:00
Glenn Strauss
d7a6a7a263
[core] (const buffer *) from strftime_cache_get()
2020-05-23 17:59:29 -04:00
Glenn Strauss
784a4355d4
[mod_access] use config_plugin_values_init()
2020-05-23 17:59:29 -04:00
Glenn Strauss
b87e8783c4
[core] config_plugin_values_init() new interface
...
new data structures and interface for processing config directives
(towards more efficient approach to config merging)
continue work to isolate data_config
2020-05-23 17:59:29 -04:00
Glenn Strauss
aba290e0bd
[core] improve condition caching perf
2020-05-23 17:59:29 -04:00
Glenn Strauss
b2b41e36e3
[core] struct plugin_data_base
2020-05-23 17:59:29 -04:00
Glenn Strauss
be04c1239f
[core] macros CONST_LEN_STR and CONST_STR_LEN
2020-05-23 17:59:29 -04:00
Glenn Strauss
e06ac39c81
[core] rearrange server_config, server members
...
rearrange server_config, server members to improved affinity
2020-05-23 17:59:29 -04:00
Glenn Strauss
c022269547
[core] srv->plugin_slots as compact list
2020-05-23 17:59:29 -04:00
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
2020-05-23 17:59:29 -04:00
Glenn Strauss
2c43ae73dd
[mod_redirect,mod_rewrite] store context_ndx
...
store config context_ndx instead of data_config *dc
2020-05-23 17:59:29 -04:00
Glenn Strauss
36f64b26a1
[core] simpler config_check_cond()
...
optimize for common case where condition has been evaluated for
the request and a cached result exists
(also: begin isolating data_config)
2020-05-23 17:59:29 -04:00
Glenn Strauss
b6e0880ae6
[mod_accesslog] avoid alloc for parsing cookie val
2020-05-23 17:59:29 -04:00
Glenn Strauss
feb21b3da2
[core] inline header and env arrays into con
2020-05-23 17:59:29 -04:00
Glenn Strauss
e3dc34d142
[core] array a->sorted[] as ptrs rather than pos
...
While slightly more memory use in 64-bit (though same memory use as
prior versions of lighttpd), avoids bouncing through second array
when searching in sorted list. Most use of arrays in lighttpd is to
build a list once, and elements are not removed from the list.
2020-05-23 17:59:29 -04:00
Glenn Strauss
a762402da5
[core] keep a->data[] sorted (REVERT)
...
This reverts commit 2260a8062ee599ecf28d9b52b981603fd2084aff.
original ordering of array elements is significant
e.g. in lighttpd.conf lists where first match to request is applied
2020-02-24 11:15:32 -05:00
Glenn Strauss
78cf61b152
[core] streamline config_check_cond()
...
avoid passing srv; use con->srv when needed
2020-02-24 11:15:32 -05:00
Glenn Strauss
5aadcba456
[core] buffer string in data_config
...
(instead of (buffer *))
2020-02-24 11:15:32 -05:00
Glenn Strauss
a51278030e
[core] const char *op in data_config
...
(instead of (buffer *))
2020-02-24 11:15:32 -05:00
Glenn Strauss
c2238256e2
[core] inline array as part of data_array value
...
(instead of value being (array *))
2020-02-24 11:15:32 -05:00
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)
2020-02-24 11:15:32 -05:00
Glenn Strauss
601c572c39
[core] inline buffer as part of data_string value
...
(instead of value being (buffer *))
2020-02-24 11:15:32 -05:00
Glenn Strauss
b7942c58cc
[core] (data_unset *) from array_get_element_klen
...
return (data_unset *) from array_get_element_klen() to prep for
putting buffer into data_string for value member, rather than as
(buffer *)
(allow in-place modification of these buffer values)
2020-02-24 11:15:32 -05:00
Glenn Strauss
47a758f959
[core] inline buffer key for *_patch_connection()
...
handle buffer key as part of DATA_UNSET in *_patch_connection()
(instead of key being (buffer *))
2020-02-24 11:15:32 -05:00
Glenn Strauss
ad9b7e009b
[core] inline buffer as part of DATA_UNSET key
...
(instead of key being (buffer *))
2020-02-24 11:15:32 -05:00
Glenn Strauss
cff64cf170
[core] http_header_hkey_get() over const array
...
fixed-size power-2 struct keylenvalue
http_headers_off[] of offsets into http_headers[] by string length
2020-02-24 11:15:32 -05:00
Glenn Strauss
a7a721ab43
[core] treat con->conditional_is_valid as bitfield
2020-02-24 11:15:32 -05:00
Glenn Strauss
0c64096555
[core] isolate data_config.c, vector.c
...
isolate data_config.c, vector.c to lighttpd executable, not modules
2020-02-24 11:15:32 -05:00
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
2020-02-24 11:15:32 -05:00
Glenn Strauss
78a6440492
[core] perf: initialize con->conf using memcpy()
...
initialize specific_config (con->conf) from top-level specific_config
using memcpy()
2020-02-24 11:15:32 -05:00
Glenn Strauss
0ce30f8c22
[core] (const buffer *) for con->server_name
...
use con->server_name_buf when modules set server_name (e.g from db)
2020-02-24 11:15:32 -05:00
Glenn Strauss
5d13b40824
[core] (const buffer *) in (struct burl_parts_t)
2020-02-24 11:15:32 -05:00
Glenn Strauss
83535bbef3
[core] differentiate array_get_* for ro and rw
...
array_get_element_klen() is now intended for read-only access
array_get_data_unset() is used by config processing for r/w access
array_get_buf_ptr() is used for r/w access to ds->value (string buffer)
2020-02-24 11:15:32 -05:00
Glenn Strauss
5c0c4936b4
[core] __attribute_returns_nonnull__
2020-02-24 11:15:32 -05:00
Glenn Strauss
c9f1b612f1
[core] keep a->data[] sorted; remove a->sorted[]
2020-02-24 11:15:32 -05:00
Glenn Strauss
61785d868f
[core] array keys are non-empty in key-value list
2020-02-24 11:15:32 -05:00
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
2020-02-24 11:15:32 -05:00
Glenn Strauss
5d9bfc9a76
[core] remove unused members of struct server
2020-02-24 11:15:32 -05:00
Glenn Strauss
10d71279ae
[core] uint32_t for struct buffer sizes
2020-02-24 11:15:32 -05:00
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
2020-02-24 11:15:32 -05:00
Glenn Strauss
ddb78f75ee
[core] remove unused array_reset()
2020-02-24 11:15:32 -05:00
Glenn Strauss
785037dded
[core] http_header.c internal inline funcs
2020-02-24 11:15:32 -05:00