You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by do...@apache.org on 2001/11/22 02:43:33 UTC
cvs commit: httpd-2.0/modules/metadata mod_setenvif.c
dougm 01/11/21 17:43:33
Modified: modules/metadata mod_setenvif.c
Log:
two performance improvements:
- switch from using r->notes to r->request_config
- avoid a strcmp() when checking if val eq '!'
Revision Changes Path
1.32 +4 -3 httpd-2.0/modules/metadata/mod_setenvif.c
Index: mod_setenvif.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_setenvif.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- mod_setenvif.c 2001/11/11 22:31:04 1.31
+++ mod_setenvif.c 2001/11/22 01:43:33 1.32
@@ -411,8 +411,9 @@
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 @@
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 {