]> granicus.if.org Git - apache/commitdiff
two performance improvements:
authorDoug MacEachern <dougm@apache.org>
Thu, 22 Nov 2001 01:43:33 +0000 (01:43 +0000)
committerDoug MacEachern <dougm@apache.org>
Thu, 22 Nov 2001 01:43:33 +0000 (01:43 +0000)
- 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

index 6b3b0f27c1a22502f2b00506d6a10a08520f1cdd..de54ed658fa547ef8fe1fac763255fa4391718ba 100644 (file)
@@ -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 {