Re: RequestInfo.AuthUsername problem

Giganews Newsgroups
Subject: Re: RequestInfo.AuthUsername problem
Posted by:  Remy Lebeau (Indy Team) (
Date: Mon, 9 Oct 2006

"Jeremy Coulter" <v…> wrote in message

> the problem I have is, from that point on, every time I evaluate the
> value of "RequestInfo.AuthUsername" its ALWAYS "Indy" and I
> cant see how to reset it.

Every request allocates a brand new TIdHTTPRequestInfo object before
triggering the OnCommandGet event handler.  The only way the AuthUsername
and AuthPassword properties can be the same value from one event to the next
is if the client/browser is actually re-sending the same authentication
values on each request.

On the othe hand, if you are evaluating the AuthUsername/Password values
within the same event, then of course they are going to be the same values.
Indy does not clear the properties after they have been read from the first

> This is a real pain, since I am going to want to reset this.

Reset when exactly?  What EXACTLY are you actually having a problem with?

> This happens even if I restart the demo too, like its a cookie

There is no cookie involved with authentication.  The AuthUsername/Password
properties are filled in from each request's "Authorization" header value,
and nowhere else.



In response to

RequestInfo.AuthUsername problem posted by Jeremy Coulter on Sat, 7 Oct 2006