Browse Source

[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.
personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
69d17e04cd
  1. 2
      src/mod_expire.c

2
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;
}

Loading…
Cancel
Save