* perform all the expansions on the environment variables */
| 2692 | * perform all the expansions on the environment variables |
| 2693 | */ |
| 2694 | static void do_expand_env(data_item *env, rewrite_ctx *ctx) |
| 2695 | { |
| 2696 | char *name, *val; |
| 2697 | |
| 2698 | while (env) { |
| 2699 | name = do_expand(env->data, ctx, NULL, NULL); |
| 2700 | if (*name == '!') { |
| 2701 | name++; |
| 2702 | apr_table_unset(ctx->r->subprocess_env, name); |
| 2703 | rewritelog(ctx->r, 5, NULL, "unsetting env variable '%s'", name); |
| 2704 | } |
| 2705 | else { |
| 2706 | if ((val = ap_strchr(name, ':')) != NULL) { |
| 2707 | *val++ = '\0'; |
| 2708 | } else { |
| 2709 | val = ""; |
| 2710 | } |
| 2711 | |
| 2712 | apr_table_set(ctx->r->subprocess_env, name, val); |
| 2713 | rewritelog(ctx->r, 5, NULL, "setting env variable '%s' to '%s'", |
| 2714 | name, val); |
| 2715 | } |
| 2716 | |
| 2717 | env = env->next; |
| 2718 | } |
| 2719 | |
| 2720 | return; |
| 2721 | } |
| 2722 | |
| 2723 | /* |
| 2724 | * perform all the expansions on the cookies |
no test coverage detected