summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-01-21 17:54:25 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2019-01-21 17:54:25 -0500
commit69d17e04cd3c38235f2421b4dbfc42c734657587 (patch)
treed7902008cc454b07d13667271022169e7b700aeb
parent4608ddec2f94daa84d69fc1b311a8b3aae16ec5c (diff)
downloadlighttpd-git-69d17e04cd3c38235f2421b4dbfc42c734657587.tar.gz
[mod_expire] look up expire fallback "" explicitly
equivalent to prior code, but more direct (legibile in code) to look up empty string than to walk array. Might be marginally faster to walk array when the list is short, but the lookup is also fairly quick in that case, too.
-rw-r--r--src/mod_expire.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_expire.c b/src/mod_expire.c
index 221bb537..d0f771bf 100644
--- a/src/mod_expire.c
+++ b/src/mod_expire.c
@@ -352,7 +352,7 @@ CONNECTION_FUNC(mod_expire_handler) {
vb = http_header_response_get(con, HTTP_HEADER_CONTENT_TYPE, CONST_STR_LEN("Content-Type"));
ds = (NULL != vb)
? (data_string *)array_match_key_prefix(p->conf.expire_mimetypes, vb)
- : (data_string *)array_match_key_prefix_klen(p->conf.expire_mimetypes, CONST_STR_LEN(""));
+ : (data_string *)array_get_element_klen(p->conf.expire_mimetypes, CONST_STR_LEN(""));
if (NULL == ds) return HANDLER_GO_ON;
vb = ds->value;
}