[twsocket] HTTP 1.1 Basic/Digest authentication

2006-01-04 Thread Fastream Technologies
Hello,

I have read most of RFC2617 and I am trying to implement digest authentication 
for our C++ web server. I have come up with the following questions:

1) How does a client with no support for digest authentication but support for 
basic one reacts to a 401 www-autheticate reply with digest as the scheme? 
Unlike content encoding or transfer encoding, there can only be one auth scheme 
for one request!

2) Does ICS MD5 unit supports digest MD5 as per RFC2617? Or do I need to use 
the C++ code in RFC1321 and 2617?

If/when I do this in C++, I will post my code here for your review, translation 
to Delphi and inclusion to ICS.

Best Regards,

SubZero
-- 
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


Re: [twsocket] HTTP 1.1 Basic/Digest authentication

2006-01-04 Thread Fastream Technologies
Forget the first question.

- Original Message - 
From: Fastream Technologies [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Wednesday, January 04, 2006 3:12 PM
Subject: [twsocket] HTTP 1.1 Basic/Digest authentication


 Hello,

 I have read most of RFC2617 and I am trying to implement digest 
 authentication for our C++ web server. I have come up with the following 
 questions:

 1) How does a client with no support for digest authentication but support 
 for basic one reacts to a 401 www-autheticate reply with digest as the 
 scheme? Unlike content encoding or transfer encoding, there can only be 
 one auth scheme for one request!

 2) Does ICS MD5 unit supports digest MD5 as per RFC2617? Or do I need to 
 use the C++ code in RFC1321 and 2617?

 If/when I do this in C++, I will post my code here for your review, 
 translation to Delphi and inclusion to ICS.

 Best Regards,

 SubZero
 -- 
 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


Re: [twsocket] HTTP 1.1 Basic/Digest authentication

2006-01-04 Thread Francois Piette
 2) Does ICS MD5 unit supports digest MD5 as per RFC2617? 
 Or do I need to use the C++ code in RFC1321 and 2617?

ICS MD5 unit is compliant to RFC1321.
RFC2617 has nothing to do with MD5 definition.

--
Contribute to the SSL Effort. Visit
http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
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


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Arno Garrels
Wilfried,

Not sure, but I think he meant this one:

procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: Word);
begin
if ErrCode = 0 then
Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
else if ErrCode = 1 then
Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
else
Memo1.Lines.Add('Unknown Error!');
end;

procedure TForm1.ButtonOKClick(Sender: TObject);
begin
WSocket1.DnsLookup('www.adomain.com');
end;


 Hello Ja,
 
 I think what you wants is the TDnsQuery component (also in ICS package).
 WSocket.DNSLookup resolve a hostname to IP address.




 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 
 Tuesday, January 3, 2006, 22:18, Ja wrote:
 
 
  Wiadomosc Oryginalna 
 Od: Wilfried Mestdagh [EMAIL PROTECTED]
 Do: ICS support mailing twsocket@elists.org
 Data: Tue, 3 Jan 2006 22:00:48 +0100
 Temat: Re: [twsocket] WSocket DNSLookup.
 
 Hello Ja,
 
 Is there any way to do a WSocket DNSLookup and OnLookupDone get
 adress of host that have been looked up?
 
 I do not understeand the question. CAn you please rephrase it ?
 
 
 I wouldlike to lookup some hosts ( with WSocket.DnsLookup($domain) )
 , and at the end add a results to memo, but... when there is no
 result (for example domain doesnt exist) i would like to add text
 $domain doesnt exist! ... but have no idea how do i get $domain
 string in OnLookupDone event...
-- 
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


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Ja
Yes i meant that but... if the error occures i need to know with 
what domain.

 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else
 Memo1.Lines.Add('DOMAIN_NAME: Unknown Error!');
 end;

But dont know how to get the domain_name that just have been looked 
up. TWSocket(Sender).addr is empty.


 Wiadomość Oryginalna 
Od: Arno Garrels [EMAIL PROTECTED]
Do: ICS support mailing twsocket@elists.org
Data: Wed, 4 Jan 2006 16:11:29 +0100
Temat: Re: [twsocket] WSocket DNSLookup.

 Wilfried,
 
 Not sure, but I think he meant this one:
 
 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else if ErrCode = 1 then
 Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
 else
 Memo1.Lines.Add('Unknown Error!');
 end;
 
 procedure TForm1.ButtonOKClick(Sender: TObject);
 begin
 WSocket1.DnsLookup('www.adomain.com');
 end;
 
 
  Hello Ja,
  
  I think what you wants is the TDnsQuery component (also in ICS 
package).
  WSocket.DNSLookup resolve a hostname to IP address.
 
 
 
 
  
  ---
  Rgds, Wilfried [TeamICS]
  http://www.overbyte.be/eng/overbyte/teamics.html
  http://www.mestdagh.biz
  
  Tuesday, January 3, 2006, 22:18, Ja wrote:
  
  
   Wiadomosc Oryginalna 
  Od: Wilfried Mestdagh [EMAIL PROTECTED]
  Do: ICS support mailing twsocket@elists.org
  Data: Tue, 3 Jan 2006 22:00:48 +0100
  Temat: Re: [twsocket] WSocket DNSLookup.
  
  Hello Ja,
  
  Is there any way to do a WSocket DNSLookup and OnLookupDone 
get
  adress of host that have been looked up?
  
  I do not understeand the question. CAn you please rephrase it 
?
  
  
  I wouldlike to lookup some hosts ( with WSocket.
DnsLookup($domain) )
  , and at the end add a results to memo, but... when there is no
  result (for example domain doesnt exist) i would like to add 
text
  $domain doesnt exist! ... but have no idea how do i get 
$domain
  string in OnLookupDone event...
 -- 
 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


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Arno Garrels
Ja wrote:
 Yes i meant that but... if the error occures i need to know with
 what domain.
 
 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else
 Memo1.Lines.Add('DOMAIN_NAME: Unknown Error!');
 end;
 
 But dont know how to get the domain_name that just have been looked
 up. TWSocket(Sender).addr is empty.

Why don't you put something in?

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

 
 
  Wiadomosc Oryginalna 
 Od: Arno Garrels [EMAIL PROTECTED]
 Do: ICS support mailing twsocket@elists.org
 Data: Wed, 4 Jan 2006 16:11:29 +0100
 Temat: Re: [twsocket] WSocket DNSLookup.
 
 Wilfried,
 
 Not sure, but I think he meant this one:
 
 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else if ErrCode = 1 then
 Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
 else
 Memo1.Lines.Add('Unknown Error!');
 end;
 
 procedure TForm1.ButtonOKClick(Sender: TObject);
 begin
 WSocket1.DnsLookup('www.adomain.com');
 end;
 
 
 Hello Ja,
 
 I think what you wants is the TDnsQuery component (also in ICS package).
 WSocket.DNSLookup resolve a hostname to IP address.
 
 
 
 
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 
 Tuesday, January 3, 2006, 22:18, Ja wrote:
 
 
  Wiadomosc Oryginalna 
 Od: Wilfried Mestdagh [EMAIL PROTECTED]
 Do: ICS support mailing twsocket@elists.org
 Data: Tue, 3 Jan 2006 22:00:48 +0100
 Temat: Re: [twsocket] WSocket DNSLookup.
 
 Hello Ja,
 
 Is there any way to do a WSocket DNSLookup and OnLookupDone
 get
 adress of host that have been looked up?
 
 I do not understeand the question. CAn you please rephrase it
 ?
 
 
 I wouldlike to lookup some hosts ( with WSocket. DnsLookup($domain) )
 , and at the end add a results to memo, but... when there is no
 result (for example domain doesnt exist) i would like to add
 text
 $domain doesnt exist! ... but have no idea how do i get
 $domain
 string in OnLookupDone event...
 --
 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


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Wilfried Mestdagh
Hello Ja,

 But dont know how to get the domain_name that just have been looked
 up. TWSocket(Sender).addr is empty.

Sorry I mistundertood your question. Thanks Arno for clarifying.
TWSocket.Addr is not used for the DNSLookup, so you can put the domain
in there.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, January 4, 2006, 16:21, Ja wrote:

 Yes i meant that but... if the error occures i need to know with 
 what domain.

 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
 Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else
 Memo1.Lines.Add('DOMAIN_NAME: Unknown Error!');
 end;

 But dont know how to get the domain_name that just have been looked 
 up. TWSocket(Sender).addr is empty.


  Wiadomość Oryginalna 
 Od: Arno Garrels [EMAIL PROTECTED]
 Do: ICS support mailing twsocket@elists.org
 Data: Wed, 4 Jan 2006 16:11:29 +0100
 Temat: Re: [twsocket] WSocket DNSLookup.

 Wilfried,
 
 Not sure, but I think he meant this one:
 
 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
 Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else if ErrCode = 1 then
 Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
 else
 Memo1.Lines.Add('Unknown Error!');
 end;
 
 procedure TForm1.ButtonOKClick(Sender: TObject);
 begin
 WSocket1.DnsLookup('www.adomain.com');
 end;
 
 
  Hello Ja,
  
  I think what you wants is the TDnsQuery component (also in ICS 
 package).
  WSocket.DNSLookup resolve a hostname to IP address.
 
 
 
 
  
  ---
  Rgds, Wilfried [TeamICS]
  http://www.overbyte.be/eng/overbyte/teamics.html
  http://www.mestdagh.biz
  
  Tuesday, January 3, 2006, 22:18, Ja wrote:
  
  
   Wiadomosc Oryginalna 
  Od: Wilfried Mestdagh [EMAIL PROTECTED]
  Do: ICS support mailing twsocket@elists.org
  Data: Tue, 3 Jan 2006 22:00:48 +0100
  Temat: Re: [twsocket] WSocket DNSLookup.
  
  Hello Ja,
  
  Is there any way to do a WSocket DNSLookup and OnLookupDone 
 get
  adress of host that have been looked up?
  
  I do not understeand the question. CAn you please rephrase it 
 ?
  
  
  I wouldlike to lookup some hosts ( with WSocket.
 DnsLookup($domain) )
  , and at the end add a results to memo, but... when there is no
  result (for example domain doesnt exist) i would like to add 
 text
  $domain doesnt exist! ... but have no idea how do i get 
 $domain
  string in OnLookupDone event...
 -- 
 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


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Ja
Program check list of domains with several components at once... 
putting something in woudldnt do the job.

 Wiadomość Oryginalna 
Od: Arno Garrels [EMAIL PROTECTED]
Do: ICS support mailing twsocket@elists.org
Data: Wed, 4 Jan 2006 16:38:51 +0100
Temat: Re: [twsocket] WSocket DNSLookup.

 Ja wrote:
  Yes i meant that but... if the error occures i need to know with
  what domain.
  
  procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; 
ErrCode: Word);
  begin
  if ErrCode = 0 then
  Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
  else
  Memo1.Lines.Add('DOMAIN_NAME: Unknown Error!');
  end;
  
  But dont know how to get the domain_name that just have been 
looked
  up. TWSocket(Sender).addr is empty.
 
 Why don't you put something in?
 
 ---
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
  
  
   Wiadomosc Oryginalna 
  Od: Arno Garrels [EMAIL PROTECTED]
  Do: ICS support mailing twsocket@elists.org
  Data: Wed, 4 Jan 2006 16:11:29 +0100
  Temat: Re: [twsocket] WSocket DNSLookup.
  
  Wilfried,
  
  Not sure, but I think he meant this one:
  
  procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; 
ErrCode: Word);
  begin
  if ErrCode = 0 then
  Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
  else if ErrCode = 1 then
  Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
  else
  Memo1.Lines.Add('Unknown Error!');
  end;
  
  procedure TForm1.ButtonOKClick(Sender: TObject);
  begin
  WSocket1.DnsLookup('www.adomain.com');
  end;
  
  
  Hello Ja,
  
  I think what you wants is the TDnsQuery component (also in ICS 
package).
  WSocket.DNSLookup resolve a hostname to IP address.
  
  
  
  
  
  ---
  Rgds, Wilfried [TeamICS]
  http://www.overbyte.be/eng/overbyte/teamics.html
  http://www.mestdagh.biz
  
  Tuesday, January 3, 2006, 22:18, Ja wrote:
  
  
   Wiadomosc Oryginalna 
  Od: Wilfried Mestdagh [EMAIL PROTECTED]
  Do: ICS support mailing twsocket@elists.org
  Data: Tue, 3 Jan 2006 22:00:48 +0100
  Temat: Re: [twsocket] WSocket DNSLookup.
  
  Hello Ja,
  
  Is there any way to do a WSocket DNSLookup and OnLookupDone
  get
  adress of host that have been looked up?
  
  I do not understeand the question. CAn you please rephrase 
it
  ?
  
  
  I wouldlike to lookup some hosts ( with WSocket. 
DnsLookup($domain) )
  , and at the end add a results to memo, but... when there is 
no
  result (for example domain doesnt exist) i would like to add
  text
  $domain doesnt exist! ... but have no idea how do i get
  $domain
  string in OnLookupDone event...
  --
  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
 

-- 
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


[twsocket] Client and Server at same time?

2006-01-04 Thread Michael Preslar
Hello..

I'm working on a program that could be either a client and/or a server 
at the same time. Well, wanting to work on it.

Going by the ICS examples, I've put together some code that should work.

I have a:

type TClient = class(TObject)
 Peer  : String;
 Socket : TWSocket;
 constructor Create;
 procedure SocketDataAvailable(Sender: TObject; Error: Word);
 procedure SocketSessionClosed(Sender: TObject; Error: Word);
   private
 buffer : ansistring;
   public
 AcceptForm : TForm;
 Reference  : Pointer;
 PortNum: Integer;
 peername   : TSockAddrIn;
   end;


then in TClient.create I do

begin
   inherited;
   socket.OnDataAvailable := SocketDataAvailable;
   socket.OnSessionClosed := SocketSessionClosed;
end;

Which crashed the program. What's the proper way to do this?

Full source to an example program can be found at 
http://www.mpcode.com/cliserv.zip (its d6 code, but should be fine with 
anything that runs ICS and Delphi)
-- 
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


[twsocket] Failed installing MidWare

2006-01-04 Thread Patrick Wong
Dear all,

When attempted to install the MidWare package, BCB failed to compile the 
RFormat.pas with the following errors:

[Pascal Error] RFormat.pas(2003): Undeclared identifier: 'VarArrayDimCount'
[Pascal Error] RFormat.pas(2017): Undeclared identifier: 'VarArrayLowBound'
[Pascal Error] RFormat.pas(2018): Undeclared identifier: 'VarArrayHighBound'
[Pascal Error] RFormat.pas(2371): Undeclared identifier: 'VarType'
[Pascal Error] RFormat.pas(2386): Undeclared identifier: 'null'
[Pascal Fatal Error] pasall.tmp(8): Could not compile used unit 
'C:\Borland\CBuilder6\Source\MidWare\Delphi\vc32\RFormat.pas'
[Linker Fatal Error] Fatal: Unable to open file 'MWBCB60.OBJ'

I am using BCB6 Enterprise and with ICS installed.

Am I missing something?

Thanks for any kind advice,
Patrick-- 
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

[twsocket] Failed installing MidWare

2006-01-04 Thread Patrick Wong
Sorry for mis-posting here, before I found the mail list specifically for 
MidWare.

Posts there helped me to solve the problem.

Thanks and regards,
Patrick-- 
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