Wow, they don't teach you this stuff in business school. Thanks for the information, it helped me solve most of my problem! I may still have problems with some authentication methods, but this seems to work with most of them.
- Ronny


----- Original Message ----- From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Friday, April 08, 2005 4:12 AM
Subject: Re: [twsocket] HttpCli with passwords



I have narrowed down the problem a bit. The OnHeaderEnd routine gets called
twice when using passwords, the first time with a negative contentlength,
the second time with the proper value. Using D7, httpprot 1.83.
(It only gets called once when not using usernames/passwords, which is what
it is supposed to do)
- Ronny

that's the usual way http works. When you cal for a URL with a user/password within an authentication,
you have the following steps :
The request is sent once, without authentication. you then get back a 401 error.
The httpCli component then analyses the authentication method (and realm) and then
sends back a request with the user/password encoded in the authentication header.


so you have th OnHeaderEnd trigger twice because of the first 401 answer and then with
the "correct" answer.


[note] although i don't know why there *must* be a first 401 when you provide username/password,
i suppose it's a way to know the exact authentication method...
[/note]


so if you want to analyse any result, you'd better have a look at the OnRequestDoneEvent.

HTH,

Best regards,

Guillaume MAISON
-----
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
TÚl : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be



-- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be

Reply via email to