From 69d17e04cd3c38235f2421b4dbfc42c734657587 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Mon, 21 Jan 2019 17:54:25 -0500 Subject: [PATCH] [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. --- src/mod_expire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }