first hunk switches from using r->notes to r->request_config, which is
much faster. and important considering that code runs at least twice for
every request if mod_setenvif is loaded.
second gets rids of a strcmp. if there is a '!' in val, it will never be
more than that.
Index: modules/metadata/mod_setenvif.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_setenvif.c,v
retrieving revision 1.31
diff -u -r1.31 mod_setenvif.c
--- modules/metadata/mod_setenvif.c 2001/11/11 22:31:04 1.31
+++ modules/metadata/mod_setenvif.c 2001/11/21 19:40:45
@@ -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 {