You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by "David N. Welton" <da...@dedasys.com> on 2002/01/18 20:53:29 UTC
USER array
I noticed something that's kind of a pain in the neck in rivetCore:
if (authorization
&& !strcasecmp(ap_getword_nc(POOL, &authorization, ' '), "Basic"))
{
char *tmp;
char *user;
char *pass;
tmp = ap_pbase64decode(POOL, authorization);
user = ap_getword_nulls_nc(POOL, &tmp, ':');
pass = tmp;
Tcl_ObjSetVar2(interp, Tcl_NewStringObj("::request::USER", -1),
Tcl_NewStringObj("user", -1),
STRING_TO_UTF_TO_OBJ(user, POOL),
0);
Tcl_ObjSetVar2(interp, Tcl_NewStringObj("::request::USER", -1),
Tcl_NewStringObj("pass", -1),
STRING_TO_UTF_TO_OBJ(pass, POOL),
0);
}
Maybe we should make this its own function. As it stands right now,
it doesn't fit in well with its surroundings, in that if you do
load_env .... this variable won't get loaded in with the others.
Speaking of which, do you know much about the
NULL, /* check auth */
field of the module structure? What does one do with that?
--
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/
Re: USER array
Posted by "David N. Welton" <da...@dedasys.com>.
Damon Courtney <da...@your.unreality.com> writes:
> I'm gonna' do some stuff with the check auth field.
Ok... I was looking at it from the point of view of this API layer,
and it kind of sticks out because it doesn't fit in with the rest of
the env variables in that it creates its own array.
> The user information should load into the env array though. We
> shouldn't have a separate command for loading that info. It's just
> like the log files. If the user is present, it's logged. If it's
> not, it's not. The load_env command should load it if it's there
> and not if it isn't.
Ok, then we need to roll back the changes I made to rivetCore.c. The
documentation page I will handle - I'll just erase that command.
--
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/
Re: USER array
Posted by Damon Courtney <da...@your.unreality.com>.
> I noticed something that's kind of a pain in the neck in rivetCore:
>
> if (authorization
> && !strcasecmp(ap_getword_nc(POOL, &authorization, ' '), "Basic"))
> {
> char *tmp;
> char *user;
> char *pass;
>
> tmp = ap_pbase64decode(POOL, authorization);
> user = ap_getword_nulls_nc(POOL, &tmp, ':');
> pass = tmp;
> Tcl_ObjSetVar2(interp, Tcl_NewStringObj("::request::USER", -1),
> Tcl_NewStringObj("user", -1),
> STRING_TO_UTF_TO_OBJ(user, POOL),
> 0);
> Tcl_ObjSetVar2(interp, Tcl_NewStringObj("::request::USER", -1),
> Tcl_NewStringObj("pass", -1),
> STRING_TO_UTF_TO_OBJ(pass, POOL),
> 0);
> }
>
> Maybe we should make this its own function. As it stands right now,
> it doesn't fit in well with its surroundings, in that if you do
> load_env .... this variable won't get loaded in with the others.
>
> Speaking of which, do you know much about the
>
> NULL, /* check auth */
>
> field of the module structure? What does one do with that?
I'm gonna' do some stuff with the check auth field. The user
information should load into the env array though. We shouldn't have
a separate command for loading that info. It's just like the log
files. If the user is present, it's logged. If it's not, it's not.
The load_env command should load it if it's there and not if it isn't.
D