Dossy, that is definitely what is happening. I am setting my cookie in
the same request, and that is why it cannot see it.

Thank you

On 23/04/2008, Dossy Shiobara <[EMAIL PROTECTED]> wrote:
> On 2008.04.23, Xavier Bourguignon <[EMAIL PROTECTED]> wrote:
>  > I haven't bothered including the tcl code, but I have added comments
>  > like this "###" to let you know what each call does.
>
> ...
>
> >       ### This procedure gets the form arguments and if they are not empty, 
> > it checks
>  >       ### the database to see if this user and password combination is 
> correct.
>  >       ### This proc on successful login, sets a cookie with the username as
>  > its value.
>  >       set login [gsa_login::login]
>
> ...
>
> >               ### This proc check a cookie to see if it exists. If it does, 
> > it
>  > gets the value
>  >               ### which is the username
>  >               set user [utils::current_cookie_user "GSAdminLogin"]
>
> ...
>
> > Can you let me know what could be wrong?
>
>
> In order to help you, we need to see the actual code that sets and gets
>  the cookie.  That is almost definitely where your problem is.
>
>  Also, keep in mind that if you try to set and read a cookie in _the same
>  request_, it likely won't work the way you expect.  The way cookies work
>  in the browser is you send a Set-Cookie: in one HTTP response, and in
>  subsequent HTTP requests from the browser, it sends a Cookie: header.
>
>  If you Set-Cookie: at the start of your page then try to read the
>  Cookie: header in the same request ... you won't get it, obviously,
>  since the request didn't include a Cookie: header from the browser--you
>  only set it it in this very request, so how could the browser have sent
>  it to you, right?
>
>  This is where you might want to consider following Set-Cookie: with a
>  redirect, so that the browser makes a new request that would include the
>  Cookie: header.
>
>
>  --
>  Dossy Shiobara              | [EMAIL PROTECTED] | http://dossy.org/
>  Panoptic Computer Network   | http://panoptic.com/
>   "He realized the fastest way to change is to laugh at your own
>     folly -- then you can let go and quickly move on." (p. 70)
>
>
>
>  --
>  AOLserver - http://www.aolserver.com/
>
>  To Remove yourself from this list, simply send an email to <[EMAIL 
> PROTECTED]> with the
>  body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.
>


-- 
Xavier Bourguignon


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to