Received: (qmail 10197 invoked by uid 2012); 28 Feb 1998 03:42:04 -0000 Message-Id: <19980228034204.10196.qmail@hyperreal.org> Date: 28 Feb 1998 03:42:04 -0000 From: Jay Soffian Reply-To: jay@cimedia.com To: apbugs@hyperreal.org Subject: Apache adds SetEnv TZ to parent environment TZ instead of replacing X-Send-Pr-Version: 3.2 >Number: 1888 >Category: mod_env >Synopsis: Apache adds SetEnv TZ to parent environment TZ instead of replacing >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Class: change-request >Submitter-Id: apache >Arrival-Date: Fri Feb 27 19:50:01 PST 1998 >Last-Modified: Mon Mar 9 22:31:06 PST 1998 >Originator: jay@cimedia.com >Organization: >Release: 1.3_b5 >Environment: Linux redshift.cimedia.com 2.0.32 #19 Fri Jan 9 21:46:10 EST 1998 i686 unknown >Description: We have virtual hosts that serve content to audiences in specific areas of the U.S. We'd like the ability to set TZ appropriately for each VirtualHost. However, apache adds the TZ environment variable w/o checked to see if it has already been set via mod_env. I propose the following patch to util_script.c: *** util_script.c.orig Fri Feb 27 22:31:50 1998 --- util_script.c Fri Feb 27 22:32:44 1998 *************** *** 151,159 **** char *whack; j = 0; ! tz = getenv("TZ"); ! if (tz != NULL) ! env[j++] = pstrcat(p, "TZ=", tz, NULL); for (i = 0; i < env_arr->nelts; ++i) { if (!elts[i].key) continue; --- 151,161 ---- char *whack; j = 0; ! if (!table_get(t, "TZ")) { ! tz = getenv("TZ"); ! if (tz != NULL) ! env[j++] = pstrcat(p, "TZ=", tz, NULL); ! } for (i = 0; i < env_arr->nelts; ++i) { if (!elts[i].key) continue; This would allow us to override the TZ environment variable in the child environment. >How-To-Repeat: >Fix: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: dgaudet State-Changed-When: Mon Mar 9 22:31:05 PST 1998 State-Changed-Why: Thanks. Patch applied to 1.3b6-dev. Dean >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]