[DUG] TIdHTTP

Ross Levis ross at stationplaylist.com
Wed Jun 15 19:50:06 NZST 2005


I tried Basic Authentication but this made no difference.  It didn't 
work, but worse, it didn't provide a ResponseText or any response 
details at all!  It was empty.

Actually, AuthRetries defaults to 3, but I must have changed this to 0 
in the IDE a long time ago.  It's an old app which has not had to deal 
with authentication until now.

Cheers,
Ross.

----- Original Message ----- 
From: "Ben Taylor" <to_ben at yahoo.com>
To: "NZ Borland Developers Group - Delphi List" <delphi at ns3.123.co.nz>
Sent: Wednesday, June 15, 2005 6:32 PM
Subject: Re: [DUG] TIdHTTP


Well, it's good that it's working now..

in terms of logic, indy implements what http requires. if you dont 
explicitly
specify basic auth, then there's roundtrips to the server to negotiate
authentication. how many retries depends on the auth method, eg 
integrated/ntlm/SSPI
require 3.

thats not to say the default shouldn't be changed to be more 
'friendly'.. maybe it
should be.

--- Ross Levis <ross at stationplaylist.com> wrote:

> I just this second managed to get it going.
>
> It needed AuthRetries = 1, not the default 0.  It also needed
> HTTPOptions.hoInProcessAuth set to True.  I followed the Indy source
> code and if AuthRetries = 0 then it didn't bother sending the
> authorization details.  I don't really agree with the logic.  Indy 10
> code is pretty much the same.
>
> It now works whether set to basic auth or not.
>
> Thanks,
> Ross.
>
> ----- Original Message ----- 
> From: "Ben Taylor" <to_ben at yahoo.com>
> To: "NZ Borland Developers Group - Delphi List" <delphi at ns3.123.co.nz>
> Sent: Wednesday, June 15, 2005 5:30 PM
> Subject: Re: [DUG] TIdHTTP
>
>
> This works for me. Indy10, dev snapshot. Uses basic auth, which is 
> what
> i assume
> you're trying to use.
>
> If not, post some code. a dunit test that fetches from a public server
> would be nice
> :-)
>
> var
>  h:TIdHTTP;
>  s:string;
> begin
>  h:=TIdHTTP.Create(nil);
>  try
>   h.Request.Username:='luggage';
>   h.Request.Password:='12345';
>   h.Request.BasicAuthentication:=True;
>   s:=h.Get('http://192.168.1.100/');
>  finally
>   Sys.FreeAndNil(h);
>  end;
> end;
>
> --- Ross Levis <ross at stationplaylist.com> wrote:
>
> > I have a question which I've posted on the Indy newsgroup without a
> > response at this stage so thought I would try here, in case someone
> > has
> > done this before.
> >
> > Using D7 with the last release of Indy 9.
>
>
>
>
> __________________________________
> Discover Yahoo!
> Find restaurants, movies, travel and more fun for the weekend. Check 
> it
> out!
> http://discover.yahoo.com/weekend.html
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi



More information about the Delphi mailing list