History log of /lighttpd1.4/src/http_header.c (Results 1 – 25 of 44)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: lighttpd-1.4.69
# e5f9e94d 07-Jan-2023 Glenn Strauss <[email protected]>

[multiple] codespell: correct spelling in comments


Revision tags: lighttpd-1.4.68, lighttpd-1.4.67, lighttpd-1.4.66, lighttpd-1.4.65
# 5a32a6dc 05-Jun-2022 Glenn Strauss <[email protected]>

[core] update cached tables with Priority header

(thx jens-maus)


# bd67d9f4 09-Mar-2022 Glenn Strauss <[email protected]>

[core] permit env w/ blank value (fix regression)

(thx Lars Bingchong)

empty env var must be set to blank string and not left unset
(regression in lighttpd 1.4.56 - lighttpd 1.4.64)

x-ref:
https

[core] permit env w/ blank value (fix regression)

(thx Lars Bingchong)

empty env var must be set to blank string and not left unset
(regression in lighttpd 1.4.56 - lighttpd 1.4.64)

x-ref:
https://stackoverflow.com/a/52913064/1338888

show more ...


Revision tags: lighttpd-1.4.64, lighttpd-1.4.63, lighttpd-1.4.62, lighttpd-1.4.61, lighttpd-1.4.60
# 67c0b149 02-Aug-2021 Glenn Strauss <[email protected]>

[multiple] remove base.h include where not used

(substitute request.h if file only accesses request_st,
and not connection or server structs)


# af3df29a 09-Jun-2021 Glenn Strauss <[email protected]>

[multiple] reduce redundant NULL buffer checks

This commit is a large set of code changes and results in removal of
hundreds, perhaps thousands, of CPU instructions, a portion of which
are on hot co

[multiple] reduce redundant NULL buffer checks

This commit is a large set of code changes and results in removal of
hundreds, perhaps thousands, of CPU instructions, a portion of which
are on hot code paths.

Most (buffer *) used by lighttpd are not NULL, especially since buffers
were inlined into numerous larger structs such as request_st and chunk.

In the small number of instances where that is not the case, a NULL
check is often performed earlier in a function where that buffer is
later used with a buffer_* func. In the handful of cases that remained,
a NULL check was added, e.g. with r->http_host and r->conf.server_tag.

- check for empty strings at config time and set value to NULL if blank
string will be ignored at runtime; at runtime, simple pointer check
for NULL can be used to check for a value that has been set and is not
blank ("")
- use buffer_is_blank() instead of buffer_string_is_empty(),
and use buffer_is_unset() instead of buffer_is_empty(),
where buffer is known not to be NULL so that NULL check can be skipped
- use buffer_clen() instead of buffer_string_length() when buffer is
known not to be NULL (to avoid NULL check at runtime)
- use buffer_truncate() instead of buffer_string_set_length() to
truncate string, and use buffer_extend() to extend

Examples where buffer known not to be NULL:
- cpv->v.b from config_plugin_values_init is not NULL if T_CONFIG_BOOL
(though we might set it to NULL if buffer_is_blank(cpv->v.b))
- address of buffer is arg (&foo)
(compiler optimizer detects this in most, but not all, cases)
- buffer is checked for NULL earlier in func
- buffer is accessed in same scope without a NULL check (e.g. b->ptr)

internal behavior change:
callers must not pass a NULL buffer to some funcs.
- buffer_init_buffer() requires non-null args
- buffer_copy_buffer() requires non-null args
- buffer_append_string_buffer() requires non-null args
- buffer_string_space() requires non-null arg

show more ...


# f8bd028d 25-May-2021 Glenn Strauss <[email protected]>

[core] http_header_hkey_get() perf (better asm)


# dc01487e 25-Mar-2021 Glenn Strauss <[email protected]>

[multiple] use buffer_append_* aggregates

reduces the number of round-trips into some frequently-called routines


# 26f354cb 21-Mar-2021 Glenn Strauss <[email protected]>

[multiple] http_header APIs to reduce str copies


Revision tags: lighttpd-1.4.59, lighttpd-1.4.58, lighttpd-1.4.57, lighttpd-1.4.56, lighttpd-1.4.56-rc7, lighttpd-1.4.56-rc6, lighttpd-1.4.56-rc5, lighttpd-1.4.56-rc4, lighttpd-1.4.56-rc3, lighttpd-1.4.56-rc2, lighttpd-1.4.56-rc1
# 3fbb5773 13-Sep-2020 Glenn Strauss <[email protected]>

[core] http_header_e <=> lshpack_static_hdr_idx

map enum http_header_e to enum lshpack_static_hdr_idx
map enum lshpack_static_hdr_idx to enum http_header_e


# 367f30a6 13-Sep-2020 Glenn Strauss <[email protected]>

[multiple] extend enum http_header_e list


# 2e0676fd 11-Sep-2020 Glenn Strauss <[email protected]>

[core] extend (data_string *) to store header id

(optional addition to (data_string *), used by http_header.[ch])

extend (data_string *) instead of creating another data_* TYPE_*
(new data type w

[core] extend (data_string *) to store header id

(optional addition to (data_string *), used by http_header.[ch])

extend (data_string *) instead of creating another data_* TYPE_*
(new data type would probably have (data_string *) as base class)
(might revisit choice in the future)

HTTP_HEADER_UNSPECIFIED has been removed. It was used in select
locations as an optimization to avoid looking up enum header_header_e
before checking the array, but the ordering in the array now relies
on having the id. Having the id allows for a quick check if a common
header is present or not in the htags bitmask, before checking the
array, and allows for integer comparison in the log(n) search of the
array, instead of strncasecmp().

With HTTP_HEADER_UNSPECIFIED removed, add optimization to set bit
in htags for HTTP_HEADER_OTHER when an "other" header is added,
but do not clear the bit, as there might be addtl "other" headers

show more ...


# 92e5a021 11-Sep-2020 Glenn Strauss <[email protected]>

[core] http_header_hkey_get_lc() for HTTP/2

header field-names are required to be lowercase for HTTP/2
so specialize http_header_hkey_get() as http_header_hkey_get_lc()
for simpler comparison

lower

[core] http_header_hkey_get_lc() for HTTP/2

header field-names are required to be lowercase for HTTP/2
so specialize http_header_hkey_get() as http_header_hkey_get_lc()
for simpler comparison

lowercase field-names in http_headers[], as it does not matter for
buffer_eq_icase_ssn(), which is used with http_headers[] for HTTP/1.x

show more ...


# 9c8981a7 11-Sep-2020 Glenn Strauss <[email protected]>

[core] tst,set,clr macros for r->{rqst,resp}_htags


# c58b95f2 10-Sep-2020 Glenn Strauss <[email protected]>

[core] light_isupper(), light_islower()

more efficient char checks
(replace one comparision and one branch with one subtraction)


# 05ff9c57 07-Sep-2020 Glenn Strauss <[email protected]>

[core] combine Cookie request headers with ';'

(thx avij)

clients should send a single Cookie header with multiple cookie values
separated with ';'.
https://tools.ietf.org/html/rfc6265#section-4.

[core] combine Cookie request headers with ';'

(thx avij)

clients should send a single Cookie header with multiple cookie values
separated with ';'.
https://tools.ietf.org/html/rfc6265#section-4.2.1

However, HTTP/2 loosens this requirement for Cookie.
https://tools.ietf.org/html/rfc7540#section-8.1.2
Section 8.1.2.5 Compressing the Cookie Header Field
and some HTTP/2 clients (Chrome, Firefox) send multiple
'cookie:' headers in a HEADERS frame.

show more ...


# 5547530a 03-Sep-2020 Glenn Strauss <[email protected]>

[core] do not require '\0' term for k,v hdr parse

no longer require '\0' terminated z-string for key,value header parsing
http_request_parse_single_header()
http_header_str_contains_token()


# ada09a23 25-Aug-2020 Glenn Strauss <[email protected]>

[core] h2_send_headers() specialized for resp hdrs

specialized version of http_response_write_header(); send headers
directly to HPACK encoder, rather than double-buffering in chunkqueue


# db7b51a4 09-Aug-2020 Glenn Strauss <[email protected]>

[core] http_header_parse_hoff()

moved and renamed from connections.c:connection_read_header_hoff()


# 517e3278 30-Jul-2020 Glenn Strauss <[email protected]>

[core] HTTP2-Settings


# 77057a7c 26-Jul-2020 Glenn Strauss <[email protected]>

[core] lowercase response hdr field names for h2


# 4a196095 02-Aug-2020 Glenn Strauss <[email protected]>

[core] add some missing standard includes


# 0fb391c0 30-Jul-2020 Glenn Strauss <[email protected]>

[core] http_header_remove_token()


# c18f442a 20-May-2020 Glenn Strauss <[email protected]>

[multiple] add summaries to top of some modules


# 10dbe38a 19-May-2020 Glenn Strauss <[email protected]>

[core] stricter parse of numerical digits

stricter parse of numerical digits for http status code, port num,
and a few other places. (stricter parse than that of strtol())

content ranges are still

[core] stricter parse of numerical digits

stricter parse of numerical digits for http status code, port num,
and a few other places. (stricter parse than that of strtol())

content ranges are still parsed more loosely at points of use

show more ...


Revision tags: lighttpd-1.4.55
# b04f0311 22-Jan-2020 Glenn Strauss <[email protected]>

[core] perf: tighten some code in some hot paths


12