From a2965c7c7730c2549670e2d3b0ef4c807274f53e Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 22 Nov 2001 01:43:33 +0000 Subject: [PATCH] two performance improvements: - switch from using r->notes to r->request_config - avoid a strcmp() when checking if val eq '!' PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92120 13f79535-47bb-0310-9956-ffa450edef68 --- modules/metadata/mod_setenvif.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c index 6b3b0f27c1..de54ed658f 100644 --- a/modules/metadata/mod_setenvif.c +++ b/modules/metadata/mod_setenvif.c @@ -411,8 +411,9 @@ static int match_headers(request_rec *r) int i, j; char *last_name; - if (apr_table_get(r->notes, SEI_MAGIC_HEIRLOOM) == NULL) { - apr_table_set(r->notes, SEI_MAGIC_HEIRLOOM, "post-read done"); + if (!ap_get_module_config(r->request_config, &setenvif_module)) { + ap_set_module_config(r->request_config, &setenvif_module, + SEI_MAGIC_HEIRLOOM); sconf = (sei_cfg_rec *) ap_get_module_config(r->server->module_config, &setenvif_module); } @@ -493,7 +494,7 @@ static int match_headers(request_rec *r) elts = (const apr_table_entry_t *) arr->elts; for (j = 0; j < arr->nelts; ++j) { - if (!strcmp(elts[j].val, "!")) { + if (*(elts[j].val) == '!') { apr_table_unset(r->subprocess_env, elts[j].key); } else { -- 2.40.0