tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@dedasys.com (David N. Welton)
Subject Re: env variables not present in mod_websh (specifically, HTTPS)
Date Wed, 12 Dec 2001 15:39:52 GMT
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/

Mime
View raw message