You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_dtcl@tcl.apache.org by "Karl J. Stubsjoen" <ka...@kstub.com> on 2001/03/14 16:55:54 UTC

Clear Cookies

Hello,

When clearing cookies, does that have to happen before setting cookies?  Lets say the script sets a cookie and then later on (but before any hputs) the script says "hey we shouldn't have set this cookie", can it be cleared?

Thanks!
Karl

Re: Clear Cookies

Posted by "David N. Welton" <da...@apache.org>.
"Karl J. Stubsjoen" <ka...@kstub.com> writes:

> I just found my "access.conf" file and in there I can see where the
> authentication is being set.  I'm wondering, if the UserName and
> Password of the Auth_Pgwd_field(s) can then be queried by script as
> ENV variables?
 
Try running the 'examples.ttml' script, or take the code from it,
which shows you how to loop through all the ENV vars and print them
out:-)

> I'm still not sure about these cookies.  Are they stored locally on
> my machine when I login to the site - because they don't appear to
> have been saved locally.

Oddly enough, I get the same thing.  They *are* however being set.
You might try adding the expiration date '-expires' or '-domain' and
see if that helps.

-- 
David N. Welton
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/
         Work: http://www.innominate.com/

Re: Clear Cookies

Posted by "Karl J. Stubsjoen" <ka...@kstub.com>.
I just found my "access.conf" file and in there I can see where the
authentication is being set.  I'm wondering, if the UserName and Password of
the Auth_Pgwd_field(s) can then be queried by script as ENV variables?

I'm still not sure about these cookies.  Are they stored locally on my
machine when I login to the site - because they don't appear to have been
saved locally.

Thanks a bunch guys!

Karl


----- Original Message -----
From: "Johnny Mnemonic" <jo...@themnemonic.org>
To: "Mod-Tcl mailing list" <mo...@tcl.apache.org>
Sent: Thursday, March 15, 2001 8:17 AM
Subject: Re: Clear Cookies


At 21.57 14/03/2001 +0100, you wrote:
> > 2) the page which I am trying to alter is requesting a user name and
> > password, its not of the web type (like on a web page) but an actual
> > authentication box pops up when you enter the page.  What invokes
> > this?
>
>You mean in mod_dtcl?  It's an access thing, like using an .htaccess
>file. Hmm, I don't have any code handy at the moment, does someone
>else?

If you want your page not to load at all, and before this, your browser to
prompt you for a username or password, that's the .htaccess file (or apache
conf file) looking like this:

AuthUserFile /home/username/public_html/members/.htpasswd
AuthName "members zone"
AuthType Basic
require valid-user

you need also a .htpasswd file, which is created using the htpasswd command.
See the Apache docs for more informations


____________________________________
Johnny Mnemonic©

E-Mail Address:
- johnny@themnemonic.org


---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-help@tcl.apache.org




Re: Clear Cookies

Posted by Johnny Mnemonic <jo...@themnemonic.org>.
At 21.57 14/03/2001 +0100, you wrote:
> > 2) the page which I am trying to alter is requesting a user name and
> > password, its not of the web type (like on a web page) but an actual
> > authentication box pops up when you enter the page.  What invokes
> > this?
>
>You mean in mod_dtcl?  It's an access thing, like using an .htaccess
>file. Hmm, I don't have any code handy at the moment, does someone
>else?

If you want your page not to load at all, and before this, your browser to 
prompt you for a username or password, that's the .htaccess file (or apache 
conf file) looking like this:

AuthUserFile /home/username/public_html/members/.htpasswd
AuthName "members zone"
AuthType Basic
require valid-user

you need also a .htpasswd file, which is created using the htpasswd command.
See the Apache docs for more informations


____________________________________
Johnny Mnemonic©

E-Mail Address:
- johnny@themnemonic.org


Re: Clear Cookies

Posted by "David N. Welton" <da...@apache.org>.
"Karl J. Stubsjoen" <ka...@kstub.com> writes:

> I am a newbie to TCL so... it makes sense but I do not know how to
> implement what you have suggested.  Let me ask 2 other things:

Well, basically, you set a variable for the headers, and if you need
them, then you set them.  If not, then you don't:-)

> 1) where are local cookies stored, because I am not seeing them on
> my machine in the typical "cookies" folder

Try setting an expiration date and a hostname...
 
> 2) the page which I am trying to alter is requesting a user name and
> password, its not of the web type (like on a web page) but an actual
> authentication box pops up when you enter the page.  What invokes
> this?

You mean in mod_dtcl?  It's an access thing, like using an .htaccess
file. Hmm, I don't have any code handy at the moment, does someone
else?

-- 
David N. Welton
     Personal:           http://www.efn.org/~davidw/  
Free Software:           http://people.debian.org/~davidw/
   Apache Tcl:           http://tcl.apache.org

Re: Clear Cookies

Posted by "Karl J. Stubsjoen" <ka...@kstub.com>.
I am a newbie to TCL so... it makes sense but I do not know how to implement
what you have suggested.  Let me ask 2 other things:
1)  where are local cookies stored, because I am not seeing them on my
machine in the typical "cookies" folder

2) the page which I am trying to alter is requesting a user name and
password, its not of the web type (like on a web page) but an actual
authentication box pops up when you enter the page.  What invokes this?

Thank you!

Karl

----- Original Message -----
From: "David N. Welton" <da...@apache.org>
To: "Karl J. Stubsjoen" <ka...@kstub.com>
Cc: "MOD TCL" <mo...@tcl.apache.org>
Sent: Wednesday, March 14, 2001 9:14 AM
Subject: Re: Clear Cookies


"Karl J. Stubsjoen" <ka...@kstub.com> writes:

> When clearing cookies, does that have to happen before setting
> cookies? Lets say the script sets a cookie and then later on (but
> before any hputs) the script says "hey we shouldn't have set this
> cookie", can it be cleared?

At the moment, that's not possible.  But it seems it shouldn't be that
hard to get around...  You could turn off buffering for that page (so
that subsequent HTML blocks don't cause the page to start printing)
and manipulate headers later on.

Does that help?
--
David N. Welton
     Personal:           http://www.efn.org/~davidw/
Free Software:           http://people.debian.org/~davidw/
   Apache Tcl:           http://tcl.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-help@tcl.apache.org




Re: Clear Cookies

Posted by "David N. Welton" <da...@apache.org>.
"Karl J. Stubsjoen" <ka...@kstub.com> writes:

> When clearing cookies, does that have to happen before setting
> cookies?  Lets say the script sets a cookie and then later on (but
> before any hputs) the script says "hey we shouldn't have set this
> cookie", can it be cleared?

At the moment, that's not possible.  But it seems it shouldn't be that
hard to get around...  You could turn off buffering for that page (so
that subsequent HTML blocks don't cause the page to start printing)
and manipulate headers later on.

Does that help?
-- 
David N. Welton
     Personal:           http://www.efn.org/~davidw/  
Free Software:           http://people.debian.org/~davidw/
   Apache Tcl:           http://tcl.apache.org