Article View: borland.public.cppbuilder.internet.socket
Article #314Re: C++ Builder 2007 & Indy10 + Digest auth...
From: Remy Lebeau (TeamB)
Date: Mon, 14 Apr 2008 16:39
Date: Mon, 14 Apr 2008 16:39
46 lines
2283 bytes
2283 bytes
"Jyrki Saario" <user@domain.invalid> wrote in message
news:48035008@newsgroups.borland.com...
> I try to connect to server what uses Digest authentication to
> download page under URL: http://192.168.0.10/rmt/index.shtml
>
> When I run my program, I will get exception HTTP/1.0 401 Unauthorized
> access
What do you have the AuthRetries and MaxAuthRetries properties set to?
> HTTP->Get("http://192.168.0.10/rmt/index.shtml", stream);
> stream->Position = 0;
> stream->SaveToFile(DirPathEdit->Text + "\Test.html");
If you use a TFileStream instead, you can avoid saving the file to memory
first:
TFileStreamStream *stream = new TFileStream(DirPathEdit->Text +
"\Test.html", fmCreate);
HTTP->Get("http://192.168.0.10/rmt/index.shtml", stream);
> stream->Free();
Use the 'delete' operator instead of calling Free() directly:
delete stream;
> in HTTPSelectAuthorization event, I can find this information
> from AuthInfo->Text:
<snip>
Are you getting an OnAuthorization event triggered at all?
> What is wrong, what do I need to do to get this work?
Did you verify with a packet sniffer that TIdHTTP is even attempting to
login with the Digest credentials at all?
> Do I need to make MD5 of password my self?
No.
Gambit
Technical Details
Message-ID:
<480388e6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!npeer02.iad!news.highwinds-media.com!news.glorb.com!news2.arglkargh.de!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mailReferences:
<48035008@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,d2c1cbe3fa01c X-Google-Attributes: gid11508e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <48035008@newsgroups.borland.com> Subject: Re: C++ Builder 2007 & Indy10 + Digest auth... Date: Mon, 14 Apr 2008 09:39:53 -0700 Lines: 48 Organization: Lebeau Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 NNTP-Posting-Host: 207.178.157.90 Message-ID: <480388e6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1208191206 207.178.157.90 (14 Apr 2008 09:40:06 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!npeer02.iad!news.highwinds-media.com!news.glorb.com!news2.arglkargh.de!feeder.erje.net!news.isoc.lu!newsgroups.borland.com!not-for-mail