Problem with indy http basic authentication

Giganews Newsgroups
Subject: Problem with indy http basic authentication
Posted by:  Claudio (claud…@sankhya.com.br)
Date: Wed, 25 Jun 2003

Please, I have problems with indy http basic authentication. If
somebody to help me with an example code I am very grateful.
I altered the source code of the example of the httpclient demo to do
a test with authenticated site,

http://teste:senha@localhost/teste/
IIS 5.0 / Apache
Windows2000 Service Pack 3 / NT 4 spk 6

        HTTP.Request.BasicAuthentication := True;
        HTTP.Request.Username := edUsername.Text;{teste}
        HTTP.Request.Password := edPassword.Text;{error}
......
HTTP. Head(cbURL. Text);

In the first time  with an user and incorrect password,  returns error
message, here it is right.

        HTTP.Request.BasicAuthentication := True;
        HTTP.Request.Username := edUsername.Text;{teste}
        HTTP.Request.Password := edPassword.Text;{senha}

HTTP. Head(cbURL. Text);

however in the second time I use user and correct password but indy
returns me the same error! Because?

Replies