Return-Path: Mailing-List: contact websh-dev-help@tcl.apache.org; run by ezmlm Delivered-To: mailing list websh-dev@tcl.apache.org Received: (qmail 93025 invoked from network); 12 Dec 2001 15:38:47 -0000 Received: from ppp-77-10.25-151.libero.it (HELO ashland) (151.25.10.77) by daedalus.apache.org with SMTP; 12 Dec 2001 15:38:47 -0000 Received: by ashland (Postfix, from userid 1000) id 9E4224C9CD; Wed, 12 Dec 2001 16:39:52 +0100 (CET) To: ronnie.brunner@netcetera.ch, websh-dev@tcl.apache.org Subject: Re: env variables not present in mod_websh (specifically, HTTPS) References: <20011212151017.4108.qmail@nagoya.betaversion.org> From: davidw@dedasys.com (David N. Welton) Date: 12 Dec 2001 16:39:52 +0100 Message-ID: <87d71ko3av.fsf@dedasys.com> Lines: 61 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bugzilla@apache.org writes: > ------- Additional Comments From ronnie.brunner@netcetera.ch 2001-12-12 07:10 ------- > Concerning the question: "What's to prevent us from just filling the > 'env' array?" I'd say: this sounds cool at first glance but this is > something you have to reset every request. However we decided, that > global stuff should be and stay global, because developers might use > it on purpose. > The accessor abstraction we are using would imply that a design > pattern would be: never access the envirnoment directly anyway. Yes, Simon already explained to me why this is mistaken. My latest path of exploration, then, to resolve this problem revolves around the idea explained in my addendum: How about this: by default, urlData->scheme is not filled in, leaving it as a config option, which does fill it in. I.e, if it's not set, it's NULL by default. At 'runtime' (when cmdurl is run), it then either fills it in with 1) the config option (takes precedence) 2) https, if that's found amongst the environmental variables, or 3) the default. This causes a test case to fail, because the default is not returned when you check to see what the scheme is. web::cmdurlcfg -set k v web::cmdurlcfg -scheme gugus set res [web::cmdurlcfg -names] lappend res [web::cmdurlcfg -scheme] web::cmdurlcfg -reset web::cmdurlcfg -unset lappend res [web::cmdurlcfg -names] lappend res [web::cmdurlcfg -scheme] ---- Result was: k gugus {} {} ---- Result should have been: k gugus {} http The other thing to do, I suppose, would be to have another switch, something like web::cmdurlcfg -schemeswitching on/off which turns on the automatic switching and/or the behavior above on/off, but at this point, things start to get complex... -- David N. Welton Consulting: http://www.dedasys.com/ Free Software: http://people.debian.org/~davidw/ Apache Tcl: http://tcl.apache.org/ Personal: http://www.efn.org/~davidw/